Show More
@@ -140,7 +140,7 b' def addlargefiles(ui, repo, *pats, **opt' | |||
|
140 | 140 | wlock.release() |
|
141 | 141 | return bad |
|
142 | 142 | |
|
143 | def removelargefiles(ui, repo, *pats, **opts): | |
|
143 | def removelargefiles(ui, repo, isaddremove, *pats, **opts): | |
|
144 | 144 | after = opts.get('after') |
|
145 | 145 | if not pats and not after: |
|
146 | 146 | raise util.Abort(_('no files specified')) |
@@ -187,7 +187,7 b' def removelargefiles(ui, repo, *pats, **' | |||
|
187 | 187 | if not after: |
|
188 | 188 | # If this is being called by addremove, notify the user that we |
|
189 | 189 | # are removing the file. |
|
190 |
if |
|
|
190 | if isaddremove: | |
|
191 | 191 | ui.status(_('removing %s\n') % f) |
|
192 | 192 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
193 | 193 | lfdirstate.remove(f) |
@@ -195,7 +195,7 b' def removelargefiles(ui, repo, *pats, **' | |||
|
195 | 195 | remove = [lfutil.standin(f) for f in remove] |
|
196 | 196 | # If this is being called by addremove, let the original addremove |
|
197 | 197 | # function handle this. |
|
198 |
if not |
|
|
198 | if not isaddremove: | |
|
199 | 199 | for f in remove: |
|
200 | 200 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
201 | 201 | repo[None].forget(remove) |
@@ -232,7 +232,7 b' def overrideremove(orig, ui, repo, *pats' | |||
|
232 | 232 | installnormalfilesmatchfn(repo[None].manifest()) |
|
233 | 233 | result = orig(ui, repo, *pats, **opts) |
|
234 | 234 | restorematchfn() |
|
235 | return removelargefiles(ui, repo, *pats, **opts) or result | |
|
235 | return removelargefiles(ui, repo, False, *pats, **opts) or result | |
|
236 | 236 | |
|
237 | 237 | def overridestatusfn(orig, repo, rev2, **opts): |
|
238 | 238 | try: |
@@ -1118,9 +1118,7 b' def scmutiladdremove(orig, repo, pats=[]' | |||
|
1118 | 1118 | # confused state later. |
|
1119 | 1119 | if s.deleted: |
|
1120 | 1120 | m = [repo.wjoin(f) for f in s.deleted] |
|
1121 | repo._isaddremove = True | |
|
1122 | removelargefiles(repo.ui, repo, *m, **opts) | |
|
1123 | repo._isaddremove = False | |
|
1121 | removelargefiles(repo.ui, repo, True, *m, **opts) | |
|
1124 | 1122 | # Call into the normal add code, and any files that *should* be added as |
|
1125 | 1123 | # largefiles will be |
|
1126 | 1124 | addlargefiles(repo.ui, repo, *pats, **opts) |
General Comments 0
You need to be logged in to leave comments.
Login now