push: move obsolescence related message into _pushobsolescence function
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 30 Jan 2014 19:55:09 -0800
changeset 20435 46ede894d5a4
parent 20434 e009e59e4566
child 20436 2f2e8d1c4856
push: move obsolescence related message into _pushobsolescence function No good reason to have them in the main fonction.
mercurial/exchange.py
--- a/mercurial/exchange.py	Thu Jan 30 19:51:21 2014 -0800
+++ b/mercurial/exchange.py	Thu Jan 30 19:55:09 2014 -0800
@@ -246,7 +246,6 @@
                     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:
@@ -260,6 +259,7 @@
 
 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