Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 18386:03442135dff4
refactoring: use unlinkpath with ignoremissing
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 15 Jan 2013 23:30:10 +0100 |
parents | fdf2f5730bd4 |
children | 9354a8c1bded |
comparison
equal
deleted
inserted
replaced
18385:bafbfe0b450c | 18386:03442135dff4 |
---|---|
2945 current = repo[node] | 2945 current = repo[node] |
2946 finally: | 2946 finally: |
2947 wlock.release() | 2947 wlock.release() |
2948 | 2948 |
2949 # remove state when we complete successfully | 2949 # remove state when we complete successfully |
2950 if not opts.get('dry_run') and os.path.exists(repo.join('graftstate')): | 2950 if not opts.get('dry_run'): |
2951 util.unlinkpath(repo.join('graftstate')) | 2951 util.unlinkpath(repo.join('graftstate'), ignoremissing=True) |
2952 | 2952 |
2953 return 0 | 2953 return 0 |
2954 | 2954 |
2955 @command('grep', | 2955 @command('grep', |
2956 [('0', 'print0', None, _('end fields with NUL')), | 2956 [('0', 'print0', None, _('end fields with NUL')), |