diff mercurial/localrepo.py @ 17252:16fad7323e56 stable

push: do not try to push remote obsolete if local has none
author Patrick Mezard <patrick@mezard.eu>
date Tue, 24 Jul 2012 21:20:56 +0200
parents 6ffb35b2284c
children d3f84ccc5495
line wrap: on
line diff
--- a/mercurial/localrepo.py	Thu Jul 26 02:54:13 2012 +0200
+++ b/mercurial/localrepo.py	Tue Jul 24 21:20:56 2012 +0200
@@ -1951,8 +1951,8 @@
                         if not r:
                             self.ui.warn(_('updating %s to public failed!\n')
                                             % newremotehead)
-                if ('obsolete' in remote.listkeys('namespaces')
-                    and self.obsstore):
+                if (self.obsstore and
+                    'obsolete' in remote.listkeys('namespaces')):
                     data = self.listkeys('obsolete')['dump']
                     r = remote.pushkey('obsolete', 'dump', '', data)
                     if not r: