##// END OF EJS Templates
commit: factor the post commit status check into a cmdutil method...
Matt Harbison -
r27943:02c5f8ad stable
parent child Browse files
Show More
@@ -2841,6 +2841,9 b' def commitstatus(repo, node, branch, bhe'
2841 elif repo.ui.verbose:
2841 elif repo.ui.verbose:
2842 repo.ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx))
2842 repo.ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx))
2843
2843
2844 def postcommitstatus(repo, pats, opts):
2845 return repo.status(match=scmutil.match(repo[None], pats, opts))
2846
2844 def revert(ui, repo, ctx, parents, *pats, **opts):
2847 def revert(ui, repo, ctx, parents, *pats, **opts):
2845 parent, p2 = parents
2848 parent, p2 = parents
2846 node = ctx.node()
2849 node = ctx.node()
@@ -1720,7 +1720,7 b' def _docommit(ui, repo, *pats, **opts):'
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]))
General Comments 0
You need to be logged in to leave comments. Login now