debugbuilddag: fix starting a dag on a non-default branch stable
authorWagner Bruna <wbruna@softwareexpress.com.br>
Fri, 02 Mar 2012 11:46:18 -0300
branchstable
changeset 16219 28c5648771d1
parent 16215 8412d5a02e6e
child 16220 939f043ab5ed
debugbuilddag: fix starting a dag on a non-default branch
mercurial/commands.py
tests/test-debugbuilddag.t
--- a/mercurial/commands.py	Fri Mar 02 14:11:06 2012 -0600
+++ b/mercurial/commands.py	Fri Mar 02 11:46:18 2012 -0300
@@ -1381,7 +1381,8 @@
         at = -1
         atbranch = 'default'
         nodeids = []
-        ui.progress(_('building'), 0, unit=_('revisions'), total=total)
+        id = 0
+        ui.progress(_('building'), id, unit=_('revisions'), total=total)
         for type, data in dagparser.parsedag(text):
             if type == 'n':
                 ui.note('node %s\n' % str(data))
--- a/tests/test-debugbuilddag.t	Fri Mar 02 14:11:06 2012 -0600
+++ b/tests/test-debugbuilddag.t	Fri Mar 02 11:46:18 2012 -0300
@@ -86,18 +86,19 @@
   o  0: r0 [] @ 0.00
   
 
-overwritten files
+overwritten files, starting on a non-default branch
 
   $ rm -r .hg
   $ hg init
-  $ hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' -q -o
+  $ hg debugbuilddag '@start.@default.:f +3:p2 @temp <f+4 @default /p2 +2' -q -o
 tags
   $ cat .hg/localtags
-  2a8ed67d317e370eac733dccc501b12d7b9c441a f
-  4226a30965b7af58f94d0cda7e6c2c9c63e6bf90 p2
+  f778700ebd50fcf282b23a4446bd155da6453eb6 f
+  bbccf169769006e2490efd2a02f11c3d38d462bd p2
 dag
   $ hg debugdag -t -b
-  +2:f
+  @start+1
+  @default+1:f
   +3:p2
   @temp*f+3
   @default*/p2+2:tip
@@ -128,7 +129,7 @@
   |/
   o  1: r1 [] @ 1.00
   |
-  o  0: r0 [] @ 0.00
+  o  0: r0 [start] @ 0.00
   
 glog of
   $ hg glog --template '{rev}: {desc} [{branches}]\n' of
@@ -154,13 +155,13 @@
   |/
   o  1: r1 []
   |
-  o  0: r0 []
+  o  0: r0 [start]
   
 tags
   $ hg tags -v
-  tip                               11:58a51e5eb988
-  p2                                 4:4226a30965b7 local
-  f                                  1:2a8ed67d317e local
+  tip                               11:9ffe238a67a2
+  p2                                 4:bbccf1697690 local
+  f                                  1:f778700ebd50 local
 cat of
   $ hg cat of --rev tip
   r11