[Reviewers] [Differential] [Request, 27 lines] D23: rebase: move obsoleted not rebased messages earlier (BC)
quark (Jun Wu)
phabricator-noreply at mercurial-scm.org
Mon Jul 10 19:15:23 UTC 2017
quark created this revision.
Herald added a subscriber: reviewers.
REVISION SUMMARY
A later patch will clean up those states. This patch moves the messages
earlier.
Marked as BC since the order of message has changed.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D23
AFFECTED FILES
hgext/rebase.py
tests/test-rebase-obsolete.t
CHANGE DETAILS
Index: tests/test-rebase-obsolete.t
===================================================================
--- tests/test-rebase-obsolete.t
+++ tests/test-rebase-obsolete.t
@@ -204,8 +204,8 @@
o 0:cd010b8cd998 A
$ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True
+ note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D"
rebasing 8:8877864f1edb "B"
- note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D"
rebasing 10:5ae4c968c6ac "C"
$ hg debugobsolete
42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (*) {'user': 'test'} (glob)
@@ -711,8 +711,8 @@
$ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=all
$ hg rebase -d 6 -r "4::"
+ note: not rebasing 7:360bbaa7d3ce "O", it has no successor
rebasing 4:ff2c4d47b71d "C"
- note: not rebasing 7:360bbaa7d3ce "O", it has no successor
rebasing 8:8d47583e023f "P" (tip)
If all the changeset to be rebased are obsolete and present in the destination, we
@@ -877,6 +877,7 @@
|
~
$ hg rebase -r ".^^ + .^ + ." -d 19
+ note: not rebasing 21:8b31da3c4919 "dummy change", already in destination as 19:601db7a18f51 "dummy change successor"
rebasing 20:b82fb57ea638 "willconflict second version"
merging willconflict
warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark')
@@ -888,7 +889,6 @@
continue: hg rebase --continue
$ hg rebase --continue
rebasing 20:b82fb57ea638 "willconflict second version"
- note: not rebasing 21:8b31da3c4919 "dummy change", already in destination as 19:601db7a18f51 "dummy change successor"
rebasing 22:7bdc8a87673d "dummy change" (tip)
$ cd ..
Index: hgext/rebase.py
===================================================================
--- hgext/rebase.py
+++ hgext/rebase.py
@@ -446,14 +446,9 @@
elif self.state[rev] == revignored:
ui.status(_('not rebasing ignored %s\n') % desc)
elif self.state[rev] == revprecursor:
- destctx = repo[self.obsoletenotrebased[rev]]
- descdest = '%d:%s "%s"' % (destctx.rev(), destctx,
- destctx.description().split('\n', 1)[0])
- msg = _('note: not rebasing %s, already in destination as %s\n')
- ui.status(msg % (desc, descdest))
+ pass
elif self.state[rev] == revpruned:
- msg = _('note: not rebasing %s, it has no successor\n')
- ui.status(msg % desc)
+ pass
else:
ui.status(_('already rebased %s as %s\n') %
(desc, repo[self.state[rev]]))
@@ -1325,11 +1320,21 @@
rebasedomain = set(repo.revs('%ld::%ld', rebaseset, rebaseset))
for ignored in set(rebasedomain) - set(rebaseset):
state[ignored] = revignored
+ unfi = repo.unfiltered()
for r in obsoletenotrebased:
- if obsoletenotrebased[r] is None:
+ desc = _ctxdesc(unfi[r])
+ succ = obsoletenotrebased[r]
+ if succ is None:
+ msg = _('note: not rebasing %s, it has no successor\n') % desc
state[r] = revpruned
else:
+ destctx = unfi[succ]
+ destdesc = '%d:%s "%s"' % (destctx.rev(), destctx,
+ destctx.description().split('\n', 1)[0])
+ msg = (_('note: not rebasing %s, already in destination as %s\n')
+ % (desc, destdesc))
state[r] = revprecursor
+ repo.ui.status(msg)
return originalwd, dest.rev(), state
def clearrebased(ui, repo, state, skipped, collapsedas=None):
EMAIL PREFERENCES
https://phab.mercurial-scm.org/settings/panel/emailpreferences/
To: quark
Cc: reviewers
More information about the Reviewers
mailing list