largefiles: fix addremove when largefile is missing (
issue3227)
--- a/hgext/largefiles/overrides.py Sun May 13 12:01:52 2012 +0200
+++ b/hgext/largefiles/overrides.py Sun May 13 12:11:50 2012 +0200
@@ -169,6 +169,8 @@
# function handle this.
if not getattr(repo, "_isaddremove", False):
lfutil.reporemove(repo, remove, unlink=True)
+ else:
+ lfutil.reporemove(repo, remove, unlink=False)
finally:
wlock.release()
--- a/hgext/largefiles/reposetup.py Sun May 13 12:01:52 2012 +0200
+++ b/hgext/largefiles/reposetup.py Sun May 13 12:11:50 2012 +0200
@@ -340,8 +340,9 @@
lfdirstate.normal(lfile)
for lfile in lfdirstate:
if lfile in modifiedfiles:
- if not os.path.exists(
- repo.wjoin(lfutil.standin(lfile))):
+ if (not os.path.exists(repo.wjoin(
+ lfutil.standin(lfile)))) or \
+ (not os.path.exists(repo.wjoin(lfile))):
lfdirstate.drop(lfile)
result = orig(text=text, user=user, date=date, match=match,