comparison mercurial/commands.py @ 18994:32843795e9b3

summary: make "outgoing" information sensitive to branch in URL (issue3829) Before this patch, "outgoing" information of "hg summary --remote" is not sensitive to the branch specified in the URL of the destination repository, even though "hg push"/"hg outgoing" are so: Invocation of "discovery.findcommonoutgoing()" without "onlyheads" argument treats revisions on branches other than the one specified in the URL as outgoing ones unexpectedly. This patch looks head revisions, which are already detected by "hg.addbranchrevs()" from URL, up against local repository, and invokes "discovery.findcommonoutgoing()" with list of them as "onlyheads" to limit calculation of outgoing revisions.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 09 Apr 2013 23:40:10 +0900
parents c31b8dc9de67
children 160d8416e286
comparison
equal deleted inserted replaced
18993:0fd0612dc855 18994:32843795e9b3
5479 revs, checkout = hg.addbranchrevs(repo, repo, branches, None) 5479 revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
5480 if source != dest: 5480 if source != dest:
5481 other = hg.peer(repo, {}, dest) 5481 other = hg.peer(repo, {}, dest)
5482 commoninc = None 5482 commoninc = None
5483 ui.debug('comparing with %s\n' % util.hidepassword(dest)) 5483 ui.debug('comparing with %s\n' % util.hidepassword(dest))
5484 if revs:
5485 revs = [repo.lookup(rev) for rev in revs]
5484 repo.ui.pushbuffer() 5486 repo.ui.pushbuffer()
5485 outgoing = discovery.findcommonoutgoing(repo, other, 5487 outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs,
5486 commoninc=commoninc) 5488 commoninc=commoninc)
5487 repo.ui.popbuffer() 5489 repo.ui.popbuffer()
5488 o = outgoing.missing 5490 o = outgoing.missing
5489 if o: 5491 if o:
5490 t.append(_('%d outgoing') % len(o)) 5492 t.append(_('%d outgoing') % len(o))