diff -r bafbfe0b450c -r 03442135dff4 mercurial/commands.py --- a/mercurial/commands.py Tue Jan 15 23:30:10 2013 +0100 +++ b/mercurial/commands.py Tue Jan 15 23:30:10 2013 +0100 @@ -2947,8 +2947,8 @@ wlock.release() # remove state when we complete successfully - if not opts.get('dry_run') and os.path.exists(repo.join('graftstate')): - util.unlinkpath(repo.join('graftstate')) + if not opts.get('dry_run'): + util.unlinkpath(repo.join('graftstate'), ignoremissing=True) return 0