# HG changeset patch # User Matt Mackall # Date 1326920835 21600 # Node ID 8435fa20dff9bd2199b926b37f881a2a9aa0a450 # Parent 60cb4f381a782e264a488ecf5a6d32f56eb40e3b# Parent 29defa7d20f6d2a00e75c4bfe92bfc0115ac2321 merge with stable diff -r 60cb4f381a78 -r 8435fa20dff9 hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py Wed Jan 18 14:56:52 2012 -0600 +++ b/hgext/largefiles/lfcommands.py Wed Jan 18 15:07:15 2012 -0600 @@ -466,7 +466,7 @@ # largefile is converted back to a normal file: the standin # disappears, but a new (normal) file appears as the lfile. if os.path.exists(abslfile) and lfile not in repo[None]: - os.unlink(abslfile) + util.unlinkpath(abslfile) ret = -1 state = repo.dirstate[lfutil.standin(lfile)] if state == 'n': diff -r 60cb4f381a78 -r 8435fa20dff9 tests/test-largefiles.t --- a/tests/test-largefiles.t Wed Jan 18 14:56:52 2012 -0600 +++ b/tests/test-largefiles.t Wed Jan 18 15:07:15 2012 -0600 @@ -546,6 +546,14 @@ getting changed largefiles 1 largefiles updated, 0 removed +Test removing empty largefiles directories on update + $ test -d sub2 && echo "sub2 exists" + sub2 exists + $ hg update -q null + $ test -d sub2 && echo "error: sub2 should not exist anymore" + [1] + $ hg update -q + "revert" works on largefiles (and normal files too). $ echo hack3 >> normal3 $ echo hack4 >> sub/normal4