##// END OF EJS Templates
discovery: fix regression when checking heads for pre 1.4 client (issue3218)...
Pierre-Yves David -
r15986:ba959f6e stable
parent child Browse files
Show More
@@ -131,7 +131,7 b' def findcommonoutgoing(repo, other, only'
131
131
132 return og
132 return og
133
133
134 def checkheads(repo, remote, outgoing, remoteheads, newbranch=False):
134 def checkheads(repo, remote, outgoing, remoteheads, newbranch=False, inc=False):
135 """Check that a push won't add any outgoing head
135 """Check that a push won't add any outgoing head
136
136
137 raise Abort error and display ui message as needed.
137 raise Abort error and display ui message as needed.
@@ -190,9 +190,9 b' def checkheads(repo, remote, outgoing, r'
190 # Construct {old,new}map with branch = None (topological branch).
190 # Construct {old,new}map with branch = None (topological branch).
191 # (code based on _updatebranchcache)
191 # (code based on _updatebranchcache)
192 oldheads = set(h for h in remoteheads if h in cl.nodemap)
192 oldheads = set(h for h in remoteheads if h in cl.nodemap)
193 newheads = oldheads.union(outg)
193 newheads = oldheads.union(outgoing.missing)
194 if len(newheads) > 1:
194 if len(newheads) > 1:
195 for latest in reversed(outg):
195 for latest in reversed(outgoing.missing):
196 if latest not in newheads:
196 if latest not in newheads:
197 continue
197 continue
198 minhrev = min(cl.rev(h) for h in newheads)
198 minhrev = min(cl.rev(h) for h in newheads)
@@ -1635,7 +1635,8 b' class localrepository(repo.repository):'
1635 # something to push
1635 # something to push
1636 if not force:
1636 if not force:
1637 discovery.checkheads(self, remote, outgoing,
1637 discovery.checkheads(self, remote, outgoing,
1638 remoteheads, newbranch)
1638 remoteheads, newbranch,
1639 bool(inc))
1639
1640
1640 # create a changegroup from local
1641 # create a changegroup from local
1641 if revs is None and not outgoing.excluded:
1642 if revs is None and not outgoing.excluded:
General Comments 0
You need to be logged in to leave comments. Login now