# HG changeset patch # User Greg Ward # Date 1317520364 14400 # Node ID 7f65ce5cc0112b6ce63392192049bdb1ea186358 # Parent 7f78a4137f8f4b8e98dbde62314b325da0b869f4 import: improve error reporting When applying a series of patch files, it's nice to be explicitly told *which* file is broken. diff -r 7f78a4137f8f -r 7f65ce5cc011 mercurial/commands.py --- a/mercurial/commands.py Sat Oct 01 21:51:25 2011 -0400 +++ b/mercurial/commands.py Sat Oct 01 21:52:44 2011 -0400 @@ -3375,6 +3375,7 @@ if patchurl == '-': ui.status(_('applying patch from stdin\n')) patchfile = ui.fin + patchurl = 'stdin' # for error message else: patchurl = os.path.join(base, patchurl) ui.status(_('applying %s\n') % patchurl) @@ -3392,7 +3393,7 @@ parents = [repo[node]] if not haspatch: - raise util.Abort(_('no diffs found')) + raise util.Abort(_('%s: no diffs found') % patchurl) if msgs: repo.savecommitmessage('\n* * *\n'.join(msgs))