equal
deleted
inserted
replaced
2955 if not q.applied: |
2955 if not q.applied: |
2956 return result |
2956 return result |
2957 |
2957 |
2958 mqtags = [(patch.node, patch.name) for patch in q.applied] |
2958 mqtags = [(patch.node, patch.name) for patch in q.applied] |
2959 |
2959 |
2960 if mqtags[-1][0] not in self: |
2960 try: |
|
2961 r = self.changelog.rev(mqtags[-1][0]) |
|
2962 except error.RepoLookupError: |
2961 self.ui.warn(_('mq status file refers to unknown node %s\n') |
2963 self.ui.warn(_('mq status file refers to unknown node %s\n') |
2962 % short(mqtags[-1][0])) |
2964 % short(mqtags[-1][0])) |
2963 return result |
2965 return result |
2964 |
2966 |
2965 mqtags.append((mqtags[-1][0], 'qtip')) |
2967 mqtags.append((mqtags[-1][0], 'qtip')) |
2980 if not q.applied: |
2982 if not q.applied: |
2981 return super(mqrepo, self)._branchtags(partial, lrev) |
2983 return super(mqrepo, self)._branchtags(partial, lrev) |
2982 |
2984 |
2983 cl = self.changelog |
2985 cl = self.changelog |
2984 qbasenode = q.applied[0].node |
2986 qbasenode = q.applied[0].node |
2985 if qbasenode not in self: |
2987 try: |
|
2988 qbase = cl.rev(qbasenode) |
|
2989 except error.LookupError: |
2986 self.ui.warn(_('mq status file refers to unknown node %s\n') |
2990 self.ui.warn(_('mq status file refers to unknown node %s\n') |
2987 % short(qbasenode)) |
2991 % short(qbasenode)) |
2988 return super(mqrepo, self)._branchtags(partial, lrev) |
2992 return super(mqrepo, self)._branchtags(partial, lrev) |
2989 |
2993 |
2990 qbase = cl.rev(qbasenode) |
|
2991 start = lrev + 1 |
2994 start = lrev + 1 |
2992 if start < qbase: |
2995 if start < qbase: |
2993 # update the cache (excluding the patches) and save it |
2996 # update the cache (excluding the patches) and save it |
2994 ctxgen = (self[r] for r in xrange(lrev + 1, qbase)) |
2997 ctxgen = (self[r] for r in xrange(lrev + 1, qbase)) |
2995 self._updatebranchcache(partial, ctxgen) |
2998 self._updatebranchcache(partial, ctxgen) |