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