comparison mercurial/commands.py @ 27943:02c5f8ad00ac stable

commit: factor the post commit status check into a cmdutil method The largefiles extension needs to set lfstatus for this status call. Otherwise, if a missing largefile is explicitly named, a confusing message is issued that says the largefile wasn't found, followed by another that says nothing changed.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 23 Jan 2016 23:24:30 -0500
parents f6d73c8756e2
children 7cb7264cfd52
comparison
equal deleted inserted replaced
27942:eb1135d5e688 27943:02c5f8ad00ac
1718 1718
1719 1719
1720 node = cmdutil.commit(ui, repo, commitfunc, pats, opts) 1720 node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
1721 1721
1722 if not node: 1722 if not node:
1723 stat = repo.status(match=scmutil.match(repo[None], pats, opts)) 1723 stat = cmdutil.postcommitstatus(repo, pats, opts)
1724 if stat[3]: 1724 if stat[3]:
1725 ui.status(_("nothing changed (%d missing files, see " 1725 ui.status(_("nothing changed (%d missing files, see "
1726 "'hg status')\n") % len(stat[3])) 1726 "'hg status')\n") % len(stat[3]))
1727 else: 1727 else:
1728 ui.status(_("nothing changed\n")) 1728 ui.status(_("nothing changed\n"))