[PATCH stable v2] debugbuilddag: fix starting a dag on a non-default branch
Wagner Bruna
wagner.bruna+mercurial at gmail.com
Fri Mar 2 14:49:54 UTC 2012
# HG changeset patch
# User Wagner Bruna <wbruna at softwareexpress.com.br>
# Date 1330699578 10800
# Branch stable
# Node ID 1a07597eddd0a2d73b98355ebfc6822d6da2d988
# Parent b2d6832db30668c74ef16cf8fb530ea1f6c50440
debugbuilddag: fix starting a dag on a non-default branch
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1381,7 +1381,8 @@ def debugbuilddag(ui, repo, text=None,
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))
diff --git a/tests/test-debugbuilddag.t b/tests/test-debugbuilddag.t
--- a/tests/test-debugbuilddag.t
+++ b/tests/test-debugbuilddag.t
@@ -86,18 +86,19 @@ glog
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. at 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 @@ glog
|/
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 @@ glog of
|/
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
More information about the Mercurial-devel
mailing list