--- a/hgext/largefiles/lfutil.py Thu Dec 13 19:19:06 2012 +0100
+++ b/hgext/largefiles/lfutil.py Thu Dec 13 19:19:06 2012 +0100
@@ -31,18 +31,6 @@
add = repo[None].add
return add(list)
-def reporemove(repo, list, unlink=False):
- def remove(list, unlink):
- wlock = repo.wlock()
- try:
- if unlink:
- for f in list:
- util.unlinkpath(repo.wjoin(f), ignoremissing=True)
- repo[None].forget(list)
- finally:
- wlock.release()
- return remove(list, unlink=unlink)
-
def repoforget(repo, list):
forget = repo[None].forget
return forget(list)
--- a/hgext/largefiles/overrides.py Thu Dec 13 19:19:06 2012 +0100
+++ b/hgext/largefiles/overrides.py Thu Dec 13 19:19:06 2012 +0100
@@ -180,9 +180,9 @@
# If this is being called by addremove, let the original addremove
# function handle this.
if not getattr(repo, "_isaddremove", False):
- lfutil.reporemove(repo, remove, unlink=True)
- else:
- lfutil.reporemove(repo, remove, unlink=False)
+ for f in remove:
+ util.unlinkpath(repo.wjoin(f), ignoremissing=True)
+ repo[None].forget(remove)
finally:
wlock.release()
@@ -958,8 +958,10 @@
else:
lfdirstate.remove(f)
lfdirstate.write()
- lfutil.reporemove(repo, [lfutil.standin(f) for f in forget],
- unlink=True)
+ standins = [lfutil.standin(f) for f in forget]
+ for f in standins:
+ util.unlinkpath(repo.wjoin(f), ignoremissing=True)
+ repo[None].forget(standins)
finally:
wlock.release()