##// END OF EJS Templates
Only show long hashes with --debug, not --verbose
Matt Mackall -
r2966:fb493241 default
parent child Browse files
Show More
@@ -403,17 +403,15 b' class changeset_printer(object):'
403 changes = log.read(changenode)
403 changes = log.read(changenode)
404 date = util.datestr(changes[2])
404 date = util.datestr(changes[2])
405
405
406 parents = [(log.rev(p), self.ui.verbose and hex(p) or short(p))
406 hexfunc = self.ui.debugflag and hex or short
407 for p in log.parents(changenode)
407
408 parents = [(log.rev(p), hexfunc(p)) for p in log.parents(changenode)
408 if self.ui.debugflag or p != nullid]
409 if self.ui.debugflag or p != nullid]
409 if (not self.ui.debugflag and len(parents) == 1 and
410 if (not self.ui.debugflag and len(parents) == 1 and
410 parents[0][0] == rev-1):
411 parents[0][0] == rev-1):
411 parents = []
412 parents = []
412
413
413 if self.ui.verbose:
414 self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode)))
414 self.ui.write(_("changeset: %d:%s\n") % (rev, hex(changenode)))
415 else:
416 self.ui.write(_("changeset: %d:%s\n") % (rev, short(changenode)))
417
415
418 for tag in self.repo.nodetags(changenode):
416 for tag in self.repo.nodetags(changenode):
419 self.ui.status(_("tag: %s\n") % tag)
417 self.ui.status(_("tag: %s\n") % tag)
@@ -1610,7 +1608,7 b' def identify(ui, repo):'
1610 ui.write(_("unknown\n"))
1608 ui.write(_("unknown\n"))
1611 return
1609 return
1612
1610
1613 hexfunc = ui.verbose and hex or short
1611 hexfunc = ui.debugflag and hex or short
1614 modified, added, removed, deleted = repo.status()[:4]
1612 modified, added, removed, deleted = repo.status()[:4]
1615 output = ["%s%s" %
1613 output = ["%s%s" %
1616 ('+'.join([hexfunc(parent) for parent in parents]),
1614 ('+'.join([hexfunc(parent) for parent in parents]),
@@ -2618,9 +2616,10 b' def tags(ui, repo):'
2618
2616
2619 l = repo.tagslist()
2617 l = repo.tagslist()
2620 l.reverse()
2618 l.reverse()
2619 hexfunc = ui.debugflag and hex or short
2621 for t, n in l:
2620 for t, n in l:
2622 try:
2621 try:
2623 r = "%5d:%s" % (repo.changelog.rev(n), hex(n))
2622 r = "%5d:%s" % (repo.changelog.rev(n), hexfunc(n))
2624 except KeyError:
2623 except KeyError:
2625 r = " ?:?"
2624 r = " ?:?"
2626 if ui.quiet:
2625 if ui.quiet:
@@ -1,4 +1,20 b''
1 # default style is like normal output
1 # default style is like normal output
2 1c1
3 < changeset: 3:10e46f2dcbf4
4 ---
5 > changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
6 10c10
7 < changeset: 2:97054abb4ab8
8 ---
9 > changeset: 2:97054abb4ab824450e9164180baf491ae0078465
10 18c18
11 < changeset: 1:b608e9d1a3f0
12 ---
13 > changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
14 29c29
15 < changeset: 0:1e4e1b8f71e0
16 ---
17 > changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2 18a19
18 18a19
3 > files:
19 > files:
4 29a31
20 29a31
@@ -2,7 +2,7 b' A b'
2 b
2 b
3 b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
3 b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
4 we should see two history entries
4 we should see two history entries
5 changeset: 1:386a3cc01532710ca78aed9a54fa2f459c04f29c
5 changeset: 1:386a3cc01532
6 tag: tip
6 tag: tip
7 user: test
7 user: test
8 date: Mon Jan 12 13:46:40 1970 +0000
8 date: Mon Jan 12 13:46:40 1970 +0000
@@ -11,7 +11,7 b' description:'
11 2
11 2
12
12
13
13
14 changeset: 0:33aaa84a386bd609094aeb21a97c09436c482ef1
14 changeset: 0:33aaa84a386b
15 user: test
15 user: test
16 date: Mon Jan 12 13:46:40 1970 +0000
16 date: Mon Jan 12 13:46:40 1970 +0000
17 files: a
17 files: a
@@ -31,10 +31,10 b' main: we should have a merge here'
31 2 150 71 2 2 a6aef98656b7 c36078bec30d 000000000000
31 2 150 71 2 2 a6aef98656b7 c36078bec30d 000000000000
32 3 221 72 3 3 0c2cc6fc80e2 182b283965f1 a6aef98656b7
32 3 221 72 3 3 0c2cc6fc80e2 182b283965f1 a6aef98656b7
33 log should show foo and quux changed
33 log should show foo and quux changed
34 changeset: 3:0c2cc6fc80e2d4ee289bb658dbbe9ad932380fe9
34 changeset: 3:0c2cc6fc80e2
35 tag: tip
35 tag: tip
36 parent: 1:182b283965f1069c0112784e30e7755ad1c0dd52
36 parent: 1:182b283965f1
37 parent: 2:a6aef98656b71154cae9d87408abe6d0218c8045
37 parent: 2:a6aef98656b7
38 user: test
38 user: test
39 date: Mon Jan 12 13:46:40 1970 +0000
39 date: Mon Jan 12 13:46:40 1970 +0000
40 files: foo quux
40 files: foo quux
@@ -47,7 +47,7 b' 0:b6c483daf290'
47 0:8580ff50825a
47 0:8580ff50825a
48 1:b6c483daf290
48 1:b6c483daf290
49 %% -v/--verbose
49 %% -v/--verbose
50 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
50 changeset: 1:b6c483daf290
51 tag: tip
51 tag: tip
52 user: test
52 user: test
53 date: Thu Jan 01 00:00:01 1970 +0000
53 date: Thu Jan 01 00:00:01 1970 +0000
@@ -56,7 +56,7 b' description:'
56 b
56 b
57
57
58
58
59 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
59 changeset: 0:8580ff50825a
60 user: test
60 user: test
61 date: Thu Jan 01 00:00:01 1970 +0000
61 date: Thu Jan 01 00:00:01 1970 +0000
62 files: a
62 files: a
@@ -64,7 +64,7 b' description:'
64 a
64 a
65
65
66
66
67 changeset: 0:b6c483daf2907ce5825c0bb50f5716226281cc1a
67 changeset: 0:b6c483daf290
68 tag: tip
68 tag: tip
69 user: test
69 user: test
70 date: Thu Jan 01 00:00:01 1970 +0000
70 date: Thu Jan 01 00:00:01 1970 +0000
@@ -34,7 +34,7 b' date: Thu Jan 01 00:00:01 1970 +0'
34 summary: a
34 summary: a
35
35
36 % one rename
36 % one rename
37 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
37 changeset: 0:8580ff50825a
38 user: test
38 user: test
39 date: Thu Jan 01 00:00:01 1970 +0000
39 date: Thu Jan 01 00:00:01 1970 +0000
40 files: a
40 files: a
@@ -43,7 +43,7 b' a'
43
43
44
44
45 % many renames
45 % many renames
46 changeset: 4:8c1c8408f7371319750ea2d4fa7969828effbcf4
46 changeset: 4:8c1c8408f737
47 tag: tip
47 tag: tip
48 user: test
48 user: test
49 date: Thu Jan 01 00:00:05 1970 +0000
49 date: Thu Jan 01 00:00:05 1970 +0000
@@ -52,7 +52,7 b' description:'
52 e
52 e
53
53
54
54
55 changeset: 2:21fba396af4c801f9717de6c415b6cc9620437e8
55 changeset: 2:21fba396af4c
56 user: test
56 user: test
57 date: Thu Jan 01 00:00:03 1970 +0000
57 date: Thu Jan 01 00:00:03 1970 +0000
58 files: b dir/b
58 files: b dir/b
@@ -60,7 +60,7 b' description:'
60 c
60 c
61
61
62
62
63 changeset: 1:c0296dabce9bf0cd3fdd608de26693c91cd6bbf4
63 changeset: 1:c0296dabce9b
64 user: test
64 user: test
65 date: Thu Jan 01 00:00:02 1970 +0000
65 date: Thu Jan 01 00:00:02 1970 +0000
66 files: b
66 files: b
@@ -68,7 +68,7 b' description:'
68 b
68 b
69
69
70
70
71 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
71 changeset: 0:8580ff50825a
72 user: test
72 user: test
73 date: Thu Jan 01 00:00:01 1970 +0000
73 date: Thu Jan 01 00:00:01 1970 +0000
74 files: a
74 files: a
@@ -9,7 +9,7 b' hg add a'
9 hg commit -m "test" -d "1000000 0"
9 hg commit -m "test" -d "1000000 0"
10 hg co
10 hg co
11 hg identify
11 hg identify
12 T=`hg tip -v | head -n 1 | cut -d : -f 3`
12 T=`hg tip --debug | head -n 1 | cut -d : -f 3`
13 echo "$T first" > .hgtags
13 echo "$T first" > .hgtags
14 cat .hgtags
14 cat .hgtags
15 hg add .hgtags
15 hg add .hgtags
@@ -2,22 +2,22 b' unknown'
2 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 0acdaf898367 tip
3 0acdaf898367 tip
4 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 first
4 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 first
5 tip 1:8a3ca90d111dc784e6575d373105be12570e8776
5 tip 1:8a3ca90d111d
6 first 0:0acdaf8983679e0aac16e811534eb49d7ee1f2b4
6 first 0:0acdaf898367
7 8a3ca90d111d tip
7 8a3ca90d111d tip
8 M a
8 M a
9 8a3ca90d111d+ tip
9 8a3ca90d111d+ tip
10 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
10 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11 0acdaf898367+ first
11 0acdaf898367+ first
12 0acdaf8983679e0aac16e811534eb49d7ee1f2b4+ first
12 0acdaf898367+ first
13 M a
13 M a
14 8216907a933d tip
14 8216907a933d tip
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 (branch merge, don't forget to commit)
16 (branch merge, don't forget to commit)
17 8216907a933d+8a3ca90d111d+ tip
17 8216907a933d+8a3ca90d111d+ tip
18 M .hgtags
18 M .hgtags
19 tip 6:c6af9d771a81bb9c7f267ec03491224a9f8ba1cd
19 tip 6:c6af9d771a81
20 first 0:0acdaf8983679e0aac16e811534eb49d7ee1f2b4
20 first 0:0acdaf898367
21 .hgtags (rev 7:39bba1bbbc4c), line 2: cannot parse entry
21 .hgtags (rev 7:39bba1bbbc4c), line 2: cannot parse entry
22 .hgtags (rev 7:39bba1bbbc4c), line 4: node 'foo' is not well formed
22 .hgtags (rev 7:39bba1bbbc4c), line 4: node 'foo' is not well formed
23 localtags, line 1: tag 'invalid' refers to unknown node
23 localtags, line 1: tag 'invalid' refers to unknown node
@@ -26,8 +26,8 b' 1 files updated, 0 files merged, 0 files'
26 .hgtags (rev 7:39bba1bbbc4c), line 4: node 'foo' is not well formed
26 .hgtags (rev 7:39bba1bbbc4c), line 4: node 'foo' is not well formed
27 .hgtags (rev 8:4ca6f1b1a68c), line 2: node 'x' is not well formed
27 .hgtags (rev 8:4ca6f1b1a68c), line 2: node 'x' is not well formed
28 localtags, line 1: tag 'invalid' refers to unknown node
28 localtags, line 1: tag 'invalid' refers to unknown node
29 tip 8:4ca6f1b1a68c77be687a03aaeb1614671ba59b20
29 tip 8:4ca6f1b1a68c
30 first 0:0acdaf8983679e0aac16e811534eb49d7ee1f2b4
30 first 0:0acdaf898367
31 changeset: 8:4ca6f1b1a68c
31 changeset: 8:4ca6f1b1a68c
32 .hgtags (rev 7:39bba1bbbc4c), line 2: cannot parse entry
32 .hgtags (rev 7:39bba1bbbc4c), line 2: cannot parse entry
33 .hgtags (rev 7:39bba1bbbc4c), line 4: node 'foo' is not well formed
33 .hgtags (rev 7:39bba1bbbc4c), line 4: node 'foo' is not well formed
@@ -64,7 +64,7 b' user: test'
64 date: Mon Jan 12 13:46:40 1970 +0000
64 date: Mon Jan 12 13:46:40 1970 +0000
65 summary: 2
65 summary: 2
66
66
67 changeset: 1:802f095af299cde27a85b2f056aef3829870956c
67 changeset: 1:802f095af299
68 tag: tip
68 tag: tip
69 user: test
69 user: test
70 date: Mon Jan 12 13:46:40 1970 +0000
70 date: Mon Jan 12 13:46:40 1970 +0000
@@ -73,7 +73,7 b' description:'
73 2
73 2
74
74
75
75
76 changeset: 0:33aaa84a386bd609094aeb21a97c09436c482ef1
76 changeset: 0:33aaa84a386b
77 user: test
77 user: test
78 date: Mon Jan 12 13:46:40 1970 +0000
78 date: Mon Jan 12 13:46:40 1970 +0000
79 files: a
79 files: a
General Comments 0
You need to be logged in to leave comments. Login now