comparison mercurial/commands.py @ 13899:a7cd0eee396b

commit: note when files are missing Before, you could experience the following strange interaction: $ hg commit nothing changed $ hg merge abort: outstanding uncommitted changes which confused at least one user in #mercurial.
author Martin Geisler <mg@aragost.com>
date Wed, 06 Apr 2011 16:21:12 +0200
parents 1aea86673dee
children 6bc340940c18
comparison
equal deleted inserted replaced
13898:77b09a7fc8fc 13899:a7cd0eee396b
892 branch = repo[None].branch() 892 branch = repo[None].branch()
893 bheads = repo.branchheads(branch) 893 bheads = repo.branchheads(branch)
894 894
895 node = cmdutil.commit(ui, repo, commitfunc, pats, opts) 895 node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
896 if not node: 896 if not node:
897 ui.status(_("nothing changed\n")) 897 stat = repo.status(match=cmdutil.match(repo, pats, opts))
898 if stat[3]:
899 ui.status(_("nothing changed (%d missing files, see 'hg status')\n")
900 % len(stat[3]))
901 else:
902 ui.status(_("nothing changed\n"))
898 return 1 903 return 1
899 904
900 ctx = repo[node] 905 ctx = repo[node]
901 parents = ctx.parents() 906 parents = ctx.parents()
902 907