diff -r 3b6b1b407e99 -r 78a60daacea8 mercurial/subrepo.py --- a/mercurial/subrepo.py Tue Mar 11 18:32:16 2014 -0500 +++ b/mercurial/subrepo.py Wed May 07 00:08:20 2014 +0200 @@ -501,6 +501,9 @@ % (substate[0], substate[2])) return [] + def shortid(self, revid): + return revid + class hgsubrepo(abstractsubrepo): def __init__(self, ctx, path, state): self._path = path @@ -866,6 +869,9 @@ pats = [] cmdutil.revert(ui, self._repo, ctx, parents, *pats, **opts) + def shortid(self, revid): + return revid[:12] + class svnsubrepo(abstractsubrepo): def __init__(self, ctx, path, state): self._path = path @@ -1561,6 +1567,9 @@ deleted = unknown = ignored = clean = [] return modified, added, removed, deleted, unknown, ignored, clean + def shortid(self, revid): + return revid[:7] + types = { 'hg': hgsubrepo, 'svn': svnsubrepo,