##// END OF EJS Templates
debugbuilddag: output progress information
Martin Geisler -
r14279:b039b667 default
parent child Browse files
Show More
@@ -1005,15 +1005,16 b' def debugbuilddag(ui, repo, text,'
1005 if len(cl) > 0:
1005 if len(cl) > 0:
1006 raise util.Abort(_('repository is not empty'))
1006 raise util.Abort(_('repository is not empty'))
1007
1007
1008 # determine number of revs in DAG
1009 total = 0
1010 for type, data in dagparser.parsedag(text):
1011 if type == 'n':
1012 total += 1
1013
1008 if mergeable_file:
1014 if mergeable_file:
1009 linesperrev = 2
1015 linesperrev = 2
1010 # determine number of revs in DAG
1011 n = 0
1012 for type, data in dagparser.parsedag(text):
1013 if type == 'n':
1014 n += 1
1015 # make a file with k lines per rev
1016 # make a file with k lines per rev
1016 initialmergedlines = [str(i) for i in xrange(0, n * linesperrev)]
1017 initialmergedlines = [str(i) for i in xrange(0, total * linesperrev)]
1017 initialmergedlines.append("")
1018 initialmergedlines.append("")
1018
1019
1019 tags = []
1020 tags = []
@@ -1024,6 +1025,7 b' def debugbuilddag(ui, repo, text,'
1024 at = -1
1025 at = -1
1025 atbranch = 'default'
1026 atbranch = 'default'
1026 nodeids = []
1027 nodeids = []
1028 ui.progress(_('building'), 0, unit=_('revisions'), total=total)
1027 for type, data in dagparser.parsedag(text):
1029 for type, data in dagparser.parsedag(text):
1028 if type == 'n':
1030 if type == 'n':
1029 ui.note('node %s\n' % str(data))
1031 ui.note('node %s\n' % str(data))
@@ -1092,8 +1094,10 b' def debugbuilddag(ui, repo, text,'
1092 elif type == 'a':
1094 elif type == 'a':
1093 ui.note('branch %s\n' % data)
1095 ui.note('branch %s\n' % data)
1094 atbranch = data
1096 atbranch = data
1097 ui.progress(_('building'), id, unit=_('revisions'), total=total)
1095 tr.close()
1098 tr.close()
1096 finally:
1099 finally:
1100 ui.progress(_('building'), None)
1097 tr.release()
1101 tr.release()
1098
1102
1099 if tags:
1103 if tags:
@@ -4,7 +4,48 b''
4 plain
4 plain
5
5
6 $ hg init
6 $ hg init
7 $ hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2'
7 $ hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' \
8 > --config extensions.progress= --config progress.assume-tty=1 \
9 > --config progress.delay=0 --config progress.refresh=0 \
10 > --config progress.width=60 2>&1 | \
11 > python $TESTDIR/filtercr.py
12
13 building [ ] 0/12
14 building [ ] 0/12
15 building [ ] 0/12
16 building [ ] 0/12
17 building [==> ] 1/12
18 building [==> ] 1/12
19 building [==> ] 1/12
20 building [==> ] 1/12
21 building [======> ] 2/12
22 building [======> ] 2/12
23 building [=========> ] 3/12
24 building [=========> ] 3/12
25 building [=============> ] 4/12
26 building [=============> ] 4/12
27 building [=============> ] 4/12
28 building [=============> ] 4/12
29 building [=============> ] 4/12
30 building [=============> ] 4/12
31 building [================> ] 5/12
32 building [================> ] 5/12
33 building [====================> ] 6/12
34 building [====================> ] 6/12
35 building [=======================> ] 7/12
36 building [=======================> ] 7/12
37 building [===========================> ] 8/12
38 building [===========================> ] 8/12
39 building [===========================> ] 8/12
40 building [===========================> ] 8/12
41 building [==============================> ] 9/12
42 building [==============================> ] 9/12
43 building [==================================> ] 10/12
44 building [==================================> ] 10/12
45 building [=====================================> ] 11/12
46 building [=====================================> ] 11/12
47 \r (esc)
48
8 tags
49 tags
9 $ cat .hg/localtags
50 $ cat .hg/localtags
10 66f7d451a68b85ed82ff5fcc254daf50c74144bd f
51 66f7d451a68b85ed82ff5fcc254daf50c74144bd f
General Comments 0
You need to be logged in to leave comments. Login now