##// END OF EJS Templates
debugdirstate: deprecate --nodates in favor of --no-dates...
Martin von Zweigbergk -
r39796:7e99b027 default
parent child Browse files
Show More
@@ -733,13 +733,16 b' def debugdeltachain(ui, repo, file_=None'
733 fm.end()
733 fm.end()
734
734
735 @command('debugdirstate|debugstate',
735 @command('debugdirstate|debugstate',
736 [('', 'nodates', None, _('do not display the saved mtime')),
736 [('', 'nodates', None, _('do not display the saved mtime (DEPRECATED)')),
737 ('', 'datesort', None, _('sort by saved mtime'))],
737 ('', 'dates', True, _('display the saved mtime')),
738 ('', 'datesort', None, _('sort by saved mtime'))],
738 _('[OPTION]...'))
739 _('[OPTION]...'))
739 def debugstate(ui, repo, **opts):
740 def debugstate(ui, repo, **opts):
740 """show the contents of the current dirstate"""
741 """show the contents of the current dirstate"""
741
742
742 nodates = opts.get(r'nodates')
743 nodates = not opts[r'dates']
744 if opts.get(r'nodates') is not None:
745 nodates = True
743 datesort = opts.get(r'datesort')
746 datesort = opts.get(r'datesort')
744
747
745 timestr = ""
748 timestr = ""
@@ -144,7 +144,7 b' transaction: in-memory dirstate changes '
144 $ touch -t 200001010000 c
144 $ touch -t 200001010000 c
145 $ hg status -A
145 $ hg status -A
146 C c
146 C c
147 $ hg debugstate --nodates
147 $ hg debugstate --no-dates
148 n 644 12 set c
148 n 644 12 set c
149 $ hg backout -d '6 0' -m 'to be rollback-ed soon' -r .
149 $ hg backout -d '6 0' -m 'to be rollback-ed soon' -r .
150 removing c
150 removing c
@@ -154,7 +154,7 b' transaction: in-memory dirstate changes '
154 $ hg status -A
154 $ hg status -A
155 A b
155 A b
156 R c
156 R c
157 $ hg debugstate --nodates
157 $ hg debugstate --no-dates
158 a 0 -1 unset b
158 a 0 -1 unset b
159 r 0 0 set c
159 r 0 0 set c
160
160
@@ -271,7 +271,7 b' Show all commands + options'
271 debugdata: changelog, manifest, dir
271 debugdata: changelog, manifest, dir
272 debugdate: extended
272 debugdate: extended
273 debugdeltachain: changelog, manifest, dir, template
273 debugdeltachain: changelog, manifest, dir, template
274 debugdirstate: nodates, datesort
274 debugdirstate: nodates, dates, datesort
275 debugdiscovery: old, nonheads, rev, ssh, remotecmd, insecure
275 debugdiscovery: old, nonheads, rev, ssh, remotecmd, insecure
276 debugdownload: output
276 debugdownload: output
277 debugextensions: template
277 debugextensions: template
@@ -41,7 +41,7 b' Creating branch b:'
41
41
42 We shouldn't have anything but n state here:
42 We shouldn't have anything but n state here:
43
43
44 $ hg debugstate --nodates | grep -v "^n"
44 $ hg debugstate --no-dates | grep -v "^n"
45 [1]
45 [1]
46
46
47 Merging:
47 Merging:
@@ -412,7 +412,7 b' Test a linear merge to a revision contai'
412 $ hg update -q 5
412 $ hg update -q 5
413 remote turned local largefile large2 into a normal file
413 remote turned local largefile large2 into a normal file
414 keep (l)argefile or use (n)ormal file? l
414 keep (l)argefile or use (n)ormal file? l
415 $ hg debugdirstate --nodates | grep large2
415 $ hg debugdirstate --no-dates | grep large2
416 a 0 -1 unset .hglf/large2
416 a 0 -1 unset .hglf/large2
417 r 0 0 set large2
417 r 0 0 set large2
418 $ hg status -A large2
418 $ hg status -A large2
@@ -428,7 +428,7 b' Test a linear merge to a revision contai'
428 $ hg update -q 5
428 $ hg update -q 5
429 remote turned local largefile large3 into a normal file
429 remote turned local largefile large3 into a normal file
430 keep (l)argefile or use (n)ormal file? l
430 keep (l)argefile or use (n)ormal file? l
431 $ hg debugdirstate --nodates | grep large3
431 $ hg debugdirstate --no-dates | grep large3
432 a 0 -1 unset .hglf/large3
432 a 0 -1 unset .hglf/large3
433 r 0 0 set large3
433 r 0 0 set large3
434 $ hg status -A large3
434 $ hg status -A large3
@@ -43,12 +43,12 b' Test status and dirstate of largefiles a'
43 $ touch large1 sub/large2
43 $ touch large1 sub/large2
44 $ sleep 1
44 $ sleep 1
45 $ hg st
45 $ hg st
46 $ hg debugstate --nodates
46 $ hg debugstate --no-dates
47 n 644 41 set .hglf/large1
47 n 644 41 set .hglf/large1
48 n 644 41 set .hglf/sub/large2
48 n 644 41 set .hglf/sub/large2
49 n 644 8 set normal1
49 n 644 8 set normal1
50 n 644 8 set sub/normal2
50 n 644 8 set sub/normal2
51 $ hg debugstate --large --nodates
51 $ hg debugstate --large --no-dates
52 n 644 7 set large1
52 n 644 7 set large1
53 n 644 7 set sub/large2
53 n 644 7 set sub/large2
54 $ echo normal11 > normal1
54 $ echo normal11 > normal1
@@ -20,7 +20,7 b''
20 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
20 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
21 (branch merge, don't forget to commit)
21 (branch merge, don't forget to commit)
22
22
23 $ hg debugstate --nodates
23 $ hg debugstate --no-dates
24 m 0 -2 unset bar
24 m 0 -2 unset bar
25 m 0 -2 unset foo1
25 m 0 -2 unset foo1
26 copy: foo -> foo1
26 copy: foo -> foo1
@@ -36,7 +36,7 b' Removing foo1 and bar:'
36 $ cp bar B
36 $ cp bar B
37 $ hg rm -f foo1 bar
37 $ hg rm -f foo1 bar
38
38
39 $ hg debugstate --nodates
39 $ hg debugstate --no-dates
40 r 0 -1 set bar
40 r 0 -1 set bar
41 r 0 -1 set foo1
41 r 0 -1 set foo1
42 copy: foo -> foo1
42 copy: foo -> foo1
@@ -54,7 +54,7 b' Re-adding foo1 and bar:'
54 adding bar
54 adding bar
55 adding foo1
55 adding foo1
56
56
57 $ hg debugstate --nodates
57 $ hg debugstate --no-dates
58 n 0 -2 unset bar
58 n 0 -2 unset bar
59 n 0 -2 unset foo1
59 n 0 -2 unset foo1
60 copy: foo -> foo1
60 copy: foo -> foo1
@@ -73,7 +73,7 b' Reverting foo1 and bar:'
73 reverting bar
73 reverting bar
74 reverting foo1
74 reverting foo1
75
75
76 $ hg debugstate --nodates
76 $ hg debugstate --no-dates
77 n 0 -2 unset bar
77 n 0 -2 unset bar
78 n 0 -2 unset foo1
78 n 0 -2 unset foo1
79 copy: foo -> foo1
79 copy: foo -> foo1
@@ -103,5 +103,5 b" dirstate file, and therefore we'll be ab"
103 debugdirstate. If we don't do this, the test can be slightly flaky.
103 debugdirstate. If we don't do this, the test can be slightly flaky.
104 $ sleep 3
104 $ sleep 3
105 $ hg status
105 $ hg status
106 $ hg debugdirstate --nodates
106 $ hg debugdirstate --no-dates
107 n 644 10 set inside/f1
107 n 644 10 set inside/f1
@@ -47,14 +47,14 b' basic test for hg debugrebuildstate'
47
47
48 state dump after
48 state dump after
49
49
50 $ hg debugstate --nodates | sort
50 $ hg debugstate --no-dates | sort
51 n 0 -1 unset bar
51 n 0 -1 unset bar
52 n 0 -1 unset foo
52 n 0 -1 unset foo
53
53
54 $ hg debugadddrop --normal-lookup file1 file2
54 $ hg debugadddrop --normal-lookup file1 file2
55 $ hg debugadddrop --drop bar
55 $ hg debugadddrop --drop bar
56 $ hg debugadddrop --drop
56 $ hg debugadddrop --drop
57 $ hg debugstate --nodates
57 $ hg debugstate --no-dates
58 n 0 -1 unset file1
58 n 0 -1 unset file1
59 n 0 -1 unset file2
59 n 0 -1 unset file2
60 n 0 -1 unset foo
60 n 0 -1 unset foo
@@ -78,13 +78,13 b' but in the dirstate'
78 ? baz
78 ? baz
79 C foo
79 C foo
80 $ hg debugadddrop --normal-lookup baz
80 $ hg debugadddrop --normal-lookup baz
81 $ hg debugdirstate --nodates
81 $ hg debugdirstate --no-dates
82 r 0 0 * bar (glob)
82 r 0 0 * bar (glob)
83 n 0 -1 * baz (glob)
83 n 0 -1 * baz (glob)
84 n 644 0 * foo (glob)
84 n 644 0 * foo (glob)
85 a 0 -1 * qux (glob)
85 a 0 -1 * qux (glob)
86 $ hg debugrebuilddirstate --minimal
86 $ hg debugrebuilddirstate --minimal
87 $ hg debugdirstate --nodates
87 $ hg debugdirstate --no-dates
88 r 0 0 * bar (glob)
88 r 0 0 * bar (glob)
89 n 644 0 * foo (glob)
89 n 644 0 * foo (glob)
90 a 0 -1 * qux (glob)
90 a 0 -1 * qux (glob)
@@ -104,16 +104,16 b' dirstate'
104 R bar
104 R bar
105 ? baz
105 ? baz
106 C foo
106 C foo
107 $ hg debugdirstate --nodates
107 $ hg debugdirstate --no-dates
108 r 0 0 * bar (glob)
108 r 0 0 * bar (glob)
109 n 644 0 * foo (glob)
109 n 644 0 * foo (glob)
110 a 0 -1 * qux (glob)
110 a 0 -1 * qux (glob)
111 $ hg debugadddrop --drop foo
111 $ hg debugadddrop --drop foo
112 $ hg debugdirstate --nodates
112 $ hg debugdirstate --no-dates
113 r 0 0 * bar (glob)
113 r 0 0 * bar (glob)
114 a 0 -1 * qux (glob)
114 a 0 -1 * qux (glob)
115 $ hg debugrebuilddirstate --minimal
115 $ hg debugrebuilddirstate --minimal
116 $ hg debugdirstate --nodates
116 $ hg debugdirstate --no-dates
117 r 0 0 * bar (glob)
117 r 0 0 * bar (glob)
118 n 0 -1 * foo (glob)
118 n 0 -1 * foo (glob)
119 a 0 -1 * qux (glob)
119 a 0 -1 * qux (glob)
@@ -385,10 +385,10 b' dirstate'
385 $ cp ../dirstateallexcluded .hg/dirstate
385 $ cp ../dirstateallexcluded .hg/dirstate
386 $ touch includedadded
386 $ touch includedadded
387 $ hg add includedadded
387 $ hg add includedadded
388 $ hg debugdirstate --nodates
388 $ hg debugdirstate --no-dates
389 a 0 -1 unset includedadded
389 a 0 -1 unset includedadded
390 $ hg debugrebuilddirstate --minimal
390 $ hg debugrebuilddirstate --minimal
391 $ hg debugdirstate --nodates
391 $ hg debugdirstate --no-dates
392 n 0 -1 unset included
392 n 0 -1 unset included
393 a 0 -1 * includedadded (glob)
393 a 0 -1 * includedadded (glob)
394
394
@@ -410,13 +410,13 b' manifest'
410 included
410 included
411 We have files in the dirstate that are included and excluded. Some are in the
411 We have files in the dirstate that are included and excluded. Some are in the
412 manifest and some are not.
412 manifest and some are not.
413 $ hg debugdirstate --nodates
413 $ hg debugdirstate --no-dates
414 n 644 0 * excluded (glob)
414 n 644 0 * excluded (glob)
415 a 0 -1 * excludednomanifest (glob)
415 a 0 -1 * excludednomanifest (glob)
416 n 644 0 * included (glob)
416 n 644 0 * included (glob)
417 a 0 -1 * includedadded (glob)
417 a 0 -1 * includedadded (glob)
418 $ hg debugrebuilddirstate --minimal
418 $ hg debugrebuilddirstate --minimal
419 $ hg debugdirstate --nodates
419 $ hg debugdirstate --no-dates
420 n 644 0 * included (glob)
420 n 644 0 * included (glob)
421 a 0 -1 * includedadded (glob)
421 a 0 -1 * includedadded (glob)
422
422
General Comments 0
You need to be logged in to leave comments. Login now