[PATCH 05 of 11 (19 more to go)] push: move obsolescence related message into _pushobsolescence function

pierre-yves.david at ens-lyon.org pierre-yves.david at ens-lyon.org
Mon Feb 10 18:01:33 CST 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1391140509 28800
#      Thu Jan 30 19:55:09 2014 -0800
# Node ID 8b97b0a12ed0bdd5c33c56d99ed08342c0a0bc9d
# Parent  c39c0cf5e4cdbc5c375efa5246ed3b07c1d77652
push: move obsolescence related message into _pushobsolescence function

No good reason to have them in the main fonction.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -244,11 +244,10 @@ def push(repo, remote, force=False, revs
                                               str(phases.draft),
                                               str(phases.public))
                     if not r:
                         pushop.ui.warn(_('updating %s to public failed!\n')
                                        % newremotehead)
-            pushop.ui.debug('try to push obsolete markers to remote\n')
             _pushobsolete(pushop)
         finally:
             if lock is not None:
                 lock.release()
     finally:
@@ -258,10 +257,11 @@ def push(repo, remote, force=False, revs
     _pushbookmark(pushop)
     return ret
 
 def _pushobsolete(pushop):
     """utility function to push obsolete markers to a remote"""
+    pushop.ui.debug('try to push obsolete markers to remote\n')
     repo = pushop.repo
     remote = pushop.remote
     if (obsolete._enabled and repo.obsstore and
         'obsolete' in remote.listkeys('namespaces')):
         rslts = []


More information about the Mercurial-devel mailing list