##// END OF EJS Templates
fix traceback of extdiff after a merge...
Benoit Boissinot -
r3330:49966b5a default
parent child Browse files
Show More
@@ -65,6 +65,9 b' def dodiff(ui, repo, diffcmd, diffopts, '
65 ui.write_err(_('making snapshot of %d files from rev %s\n') %
65 ui.write_err(_('making snapshot of %d files from rev %s\n') %
66 (len(files), short(node)))
66 (len(files), short(node)))
67 for fn in files:
67 for fn in files:
68 if not fn in mf:
69 # skipping new file after a merge ?
70 continue
68 wfn = util.pconvert(fn)
71 wfn = util.pconvert(fn)
69 ui.note(' %s\n' % wfn)
72 ui.note(' %s\n' % wfn)
70 dest = os.path.join(base, wfn)
73 dest = os.path.join(base, wfn)
@@ -26,4 +26,13 b" hg ci -d '0 0' -mtest1"
26 echo b >> a
26 echo b >> a
27 hg ci -d '1 0' -mtest2
27 hg ci -d '1 0' -mtest2
28
28
29 hg falabala -r 0:1 || echo "diff-like tools yield a non-zero exit code"
29 hg falabala -r 0:1
30
31 # test diff during merge
32 hg update 0
33 echo b >> b
34 hg add b
35 hg ci -m "new branch" -d '1 0'
36 hg update -C 1
37 hg merge tip
38 hg falabala || echo "diff-like tools yield a non-zero exit code"
@@ -29,4 +29,11 b' options:'
29 making snapshot of 1 files from rev e27a2475d60a
29 making snapshot of 1 files from rev e27a2475d60a
30 making snapshot of 1 files from rev 5e49ec8d3f05
30 making snapshot of 1 files from rev 5e49ec8d3f05
31 diffing a.e27a2475d60a a.5e49ec8d3f05
31 diffing a.e27a2475d60a a.5e49ec8d3f05
32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 (branch merge, don't forget to commit)
36 making snapshot of 1 files from rev 5e49ec8d3f05
37 making snapshot of 1 files from working dir
38 diffing a.5e49ec8d3f05 a
32 diff-like tools yield a non-zero exit code
39 diff-like tools yield a non-zero exit code
@@ -23,6 +23,8 b' hg commit -m "commit #2" -d "1000000 0"'
23 echo This is file b1 > b
23 echo This is file b1 > b
24 echo %% no merges expected
24 echo %% no merges expected
25 env HGMERGE=../merge hg merge 1
25 env HGMERGE=../merge hg merge 1
26 hg diff --nodates
27 hg status
26 cd ..; /bin/rm -rf t
28 cd ..; /bin/rm -rf t
27
29
28 mkdir t
30 mkdir t
@@ -44,6 +46,8 b' echo %% merge should fail'
44 env HGMERGE=../merge hg merge 1
46 env HGMERGE=../merge hg merge 1
45 echo %% merge of b expected
47 echo %% merge of b expected
46 env HGMERGE=../merge hg merge -f 1
48 env HGMERGE=../merge hg merge -f 1
49 hg diff --nodates
50 hg status
47 cd ..; /bin/rm -rf t
51 cd ..; /bin/rm -rf t
48 echo %%
52 echo %%
49
53
@@ -71,6 +75,8 b' echo %% merge fails'
71 env HGMERGE=../merge hg merge 2
75 env HGMERGE=../merge hg merge 2
72 echo %% merge expected!
76 echo %% merge expected!
73 env HGMERGE=../merge hg merge -f 2
77 env HGMERGE=../merge hg merge -f 2
78 hg diff --nodates
79 hg status
74 cd ..; /bin/rm -rf t
80 cd ..; /bin/rm -rf t
75
81
76 mkdir t
82 mkdir t
@@ -93,4 +99,6 b' echo %% merge of b should fail'
93 env HGMERGE=../merge hg merge 2
99 env HGMERGE=../merge hg merge 2
94 echo %% merge of b expected
100 echo %% merge of b expected
95 env HGMERGE=../merge hg merge -f 2
101 env HGMERGE=../merge hg merge -f 2
102 hg diff --nodates
103 hg status
96 cd ..; /bin/rm -rf t
104 cd ..; /bin/rm -rf t
@@ -4,6 +4,12 b' merging for b'
4 merging b
4 merging b
5 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
5 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
6 (branch merge, don't forget to commit)
6 (branch merge, don't forget to commit)
7 diff -r d9e5953b9dec b
8 --- /dev/null
9 +++ b/b
10 @@ -0,0 +1,1 @@
11 +This is file b1
12 M b
7 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
13 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
8 %% merge should fail
14 %% merge should fail
9 abort: 'b' already exists in the working dir and differs from remote
15 abort: 'b' already exists in the working dir and differs from remote
@@ -12,6 +18,12 b' merging for b'
12 merging b
18 merging b
13 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
19 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
14 (branch merge, don't forget to commit)
20 (branch merge, don't forget to commit)
21 diff -r d9e5953b9dec b
22 --- /dev/null
23 +++ b/b
24 @@ -0,0 +1,1 @@
25 +This is file b2
26 M b
15 %%
27 %%
16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 Contents of b should be "this is file b1"
29 Contents of b should be "this is file b1"
@@ -23,6 +35,13 b' merging for b'
23 merging b
35 merging b
24 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
36 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
25 (branch merge, don't forget to commit)
37 (branch merge, don't forget to commit)
38 diff -r c1dd73cbf59f b
39 --- a/b
40 +++ b/b
41 @@ -1,1 +1,1 @@ This is file b1
42 -This is file b1
43 +This is file b22
44 M b
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 %% merge of b should fail
46 %% merge of b should fail
28 abort: outstanding uncommitted changes
47 abort: outstanding uncommitted changes
@@ -31,3 +50,10 b' merging for b'
31 merging b
50 merging b
32 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
51 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
33 (branch merge, don't forget to commit)
52 (branch merge, don't forget to commit)
53 diff -r c1dd73cbf59f b
54 --- a/b
55 +++ b/b
56 @@ -1,1 +1,1 @@ This is file b1
57 -This is file b1
58 +This is file b33
59 M b
General Comments 0
You need to be logged in to leave comments. Login now