Show More
@@ -159,11 +159,7 b' def remove_largefiles(ui, repo, *pats, *' | |||
|
159 | 159 | if getattr(repo, "_isaddremove", False): |
|
160 | 160 | ui.status(_('removing %s\n' % f)) |
|
161 | 161 | if os.path.exists(repo.wjoin(f)): |
|
162 |
|
|
|
163 | currentdir = os.path.split(f)[0] | |
|
164 | while currentdir and not os.listdir(repo.wjoin(currentdir)): | |
|
165 | os.rmdir(repo.wjoin(currentdir)) | |
|
166 | currentdir = os.path.split(currentdir)[0] | |
|
162 | util.unlinkpath(repo.wjoin(f)) | |
|
167 | 163 | lfdirstate.remove(f) |
|
168 | 164 | lfdirstate.write() |
|
169 | 165 | forget = [lfutil.standin(f) for f in forget] |
@@ -556,6 +556,14 b' Test removing empty largefiles directori' | |||
|
556 | 556 | [1] |
|
557 | 557 | $ hg update -q |
|
558 | 558 | |
|
559 | Test hg remove removes empty largefiles directories | |
|
560 | $ test -d sub2 && echo "sub2 exists" | |
|
561 | sub2 exists | |
|
562 | $ hg remove sub2/* | |
|
563 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
|
564 | [1] | |
|
565 | $ hg revert sub2/large6 sub2/large7 | |
|
566 | ||
|
559 | 567 | "revert" works on largefiles (and normal files too). |
|
560 | 568 | $ echo hack3 >> normal3 |
|
561 | 569 | $ echo hack4 >> sub/normal4 |
General Comments 0
You need to be logged in to leave comments.
Login now