##// END OF EJS Templates
use short hashes with diff -v
Alexis S. L. Carvalho -
r3387:2065789f default
parent child Browse files
Show More
@@ -0,0 +1,26 b''
1 #!/bin/sh
2
3 hg init a
4 cd a
5 echo bar > foo
6 hg add foo
7 hg ci -m 'add foo' -d '1000000 0'
8
9 echo foobar > foo
10 hg ci -m 'change foo' -d '1000001 0'
11
12 echo 'quiet:'
13 hg --quiet diff -r 0 -r 1
14 echo
15
16 echo 'normal:'
17 hg diff -r 0 -r 1
18 echo
19
20 echo 'verbose:'
21 hg --verbose diff -r 0 -r 1
22 echo
23
24 echo 'debug:'
25 hg --debug diff -r 0 -r 1
26 echo
@@ -0,0 +1,31 b''
1 quiet:
2 --- a/foo Mon Jan 12 13:46:40 1970 +0000
3 +++ b/foo Mon Jan 12 13:46:41 1970 +0000
4 @@ -1,1 +1,1 @@ bar
5 -bar
6 +foobar
7
8 normal:
9 diff -r 74de3f1392e2 -r b8b5f023a6ad foo
10 --- a/foo Mon Jan 12 13:46:40 1970 +0000
11 +++ b/foo Mon Jan 12 13:46:41 1970 +0000
12 @@ -1,1 +1,1 @@ bar
13 -bar
14 +foobar
15
16 verbose:
17 diff -r 74de3f1392e2 -r b8b5f023a6ad foo
18 --- a/foo Mon Jan 12 13:46:40 1970 +0000
19 +++ b/foo Mon Jan 12 13:46:41 1970 +0000
20 @@ -1,1 +1,1 @@ bar
21 -bar
22 +foobar
23
24 debug:
25 diff -r 74de3f1392e2d67856fb155963441f2610494e1a -r b8b5f023a6ad77fc378bd95cf3fa00cd1414d107 foo
26 --- a/foo Mon Jan 12 13:46:40 1970 +0000
27 +++ b/foo Mon Jan 12 13:46:41 1970 +0000
28 @@ -1,1 +1,1 @@ bar
29 -bar
30 +foobar
31
@@ -526,7 +526,7 b' def diff(repo, node1=None, node2=None, f'
526 526 if repo.ui.quiet:
527 527 r = None
528 528 else:
529 hexfunc = repo.ui.verbose and hex or short
529 hexfunc = repo.ui.debugflag and hex or short
530 530 r = [hexfunc(node) for node in [node1, node2] if node]
531 531
532 532 if opts.git:
General Comments 0
You need to be logged in to leave comments. Login now