merge with stable
authorKevin Bullock <kbullock@ringworld.org>
Tue, 19 Feb 2013 13:35:39 -0600
changeset 18706 f17680992123
parent 18705 a8204cef4c5a (current diff)
parent 18701 61c8327ced50 (diff)
child 18707 d1a2b086d058
merge with stable
mercurial/commands.py
--- a/mercurial/commands.py	Tue Feb 19 13:35:25 2013 -0600
+++ b/mercurial/commands.py	Tue Feb 19 13:35:39 2013 -0600
@@ -1068,7 +1068,7 @@
         dest = ui.expandpath(dest or 'default-push', dest or 'default')
         dest, branches = hg.parseurl(dest, opts.get('branch'))
         other = hg.peer(repo, opts, dest)
-        revs, checkout = hg.addbranchrevs(repo, other, branches, revs)
+        revs, checkout = hg.addbranchrevs(repo, repo, branches, revs)
         heads = revs and map(repo.lookup, revs) or revs
         outgoing = discovery.findcommonoutgoing(repo, other,
                                                 onlyheads=heads,
--- a/tests/test-bundle.t	Tue Feb 19 13:35:25 2013 -0600
+++ b/tests/test-bundle.t	Tue Feb 19 13:35:39 2013 -0600
@@ -522,6 +522,21 @@
   [255]
   $ cd ..
 
+test to bundle revisions on the newly created branch (issue3828):
+
+  $ hg -q clone -U test test-clone
+  $ cd test
+
+  $ hg -q branch foo
+  $ hg commit -m "create foo branch"
+  $ hg -q outgoing ../test-clone
+  9:b4f5acb1ee27
+  $ hg -q bundle --branch foo foo.hg ../test-clone
+  $ hg -R foo.hg -q log -r "bundle()"
+  9:b4f5acb1ee27
+
+  $ cd ..
+
 test for http://mercurial.selenic.com/bts/issue1144
 
 test that verify bundle does not traceback