Mercurial > hg
diff hgext/histedit.py @ 19215:f184fe1e2ac5
summary: add a histedit hook
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Tue, 14 May 2013 11:23:18 -0700 |
parents | 1163ff06ce89 |
children | 59cdd3a7e281 |
line wrap: on
line diff
--- a/hgext/histedit.py Tue May 14 11:23:17 2013 -0700 +++ b/hgext/histedit.py Tue May 14 11:23:18 2013 -0700 @@ -856,3 +856,16 @@ repair.strip(ui, repo, c) finally: lockmod.release(lock) + +def summaryhook(ui, repo): + if not os.path.exists(repo.join('histedit-state')): + return + (parentctxnode, rules, keep, topmost, replacements) = readstate(repo) + if rules: + # i18n: column positioning for "hg summary" + ui.write(_('hist: %s (histedit --continue)\n') % + (ui.label(_('%d remaining'), 'histedit.remaining') % + len(rules))) + +def extsetup(ui): + cmdutil.summaryhooks.add('histedit', summaryhook)