I've been working on storing copy metadata in the changelog instead of
the filelog and this has been useful for debugging.
Do we usually add tests for these?
| hg-reviewers |
I've been working on storing copy metadata in the changelog instead of
the filelog and this has been useful for debugging.
Do we usually add tests for these?
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/debugcommands.py (13 lines) | |||
| M | tests/test-completion.t (2 lines) | |||
| M | tests/test-help.t (2 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Martin von Zweigbergk | Jan 25 2019, 5:41 PM |
| short, | short, | ||||
| ) | ) | ||||
| from . import ( | from . import ( | ||||
| bundle2, | bundle2, | ||||
| changegroup, | changegroup, | ||||
| cmdutil, | cmdutil, | ||||
| color, | color, | ||||
| context, | context, | ||||
| copies, | |||||
| dagparser, | dagparser, | ||||
| encoding, | encoding, | ||||
| error, | error, | ||||
| exchange, | exchange, | ||||
| extensions, | extensions, | ||||
| filemerge, | filemerge, | ||||
| filesetlang, | filesetlang, | ||||
| formatter, | formatter, | ||||
| for spec in specs: | for spec in specs: | ||||
| f, d = complete(spec, acceptable or 'nmar') | f, d = complete(spec, acceptable or 'nmar') | ||||
| files.update(f) | files.update(f) | ||||
| dirs.update(d) | dirs.update(d) | ||||
| files.update(dirs) | files.update(dirs) | ||||
| ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files))) | ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files))) | ||||
| ui.write('\n') | ui.write('\n') | ||||
| @command('debugpathcopies', | |||||
| cmdutil.walkopts, | |||||
| 'hg debugcopies REV1 REV2 [FILE]', | |||||
| inferrepo=True) | |||||
| def debugpathcopies(ui, repo, rev1, rev2, *pats, **opts): | |||||
| """show copies between two revisions""" | |||||
| ctx1 = scmutil.revsingle(repo, rev1) | |||||
| ctx2 = scmutil.revsingle(repo, rev2) | |||||
| m = scmutil.match(ctx1, pats, opts) | |||||
| for dst, src in copies.pathcopies(ctx1, ctx2, m).items(): | |||||
| ui.write('%s -> %s\n' % (src, dst)) | |||||
| @command('debugpeer', [], _('PATH'), norepo=True) | @command('debugpeer', [], _('PATH'), norepo=True) | ||||
| def debugpeer(ui, path): | def debugpeer(ui, path): | ||||
| """establish a connection to a peer repository""" | """establish a connection to a peer repository""" | ||||
| # Always enable peer request logging. Requires --debug to display | # Always enable peer request logging. Requires --debug to display | ||||
| # though. | # though. | ||||
| overrides = { | overrides = { | ||||
| ('devel', 'debug.peer-request'): True, | ('devel', 'debug.peer-request'): True, | ||||
| } | } | ||||
| debugknown | debugknown | ||||
| debuglabelcomplete | debuglabelcomplete | ||||
| debuglocks | debuglocks | ||||
| debugmanifestfulltextcache | debugmanifestfulltextcache | ||||
| debugmergestate | debugmergestate | ||||
| debugnamecomplete | debugnamecomplete | ||||
| debugobsolete | debugobsolete | ||||
| debugpathcomplete | debugpathcomplete | ||||
| debugpathcopies | |||||
| debugpeer | debugpeer | ||||
| debugpickmergetool | debugpickmergetool | ||||
| debugpushkey | debugpushkey | ||||
| debugpvec | debugpvec | ||||
| debugrebuilddirstate | debugrebuilddirstate | ||||
| debugrebuildfncache | debugrebuildfncache | ||||
| debugrename | debugrename | ||||
| debugrevlog | debugrevlog | ||||
| debugknown: | debugknown: | ||||
| debuglabelcomplete: | debuglabelcomplete: | ||||
| debuglocks: force-lock, force-wlock, set-lock, set-wlock | debuglocks: force-lock, force-wlock, set-lock, set-wlock | ||||
| debugmanifestfulltextcache: clear, add | debugmanifestfulltextcache: clear, add | ||||
| debugmergestate: | debugmergestate: | ||||
| debugnamecomplete: | debugnamecomplete: | ||||
| debugobsolete: flags, record-parents, rev, exclusive, index, delete, date, user, template | debugobsolete: flags, record-parents, rev, exclusive, index, delete, date, user, template | ||||
| debugpathcomplete: full, normal, added, removed | debugpathcomplete: full, normal, added, removed | ||||
| debugpathcopies: | |||||
| debugpeer: | debugpeer: | ||||
| debugpickmergetool: rev, changedelete, include, exclude, tool | debugpickmergetool: rev, changedelete, include, exclude, tool | ||||
| debugpushkey: | debugpushkey: | ||||
| debugpvec: | debugpvec: | ||||
| debugrebuilddirstate: rev, minimal | debugrebuilddirstate: rev, minimal | ||||
| debugrebuildfncache: | debugrebuildfncache: | ||||
| debugrename: rev | debugrename: rev | ||||
| debugrevlog: changelog, manifest, dir, dump | debugrevlog: changelog, manifest, dir, dump | ||||
| complete "names" - tags, open branch names, bookmark names | complete "names" - tags, open branch names, bookmark names | ||||
| debugobsolete | debugobsolete | ||||
| create arbitrary obsolete marker | create arbitrary obsolete marker | ||||
| debugoptADV (no help text available) | debugoptADV (no help text available) | ||||
| debugoptDEP (no help text available) | debugoptDEP (no help text available) | ||||
| debugoptEXP (no help text available) | debugoptEXP (no help text available) | ||||
| debugpathcomplete | debugpathcomplete | ||||
| complete part or all of a tracked path | complete part or all of a tracked path | ||||
| debugpathcopies | |||||
| show copies between two revisions | |||||
| debugpeer establish a connection to a peer repository | debugpeer establish a connection to a peer repository | ||||
| debugpickmergetool | debugpickmergetool | ||||
| examine which merge tool is chosen for specified file | examine which merge tool is chosen for specified file | ||||
| debugpushkey access the pushkey key/value protocol | debugpushkey access the pushkey key/value protocol | ||||
| debugpvec (no help text available) | debugpvec (no help text available) | ||||
| debugrebuilddirstate | debugrebuilddirstate | ||||
| rebuild the dirstate as it would look like for the given | rebuild the dirstate as it would look like for the given | ||||
| revision | revision | ||||