Mercurial > hg
changeset 10628:6227c8d669d5
rebase: improve output of hg pull --rebase (issue2072)
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Wed, 10 Mar 2010 12:38:33 +0100 |
parents | adcd5bcb37ab |
children | d3f27d15c9cb 3318431f2ab4 |
files | hgext/rebase.py tests/test-rebase-pull.out |
diffstat | 2 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Wed Mar 10 09:52:16 2010 +0100 +++ b/hgext/rebase.py Wed Mar 10 12:38:33 2010 +0100 @@ -14,7 +14,7 @@ http://mercurial.selenic.com/wiki/RebaseExtension ''' -from mercurial import util, repair, merge, cmdutil, commands, error +from mercurial import hg, util, repair, merge, cmdutil, commands, error from mercurial import extensions, ancestor, copies, patch from mercurial.commands import templateopts from mercurial.node import nullrev @@ -467,7 +467,14 @@ cmdutil.bail_if_changed(repo) revsprepull = len(repo) - orig(ui, repo, *args, **opts) + origpostincoming = commands.postincoming + def _dummy(*args, **kwargs): + pass + commands.postincoming = _dummy + try: + orig(ui, repo, *args, **opts) + finally: + commands.postincoming = origpostincoming revspostpull = len(repo) if revspostpull > revsprepull: rebase(ui, repo, **opts) @@ -475,7 +482,7 @@ dest = repo[branch].rev() if dest != repo['.'].rev(): # there was nothing to rebase we force an update - merge.update(repo, dest, False, False, False) + hg.update(repo, dest) else: orig(ui, repo, *args, **opts)
--- a/tests/test-rebase-pull.out Wed Mar 10 09:52:16 2010 +0100 +++ b/tests/test-rebase-pull.out Wed Mar 10 12:38:33 2010 +0100 @@ -10,7 +10,6 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) -(run 'hg heads' to see heads, 'hg merge' to merge) saving bundle to adding branch adding changesets @@ -39,8 +38,8 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files -(run 'hg update' to get a working copy) nothing to rebase +1 files updated, 0 files merged, 0 files removed, 0 files unresolved @ 2 |