Show More
@@ -160,6 +160,10 b' class monotone_source(converter_source, ' | |||
|
160 | 160 | continue |
|
161 | 161 | if tofile.startswith(todir + '/'): |
|
162 | 162 | renamed[tofile] = fromdir + tofile[len(todir):] |
|
163 | # Avoid chained moves like: | |
|
164 | # d1(/a) => d3/d1(/a) | |
|
165 | # d2 => d3 | |
|
166 | ignoremove[tofile] = 1 | |
|
163 | 167 | for tofile, fromfile in renamed.items(): |
|
164 | 168 | self.ui.debug (_("copying file in renamed dir from '%s' to '%s'") |
|
165 | 169 | % (fromfile, tofile), '\n') |
@@ -88,6 +88,26 b' mtn ci -m dirfilemove' | |||
|
88 | 88 | mtn mv dir3/a dir3/d1/a |
|
89 | 89 | mtn mv dir3/d1 dir3/d2 |
|
90 | 90 | mtn ci -m dirfilemove2 |
|
91 | echo '% test directory move into another directory move' | |
|
92 | mkdir dir4 | |
|
93 | mkdir dir5 | |
|
94 | echo a > dir4/a | |
|
95 | mtn add dir4/a dir5 | |
|
96 | mtn ci -m dirdirmove | |
|
97 | mtn mv dir5 dir6 | |
|
98 | mtn mv dir4 dir6/dir4 | |
|
99 | mtn ci -m dirdirmove2 | |
|
100 | echo '% test diverging directory moves' | |
|
101 | mkdir -p dir7/dir9/dir8 | |
|
102 | echo a > dir7/dir9/dir8/a | |
|
103 | echo b > dir7/dir9/b | |
|
104 | echo c > dir7/c | |
|
105 | mtn add -R dir7 | |
|
106 | mtn ci -m divergentdirmove | |
|
107 | mtn mv dir7 dir7-2 | |
|
108 | mtn mv dir7-2/dir9 dir9-2 | |
|
109 | mtn mv dir9-2/dir8 dir8-2 | |
|
110 | mtn ci -m divergentdirmove2 | |
|
91 | 111 | cd .. |
|
92 | 112 | |
|
93 | 113 | echo % convert incrementally |
@@ -118,5 +138,9 b' echo % check file remove with directory ' | |||
|
118 | 138 | hg manifest -r 5 |
|
119 | 139 | echo % check file move with directory move |
|
120 | 140 | hg manifest -r 9 |
|
141 | echo % check file directory directory move | |
|
142 | hg manifest -r 11 | |
|
143 | echo % check divergent directory moves | |
|
144 | hg manifest -r 13 | |
|
121 | 145 | exit 0 |
|
122 | 146 |
@@ -65,21 +65,58 b' mtn: skipping dir3, already accounted fo' | |||
|
65 | 65 | mtn: renaming dir3/d1 to dir3/d2 in workspace manifest |
|
66 | 66 | mtn: beginning commit on branch 'com.selenic.test' |
|
67 | 67 | mtn: committed revision 8b543a400d3ee7f6d4bb1835b9b9e3747c8cb632 |
|
68 | % test directory move into another directory move | |
|
69 | mtn: adding dir4 to workspace manifest | |
|
70 | mtn: adding dir4/a to workspace manifest | |
|
71 | mtn: adding dir5 to workspace manifest | |
|
72 | mtn: beginning commit on branch 'com.selenic.test' | |
|
73 | mtn: committed revision 466e0b2afc7a55aa2b4ab2f57cb240bb6cd66fc7 | |
|
74 | mtn: renaming dir5 to dir6 in workspace manifest | |
|
75 | mtn: skipping dir6, already accounted for in workspace | |
|
76 | mtn: renaming dir4 to dir6/dir4 in workspace manifest | |
|
77 | mtn: beginning commit on branch 'com.selenic.test' | |
|
78 | mtn: committed revision 3d1f77ebad0c23a5d14911be3b670f990991b749 | |
|
79 | % test diverging directory moves | |
|
80 | mtn: adding dir7 to workspace manifest | |
|
81 | mtn: adding dir7/c to workspace manifest | |
|
82 | mtn: adding dir7/dir9 to workspace manifest | |
|
83 | mtn: adding dir7/dir9/b to workspace manifest | |
|
84 | mtn: adding dir7/dir9/dir8 to workspace manifest | |
|
85 | mtn: adding dir7/dir9/dir8/a to workspace manifest | |
|
86 | mtn: beginning commit on branch 'com.selenic.test' | |
|
87 | mtn: committed revision 08a08511f18b428d840199b062de90d0396bc2ed | |
|
88 | mtn: renaming dir7 to dir7-2 in workspace manifest | |
|
89 | mtn: renaming dir7-2/dir9 to dir9-2 in workspace manifest | |
|
90 | mtn: renaming dir9-2/dir8 to dir8-2 in workspace manifest | |
|
91 | mtn: beginning commit on branch 'com.selenic.test' | |
|
92 | mtn: committed revision 4a736634505795f17786fffdf2c9cbf5b11df6f6 | |
|
68 | 93 | % convert incrementally |
|
69 | 94 | assuming destination repo.mtn-hg |
|
70 | 95 | scanning source... |
|
71 | 96 | sorting... |
|
72 | 97 | converting... |
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 | 7 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
82 | @ 9 "dirfilemove2" files: dir3/a dir3/d2/a | |
|
98 | 11 update2 "with" quotes | |
|
99 | 10 createdir1 | |
|
100 | 9 movedir1 | |
|
101 | 8 movedir | |
|
102 | 7 emptydir | |
|
103 | 6 dropdirectory | |
|
104 | 5 dirfilemove | |
|
105 | 4 dirfilemove2 | |
|
106 | 3 dirdirmove | |
|
107 | 2 dirdirmove2 | |
|
108 | 1 divergentdirmove | |
|
109 | 0 divergentdirmove2 | |
|
110 | 11 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
111 | @ 13 "divergentdirmove2" files: dir7-2/c dir7/c dir7/dir9/b dir7/dir9/dir8/a dir8-2/a dir9-2/b | |
|
112 | | | |
|
113 | o 12 "divergentdirmove" files: dir7/c dir7/dir9/b dir7/dir9/dir8/a | |
|
114 | | | |
|
115 | o 11 "dirdirmove2" files: dir4/a dir6/dir4/a | |
|
116 | | | |
|
117 | o 10 "dirdirmove" files: dir4/a | |
|
118 | | | |
|
119 | o 9 "dirfilemove2" files: dir3/a dir3/d2/a | |
|
83 | 120 | | |
|
84 | 121 | o 8 "dirfilemove" files: dir3/a |
|
85 | 122 | | |
@@ -106,6 +143,10 b' dir1/subdir2_other/file1' | |||
|
106 | 143 | dir2/a |
|
107 | 144 | dir2/newfile |
|
108 | 145 | dir3/d2/a |
|
146 | dir6/dir4/a | |
|
147 | dir7-2/c | |
|
148 | dir8-2/a | |
|
149 | dir9-2/b | |
|
109 | 150 | e |
|
110 | 151 | % contents |
|
111 | 152 | a |
@@ -135,3 +176,24 b' dir2/a' | |||
|
135 | 176 | dir2/newfile |
|
136 | 177 | dir3/d2/a |
|
137 | 178 | e |
|
179 | % check file directory directory move | |
|
180 | bin2 | |
|
181 | dir1/subdir2/file1 | |
|
182 | dir1/subdir2_other/file1 | |
|
183 | dir2/a | |
|
184 | dir2/newfile | |
|
185 | dir3/d2/a | |
|
186 | dir6/dir4/a | |
|
187 | e | |
|
188 | % check divergent directory moves | |
|
189 | bin2 | |
|
190 | dir1/subdir2/file1 | |
|
191 | dir1/subdir2_other/file1 | |
|
192 | dir2/a | |
|
193 | dir2/newfile | |
|
194 | dir3/d2/a | |
|
195 | dir6/dir4/a | |
|
196 | dir7-2/c | |
|
197 | dir8-2/a | |
|
198 | dir9-2/b | |
|
199 | e |
General Comments 0
You need to be logged in to leave comments.
Login now