mercurial/subrepo.py
changeset 13109 53341289eaf8
parent 13108 dcaad69cfd6a
child 13110 cad35f06c031
--- a/mercurial/subrepo.py	Thu Dec 09 16:52:14 2010 -0500
+++ b/mercurial/subrepo.py	Thu Dec 09 16:52:14 2010 -0500
@@ -813,8 +813,12 @@
     def push(self, force):
         # if a branch in origin contains the revision, nothing to do
         current, branch2rev, rev2branch = self._gitbranchmap()
+        if self._state[1] in rev2branch:
+            for b in rev2branch[self._state[1]]:
+                if b.startswith('remotes/origin/'):
+                    return True
         for b, revision in branch2rev.iteritems():
-            if b.startswith('remotes/origin'):
+            if b.startswith('remotes/origin/'):
                 if self._gitisancestor(self._state[1], revision):
                     return True
         # otherwise, try to push the currently checked out branch