##// END OF EJS Templates
copies: simplify the conditional for _filter's case 3...
marmoute -
r47128:1d6d1a15 default
parent child Browse files
Show More
@@ -59,14 +59,13 b' def _filter(src, dst, t):'
59 # Cases 1, 3, and 5 are then removed by _filter().
59 # Cases 1, 3, and 5 are then removed by _filter().
60
60
61 for k, v in list(t.items()):
61 for k, v in list(t.items()):
62 # remove copies from files that didn't exist
62 if k == v: # case 3
63 if v not in src: # case 5
64 del t[k]
63 del t[k]
65 # remove criss-crossed copies
64 elif v not in src: # case 5
66 elif k in src and v in dst:
65 # remove copies from files that didn't exist
67 del t[k]
66 del t[k]
67 elif k not in dst: # case 1
68 # remove copies to files that were then removed
68 # remove copies to files that were then removed
69 elif k not in dst: # case 1
70 del t[k]
69 del t[k]
71
70
72
71
@@ -93,8 +93,8 b' Copy a file onto another file'
93 x y
93 x y
94 $ hg debugp1copies -r 1
94 $ hg debugp1copies -r 1
95 x -> y
95 x -> y
96 Incorrectly doesn't show the rename
97 $ hg debugpathcopies 0 1
96 $ hg debugpathcopies 0 1
97 x -> y (no-filelog !)
98
98
99 Copy a file onto another file with same content. If metadata is stored in changeset, this does not
99 Copy a file onto another file with same content. If metadata is stored in changeset, this does not
100 produce a new filelog entry. The changeset's "files" entry should still list the file.
100 produce a new filelog entry. The changeset's "files" entry should still list the file.
@@ -111,8 +111,8 b' produce a new filelog entry. The changes'
111 x x2
111 x x2
112 $ hg debugp1copies -r 1
112 $ hg debugp1copies -r 1
113 x -> x2
113 x -> x2
114 Incorrectly doesn't show the rename
115 $ hg debugpathcopies 0 1
114 $ hg debugpathcopies 0 1
115 x -> x2 (no-filelog !)
116
116
117 Rename file in a loop: x->y->z->x
117 Rename file in a loop: x->y->z->x
118 $ newrepo
118 $ newrepo
General Comments 0
You need to be logged in to leave comments. Login now