Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 11152:e8d10d085f47
cmdutil: Warn when trying to copy/rename --after to a nonexistant file.
Currently running 'hg rename --after foo.txt bar.typo' is a silent no-op. This patch adds a warning. It also updates the copy and rename tests.
No actual functionality is changed.
fixes issue 1822
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Sat, 01 May 2010 18:39:40 -0400 |
parents | 51d0387523c6 |
children | 6a64813276ed |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat May 01 15:00:21 2010 +0300 +++ b/mercurial/cmdutil.py Sat May 01 18:39:40 2010 -0400 @@ -396,6 +396,12 @@ if after: if not exists: + if rename: + ui.warn(_('%s: not recording move - %s does not exist\n') % + (relsrc, reltarget)) + else: + ui.warn(_('%s: not recording copy - %s does not exist\n') % + (relsrc, reltarget)) return elif not dryrun: try: