##// END OF EJS Templates
hgk: don't honor whitespace and format-changing diffopts...
Siddharth Agarwal -
r23451:5fb1fc2e default
parent child Browse files
Show More
@@ -95,8 +95,10 b' def difftree(ui, repo, node1=None, node2'
95 if opts['pretty']:
95 if opts['pretty']:
96 catcommit(ui, repo, node2, "")
96 catcommit(ui, repo, node2, "")
97 m = scmutil.match(repo[node1], files)
97 m = scmutil.match(repo[node1], files)
98 diffopts = patch.difffeatureopts(ui)
99 diffopts.git = True
98 chunks = patch.diff(repo, node1, node2, match=m,
100 chunks = patch.diff(repo, node1, node2, match=m,
99 opts=patch.diffopts(ui, {'git': True}))
101 opts=diffopts)
100 for chunk in chunks:
102 for chunk in chunks:
101 ui.write(chunk)
103 ui.write(chunk)
102 else:
104 else:
@@ -16,5 +16,32 b' Minimal hgk check'
16 phase draft
16 phase draft
17
17
18 adda
18 adda
19 $ echo b > b
20 $ hg ci -Am addb
21 adding b
22 $ hg log -T '{node}\n'
23 102a90ea7b4a3361e4082ed620918c261189a36a
24 07f4944404050f47db2e5c5071e0e84e7a27bba9
25
26 $ hg debug-diff-tree 07f494440405 102a90ea7b4a
27 :000000 100664 000000000000 1e88685f5dde N b b
28 $ hg debug-diff-tree 07f494440405 102a90ea7b4a --patch
29 diff --git a/b b/b
30 new file mode 100644
31 --- /dev/null
32 +++ b/b
33 @@ -0,0 +1,1 @@
34 +b
35
36 Ensure that diff-tree output isn't affected by diffopts
37 $ hg --config diff.noprefix=True debug-diff-tree 07f494440405 102a90ea7b4a
38 :000000 100664 000000000000 1e88685f5dde N b b
39 $ hg --config diff.noprefix=True debug-diff-tree --patch 07f494440405 102a90ea7b4a
40 diff --git a/b b/b
41 new file mode 100644
42 --- /dev/null
43 +++ b/b
44 @@ -0,0 +1,1 @@
45 +b
19
46
20 $ cd ..
47 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now