##// END OF EJS Templates
transplant: fix small bug when a patch fails while using --filter
Sune Foldager -
r9995:eba6c868 stable
parent child Browse files
Show More
@@ -227,8 +227,6 b' class transplanter(object):'
227 finally:
227 finally:
228 files = patch.updatedir(self.ui, repo, files)
228 files = patch.updatedir(self.ui, repo, files)
229 except Exception, inst:
229 except Exception, inst:
230 if filter:
231 os.unlink(patchfile)
232 seriespath = os.path.join(self.path, 'series')
230 seriespath = os.path.join(self.path, 'series')
233 if os.path.exists(seriespath):
231 if os.path.exists(seriespath):
234 os.unlink(seriespath)
232 os.unlink(seriespath)
@@ -136,6 +136,15 b' hg transplant -s ../t -b tip -a --filter'
136 hg log --template '{rev} {parents} {desc}\n'
136 hg log --template '{rev} {parents} {desc}\n'
137 cd ..
137 cd ..
138
138
139 echo '% test filter with failed patch'
140 cd filter
141 hg up 0
142 echo foo > b1
143 hg ci -d '0 0' -Am foo
144 hg transplant 1 --filter ./test-filter |\
145 sed 's/filtering.*/filtering/g'
146 cd ..
147
139 echo '% test with a win32ext like setup (differing EOLs)'
148 echo '% test with a win32ext like setup (differing EOLs)'
140 hg init twin1
149 hg init twin1
141 cd twin1
150 cd twin1
@@ -156,4 +165,4 b' python -c "file(\'b\', \'wb\').write(\'b\\r\\nb'
156 hg ci -m addb
165 hg ci -m addb
157 hg transplant -s ../twin1 tip
166 hg transplant -s ../twin1 tip
158 python -c "print repr(file('b', 'rb').read())"
167 python -c "print repr(file('b', 'rb').read())"
159 cd .. No newline at end of file
168 cd ..
@@ -159,6 +159,17 b' 3 b3'
159 2 b2
159 2 b2
160 1 b1
160 1 b1
161 0 r2
161 0 r2
162 % test filter with failed patch
163 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
164 adding b1
165 adding test-filter
166 created new head
167 file b1 already exists
168 1 out of 1 hunks FAILED -- saving rejects to file b1.rej
169 abort: Fix up the merge and run hg transplant --continue
170 filtering
171 applying 348b36d0b6a5
172 patch failed to apply
162 % test with a win32ext like setup (differing EOLs)
173 % test with a win32ext like setup (differing EOLs)
163 adding a
174 adding a
164 adding b
175 adding b
General Comments 0
You need to be logged in to leave comments. Login now