##// END OF EJS Templates
largefiles: properly sync lfdirstate after removing largefiles...
Matt Harbison -
r23721:1b3df5ef stable
parent child Browse files
Show More
@@ -206,12 +206,10 def removelargefiles(ui, repo, isaddremo
206 206 if not opts.get('dry_run'):
207 207 if not after:
208 208 util.unlinkpath(repo.wjoin(f), ignoremissing=True)
209 lfdirstate.remove(f)
210 209
211 210 if opts.get('dry_run'):
212 211 return result
213 212
214 lfdirstate.write()
215 213 remove = [lfutil.standin(f) for f in remove]
216 214 # If this is being called by addremove, let the original addremove
217 215 # function handle this.
@@ -219,6 +217,12 def removelargefiles(ui, repo, isaddremo
219 217 for f in remove:
220 218 util.unlinkpath(repo.wjoin(f), ignoremissing=True)
221 219 repo[None].forget(remove)
220
221 for f in remove:
222 lfutil.synclfdirstate(repo, lfdirstate, lfutil.splitstandin(f),
223 False)
224
225 lfdirstate.write()
222 226 finally:
223 227 wlock.release()
224 228
@@ -250,6 +250,7 verify that large files in subrepos hand
250 250 Add a normal file to the subrepo, then test archiving
251 251
252 252 $ echo 'normal file' > subrepo/normal.txt
253 $ touch large.dat
253 254 $ mv subrepo/large.txt subrepo/renamed-large.txt
254 255 $ hg -R subrepo addremove --dry-run
255 256 removing large.txt
@@ -257,11 +258,19 Add a normal file to the subrepo, then t
257 258 adding renamed-large.txt
258 259 $ hg status -S
259 260 ! subrepo/large.txt
261 ? large.dat
260 262 ? subrepo/normal.txt
261 263 ? subrepo/renamed-large.txt
262 264 $ mv subrepo/renamed-large.txt subrepo/large.txt
263 265 $ hg -R subrepo add subrepo/normal.txt
264 266
267 $ hg addremove
268 adding large.dat as a largefile
269 $ rm large.dat
270
271 $ hg addremove
272 removing large.dat
273
265 274 Lock in subrepo, otherwise the change isn't archived
266 275
267 276 $ hg ci -S -m "add normal file to top level"
General Comments 0
You need to be logged in to leave comments. Login now