##// END OF EJS Templates
subrepo: speed up git push logic...
Eric Eisner -
r13109:53341289 default
parent child Browse files
Show More
@@ -813,8 +813,12 b' class gitsubrepo(abstractsubrepo):'
813 def push(self, force):
813 def push(self, force):
814 # if a branch in origin contains the revision, nothing to do
814 # if a branch in origin contains the revision, nothing to do
815 current, branch2rev, rev2branch = self._gitbranchmap()
815 current, branch2rev, rev2branch = self._gitbranchmap()
816 if self._state[1] in rev2branch:
817 for b in rev2branch[self._state[1]]:
818 if b.startswith('remotes/origin/'):
819 return True
816 for b, revision in branch2rev.iteritems():
820 for b, revision in branch2rev.iteritems():
817 if b.startswith('remotes/origin'):
821 if b.startswith('remotes/origin/'):
818 if self._gitisancestor(self._state[1], revision):
822 if self._gitisancestor(self._state[1], revision):
819 return True
823 return True
820 # otherwise, try to push the currently checked out branch
824 # otherwise, try to push the currently checked out branch
General Comments 0
You need to be logged in to leave comments. Login now