"hg bundle --branch foo other-repo" fails, if "foo" is created newly on local repository. this can be reproduced by script below: hg init src echo a > src/a hg -R src commit -Am '#0' echo b > src/b hg -R src commit -Am '#1' hg clone src dst hg -R src update 0 hg -R src branch foo hg -R src commit -m '#2' hg -R src bundle --branch foo foo.hg dst
Fixed by http://selenic.com/repo/hg/rev/61c8327ced50 FUJIWARA Katsunori <foozy@lares.dti.ne.jp> 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. (please test the fix)