# HG changeset patch # User Matt Harbison # Date 1453609470 18000 # Node ID 02c5f8ad00ac2e3663a175b691ccce4a1f340c00 # Parent eb1135d5e688f8540fb98a32759317a7eed31985 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. diff -r eb1135d5e688 -r 02c5f8ad00ac mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sat Jan 23 20:51:17 2016 -0500 +++ b/mercurial/cmdutil.py Sat Jan 23 23:24:30 2016 -0500 @@ -2841,6 +2841,9 @@ elif repo.ui.verbose: repo.ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx)) +def postcommitstatus(repo, pats, opts): + return repo.status(match=scmutil.match(repo[None], pats, opts)) + def revert(ui, repo, ctx, parents, *pats, **opts): parent, p2 = parents node = ctx.node() diff -r eb1135d5e688 -r 02c5f8ad00ac mercurial/commands.py --- a/mercurial/commands.py Sat Jan 23 20:51:17 2016 -0500 +++ b/mercurial/commands.py Sat Jan 23 23:24:30 2016 -0500 @@ -1720,7 +1720,7 @@ node = cmdutil.commit(ui, repo, commitfunc, pats, opts) if not node: - stat = repo.status(match=scmutil.match(repo[None], pats, opts)) + stat = cmdutil.postcommitstatus(repo, pats, opts) if stat[3]: ui.status(_("nothing changed (%d missing files, see " "'hg status')\n") % len(stat[3]))