Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 30947:3c766ca89377
debugcommands: move 'debugpvec' in the new module
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 02 Feb 2017 09:59:47 +0100 |
parents | 7103122495e2 |
children | cc2b537b1966 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Feb 01 17:48:30 2017 +0100 +++ b/mercurial/commands.py Thu Feb 02 09:59:47 2017 +0100 @@ -46,7 +46,6 @@ obsolete, patch, phases, - pvec, pycompat, repair, revlog, @@ -1860,27 +1859,6 @@ with repo.wlock(False): return cmdutil.copy(ui, repo, pats, opts) -@command('debugpvec', [], _('A B')) -def debugpvec(ui, repo, a, b=None): - ca = scmutil.revsingle(repo, a) - cb = scmutil.revsingle(repo, b) - pa = pvec.ctxpvec(ca) - pb = pvec.ctxpvec(cb) - if pa == pb: - rel = "=" - elif pa > pb: - rel = ">" - elif pa < pb: - rel = "<" - elif pa | pb: - rel = "|" - ui.write(_("a: %s\n") % pa) - ui.write(_("b: %s\n") % pb) - ui.write(_("depth(a): %d depth(b): %d\n") % (pa._depth, pb._depth)) - ui.write(_("delta: %d hdist: %d distance: %d relation: %s\n") % - (abs(pa._depth - pb._depth), pvec._hamming(pa._vec, pb._vec), - pa.distance(pb), rel)) - @command('debugrebuilddirstate|debugrebuildstate', [('r', 'rev', '', _('revision to rebuild to'), _('REV')), ('', 'minimal', None, _('only rebuild files that are inconsistent with '