comparison mercurial/commands.py @ 18701:61c8327ced50 stable

bundle: treat branches created newly on the local correctly (issue3828) Before this patch, "hg bundle --branch foo other" fails to create bundle file, if specified "foo" branch is created newly on the local repository. "hg bundle" uses "hg.addbranchrevs(repo, other, ...)" to look branch names up, even though other outgoing-like implementation uses "hg.addbranchrevs(repo, repo, ...)". In the former invocation, "other" repository recognizes such branches as unknown, so execution is aborted. This patch uses "hg.addbranchrevs(repo, repo, ..)" in "hg bundle" to bundle revisions on such branches correctly.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 18 Feb 2013 00:04:28 +0900
parents d4a79e075303
children 5bef0655f2e9 afab180307be
comparison
equal deleted inserted replaced
18699:7d66a44e87ed 18701:61c8327ced50
1064 outgoing = None 1064 outgoing = None
1065 else: 1065 else:
1066 dest = ui.expandpath(dest or 'default-push', dest or 'default') 1066 dest = ui.expandpath(dest or 'default-push', dest or 'default')
1067 dest, branches = hg.parseurl(dest, opts.get('branch')) 1067 dest, branches = hg.parseurl(dest, opts.get('branch'))
1068 other = hg.peer(repo, opts, dest) 1068 other = hg.peer(repo, opts, dest)
1069 revs, checkout = hg.addbranchrevs(repo, other, branches, revs) 1069 revs, checkout = hg.addbranchrevs(repo, repo, branches, revs)
1070 heads = revs and map(repo.lookup, revs) or revs 1070 heads = revs and map(repo.lookup, revs) or revs
1071 outgoing = discovery.findcommonoutgoing(repo, other, 1071 outgoing = discovery.findcommonoutgoing(repo, other,
1072 onlyheads=heads, 1072 onlyheads=heads,
1073 force=opts.get('force'), 1073 force=opts.get('force'),
1074 portable=True) 1074 portable=True)