comparison hgext/histedit.py @ 18995:0023a6e49268

histedit: make "hg histedit" sensitive to branch in URL Before this patch, "hg histedit" are 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 specifies list of head revisions, which are already detected by "hg.addbranchrevs()" from URL and looked up against local repository, as "onlyheads" to "discovery.findcommonoutgoing()" to limit calculation of outgoing revisions.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 09 Apr 2013 23:40:10 +0900
parents 93f3a06b2035
children c5c8613f265e
comparison
equal deleted inserted replaced
18994:32843795e9b3 18995:0023a6e49268
457 # hexlify nodes from outgoing, because we're going to parse 457 # hexlify nodes from outgoing, because we're going to parse
458 # parent[0] using revsingle below, and if the binary hash 458 # parent[0] using revsingle below, and if the binary hash
459 # contains special revset characters like ":" the revset 459 # contains special revset characters like ":" the revset
460 # parser can choke. 460 # parser can choke.
461 parent = [node.hex(n) for n in discovery.findcommonoutgoing( 461 parent = [node.hex(n) for n in discovery.findcommonoutgoing(
462 repo, other, [], force=opts.get('force')).missing[0:1]] 462 repo, other, revs, force=opts.get('force')).missing[0:1]]
463 else: 463 else:
464 if opts.get('force'): 464 if opts.get('force'):
465 raise util.Abort(_('--force only allowed with --outgoing')) 465 raise util.Abort(_('--force only allowed with --outgoing'))
466 466
467 if opts.get('continue', False): 467 if opts.get('continue', False):