##// END OF EJS Templates
refactoring: use unlinkpath with ignoremissing
Mads Kiilerich -
r18386:03442135 default
parent child Browse files
Show More
@@ -170,8 +170,7 b' def removelargefiles(ui, repo, *pats, **'
170 170 # are removing the file.
171 171 if getattr(repo, "_isaddremove", False):
172 172 ui.status(_('removing %s\n') % f)
173 if os.path.exists(repo.wjoin(f)):
174 util.unlinkpath(repo.wjoin(f))
173 util.unlinkpath(repo.wjoin(f), ignoremissing=True)
175 174 lfdirstate.remove(f)
176 175 lfdirstate.write()
177 176 forget = [lfutil.standin(f) for f in forget]
@@ -319,8 +319,7 b' def rebase(ui, repo, **opts):'
319 319
320 320 clearstatus(repo)
321 321 ui.note(_("rebase completed\n"))
322 if os.path.exists(repo.sjoin('undo')):
323 util.unlinkpath(repo.sjoin('undo'))
322 util.unlinkpath(repo.sjoin('undo'), ignoremissing=True)
324 323 if skipped:
325 324 ui.note(_("%d revisions have been skipped\n") % len(skipped))
326 325
@@ -508,8 +507,7 b' def storestatus(repo, originalwd, target'
508 507
509 508 def clearstatus(repo):
510 509 'Remove the status files'
511 if os.path.exists(repo.join("rebasestate")):
512 util.unlinkpath(repo.join("rebasestate"))
510 util.unlinkpath(repo.join("rebasestate"), ignoremissing=True)
513 511
514 512 def restorestatus(repo):
515 513 'Restore a previously stored status'
@@ -2947,8 +2947,8 b' def graft(ui, repo, *revs, **opts):'
2947 2947 wlock.release()
2948 2948
2949 2949 # remove state when we complete successfully
2950 if not opts.get('dry_run') and os.path.exists(repo.join('graftstate')):
2951 util.unlinkpath(repo.join('graftstate'))
2950 if not opts.get('dry_run'):
2951 util.unlinkpath(repo.join('graftstate'), ignoremissing=True)
2952 2952
2953 2953 return 0
2954 2954
General Comments 0
You need to be logged in to leave comments. Login now