comparison hgext/largefiles/overrides.py @ 18386:03442135dff4

refactoring: use unlinkpath with ignoremissing
author Mads Kiilerich <madski@unity3d.com>
date Tue, 15 Jan 2013 23:30:10 +0100
parents de685145f5c2
children c9db897d5a43
comparison
equal deleted inserted replaced
18385:bafbfe0b450c 18386:03442135dff4
168 if not after: 168 if not after:
169 # If this is being called by addremove, notify the user that we 169 # If this is being called by addremove, notify the user that we
170 # are removing the file. 170 # are removing the file.
171 if getattr(repo, "_isaddremove", False): 171 if getattr(repo, "_isaddremove", False):
172 ui.status(_('removing %s\n') % f) 172 ui.status(_('removing %s\n') % f)
173 if os.path.exists(repo.wjoin(f)): 173 util.unlinkpath(repo.wjoin(f), ignoremissing=True)
174 util.unlinkpath(repo.wjoin(f))
175 lfdirstate.remove(f) 174 lfdirstate.remove(f)
176 lfdirstate.write() 175 lfdirstate.write()
177 forget = [lfutil.standin(f) for f in forget] 176 forget = [lfutil.standin(f) for f in forget]
178 remove = [lfutil.standin(f) for f in remove] 177 remove = [lfutil.standin(f) for f in remove]
179 repo[None].forget(forget) 178 repo[None].forget(forget)