This makes them show up under the right categories in 'hg help'.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| hg-reviewers |
This makes them show up under the right categories in 'hg help'.
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext3rd/evolve/__init__.py (15 lines) | |||
| M | hgext3rd/evolve/cmdrewrite.py (25 lines) | |||
| M | hgext3rd/evolve/evolvecmd.py (4 lines) | |||
| M | hgext3rd/evolve/obshistory.py (4 lines) | |||
| M | hgext3rd/evolve/rewind.py (4 lines) | |||
| M | hgext3rd/topic/__init__.py (6 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 800c1d5f0bb1 | 40795751be1c | Rodrigo Damazio | Oct 6 2019, 2:30 AM |
| dirstate, | dirstate, | ||||
| error, | error, | ||||
| help, | help, | ||||
| hg, | hg, | ||||
| lock as lockmod, | lock as lockmod, | ||||
| node, | node, | ||||
| patch, | patch, | ||||
| pycompat, | pycompat, | ||||
| registrar, | |||||
| revset, | revset, | ||||
| scmutil, | scmutil, | ||||
| ) | ) | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| from mercurial.node import nullid | from mercurial.node import nullid | ||||
| from . import ( | from . import ( | ||||
| ### Useful alias | ### Useful alias | ||||
| @eh.uisetup | @eh.uisetup | ||||
| def setupparentcommand(ui): | def setupparentcommand(ui): | ||||
| _alias, statuscmd = cmdutil.findcmd(b'status', commands.table) | _alias, statuscmd = cmdutil.findcmd(b'status', commands.table) | ||||
| pstatusopts = [o for o in statuscmd[1] if o[1] != b'rev'] | pstatusopts = [o for o in statuscmd[1] if o[1] != b'rev'] | ||||
| @eh.command(b'pstatus', pstatusopts) | @eh.command(b'pstatus', pstatusopts, | ||||
| helpcategory=registrar.command.CATEGORY_WORKING_DIRECTORY) | |||||
| def pstatus(ui, repo, *args, **kwargs): | def pstatus(ui, repo, *args, **kwargs): | ||||
| """show status combining committed and uncommited changes | """show status combining committed and uncommited changes | ||||
| This show the combined status of the current working copy parent commit and | This show the combined status of the current working copy parent commit and | ||||
| the uncommitted change in the working copy itself. The status displayed | the uncommitted change in the working copy itself. The status displayed | ||||
| match the content of the commit that a bare :hg:`amend` will creates. | match the content of the commit that a bare :hg:`amend` will creates. | ||||
| See :hg:`help status` for details.""" | See :hg:`help status` for details.""" | ||||
| kwargs['rev'] = [b'.^'] | kwargs['rev'] = [b'.^'] | ||||
| return statuscmd[0](ui, repo, *args, **kwargs) | return statuscmd[0](ui, repo, *args, **kwargs) | ||||
| _alias, diffcmd = cmdutil.findcmd(b'diff', commands.table) | _alias, diffcmd = cmdutil.findcmd(b'diff', commands.table) | ||||
| pdiffopts = [o for o in diffcmd[1] if o[1] != b'rev'] | pdiffopts = [o for o in diffcmd[1] if o[1] != b'rev'] | ||||
| @eh.command(b'pdiff', pdiffopts) | @eh.command(b'pdiff', pdiffopts, | ||||
| helpcategory=registrar.command.CATEGORY_WORKING_DIRECTORY) | |||||
| def pdiff(ui, repo, *args, **kwargs): | def pdiff(ui, repo, *args, **kwargs): | ||||
| """show diff combining committed and uncommited changes | """show diff combining committed and uncommited changes | ||||
| This show the combined diff of the current working copy parent commit and | This show the combined diff of the current working copy parent commit and | ||||
| the uncommitted change in the working copy itself. The diff displayed | the uncommitted change in the working copy itself. The diff displayed | ||||
| match the content of the commit that a bare :hg:`amend` will creates. | match the content of the commit that a bare :hg:`amend` will creates. | ||||
| See :hg:`help diff` for details.""" | See :hg:`help diff` for details.""" | ||||
| b'previous', | b'previous', | ||||
| [(b'B', b'move-bookmark', False, | [(b'B', b'move-bookmark', False, | ||||
| _(b'move active bookmark after update')), | _(b'move active bookmark after update')), | ||||
| (b'm', b'merge', False, _(b'bring uncommitted change along')), | (b'm', b'merge', False, _(b'bring uncommitted change along')), | ||||
| (b'', b'no-topic', False, _(b'ignore topic and move topologically')), | (b'', b'no-topic', False, _(b'ignore topic and move topologically')), | ||||
| (b'n', b'dry-run', False, | (b'n', b'dry-run', False, | ||||
| _(b'do not perform actions, just print what would be done'))], | _(b'do not perform actions, just print what would be done'))], | ||||
| b'[OPTION]...', | b'[OPTION]...', | ||||
| helpbasic=True) | helpbasic=True, | ||||
| helpcategory=registrar.command.CATEGORY_WORKING_DIRECTORY) | |||||
| def cmdprevious(ui, repo, **opts): | def cmdprevious(ui, repo, **opts): | ||||
| """update to parent revision | """update to parent revision | ||||
| Displays the summary line of the destination for clarity.""" | Displays the summary line of the destination for clarity.""" | ||||
| wlock = None | wlock = None | ||||
| dryrunopt = opts['dry_run'] | dryrunopt = opts['dry_run'] | ||||
| mergeopt = opts['merge'] | mergeopt = opts['merge'] | ||||
| if not dryrunopt: | if not dryrunopt: | ||||
| [(b'B', b'move-bookmark', False, | [(b'B', b'move-bookmark', False, | ||||
| _(b'move active bookmark after update')), | _(b'move active bookmark after update')), | ||||
| (b'm', b'merge', False, _(b'bring uncommitted change along')), | (b'm', b'merge', False, _(b'bring uncommitted change along')), | ||||
| (b'', b'evolve', True, _(b'evolve the next changeset if necessary')), | (b'', b'evolve', True, _(b'evolve the next changeset if necessary')), | ||||
| (b'', b'no-topic', False, _(b'ignore topic and move topologically')), | (b'', b'no-topic', False, _(b'ignore topic and move topologically')), | ||||
| (b'n', b'dry-run', False, | (b'n', b'dry-run', False, | ||||
| _(b'do not perform actions, just print what would be done'))], | _(b'do not perform actions, just print what would be done'))], | ||||
| b'[OPTION]...', | b'[OPTION]...', | ||||
| helpbasic=True) | helpbasic=True, | ||||
| helpcategory=registrar.command.CATEGORY_WORKING_DIRECTORY) | |||||
| def cmdnext(ui, repo, **opts): | def cmdnext(ui, repo, **opts): | ||||
| """update to next child revision | """update to next child revision | ||||
| If necessary, evolve the next changeset. Use --no-evolve to disable this | If necessary, evolve the next changeset. Use --no-evolve to disable this | ||||
| behavior. | behavior. | ||||
| Displays the summary line of the destination for clarity. | Displays the summary line of the destination for clarity. | ||||
| """ | """ | ||||
| @eh.uisetup | @eh.uisetup | ||||
| def _setuphelp(ui): | def _setuphelp(ui): | ||||
| for entry in help.helptable: | for entry in help.helptable: | ||||
| if entry[0] == b"evolution": | if entry[0] == b"evolution": | ||||
| break | break | ||||
| else: | else: | ||||
| help.helptable.append(([b"evolution"], _(b"Safely Rewriting History"), | help.helptable.append(([b"evolution"], _(b"Safely Rewriting History"), | ||||
| _helploader)) | _helploader, help.TOPIC_CATEGORY_CONCEPTS)) | ||||
| help.helptable.sort() | help.helptable.sort() | ||||
| evolvestateversion = 0 | evolvestateversion = 0 | ||||
| def _evolvemessage(): | def _evolvemessage(): | ||||
| _msg = _(b'To continue: hg evolve --continue\n' | _msg = _(b'To continue: hg evolve --continue\n' | ||||
| b'To abort: hg evolve --abort\n' | b'To abort: hg evolve --abort\n' | ||||
| b'To stop: hg evolve --stop\n' | b'To stop: hg evolve --stop\n' | ||||
| lock as lockmod, | lock as lockmod, | ||||
| merge, | merge, | ||||
| node, | node, | ||||
| obsolete, | obsolete, | ||||
| obsutil, | obsutil, | ||||
| patch, | patch, | ||||
| phases, | phases, | ||||
| pycompat, | pycompat, | ||||
| registrar, | |||||
| scmutil, | scmutil, | ||||
| util, | util, | ||||
| ) | ) | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| try: | try: | ||||
| from mercurial.utils.dateutil import datestr | from mercurial.utils.dateutil import datestr | ||||
| (b'', b'extract', False, _(b'extract changes from the commit to the working copy')), | (b'', b'extract', False, _(b'extract changes from the commit to the working copy')), | ||||
| (b'', b'patch', False, _(b'make changes to wdir parent by editing patch')), | (b'', b'patch', False, _(b'make changes to wdir parent by editing patch')), | ||||
| (b'', b'close-branch', None, | (b'', b'close-branch', None, | ||||
| _(b'mark a branch as closed, hiding it from the branch list')), | _(b'mark a branch as closed, hiding it from the branch list')), | ||||
| (b's', b'secret', None, _(b'use the secret phase for committing')), | (b's', b'secret', None, _(b'use the secret phase for committing')), | ||||
| (b'n', b'note', b'', _(b'store a note on amend'), _(b'TEXT')), | (b'n', b'note', b'', _(b'store a note on amend'), _(b'TEXT')), | ||||
| ] + walkopts + commitopts + commitopts2 + commitopts3 + interactiveopt, | ] + walkopts + commitopts + commitopts2 + commitopts3 + interactiveopt, | ||||
| _(b'[OPTION]... [FILE]...'), | _(b'[OPTION]... [FILE]...'), | ||||
| helpbasic=True) | helpbasic=True, | ||||
| helpcategory=registrar.command.CATEGORY_COMMITTING) | |||||
| def amend(ui, repo, *pats, **opts): | def amend(ui, repo, *pats, **opts): | ||||
| """combine a changeset with updates and replace it with a new one | """combine a changeset with updates and replace it with a new one | ||||
| Commits a new changeset incorporating both the changes to the given files | Commits a new changeset incorporating both the changes to the given files | ||||
| and all the changes from the current parent changeset into the repository. | and all the changes from the current parent changeset into the repository. | ||||
| See :hg:`commit` for details about committing changes. | See :hg:`commit` for details about committing changes. | ||||
| @eh.command( | @eh.command( | ||||
| b'uncommit', | b'uncommit', | ||||
| [(b'a', b'all', None, _(b'uncommit all changes when no arguments given')), | [(b'a', b'all', None, _(b'uncommit all changes when no arguments given')), | ||||
| (b'i', b'interactive', False, _(b'interactive mode to uncommit (EXPERIMENTAL)')), | (b'i', b'interactive', False, _(b'interactive mode to uncommit (EXPERIMENTAL)')), | ||||
| (b'r', b'rev', b'', _(b'revert commit content to REV instead'), _(b'REV')), | (b'r', b'rev', b'', _(b'revert commit content to REV instead'), _(b'REV')), | ||||
| (b'', b'revert', False, _(b'discard working directory changes after uncommit')), | (b'', b'revert', False, _(b'discard working directory changes after uncommit')), | ||||
| (b'n', b'note', b'', _(b'store a note on uncommit'), _(b'TEXT')), | (b'n', b'note', b'', _(b'store a note on uncommit'), _(b'TEXT')), | ||||
| ] + commands.walkopts + commitopts + commitopts2 + commitopts3, | ] + commands.walkopts + commitopts + commitopts2 + commitopts3, | ||||
| _(b'[OPTION]... [NAME]')) | _(b'[OPTION]... [NAME]'), | ||||
| helpcategory=registrar.command.CATEGORY_COMMITTING) | |||||
| def uncommit(ui, repo, *pats, **opts): | def uncommit(ui, repo, *pats, **opts): | ||||
| """move changes from parent revision to working directory | """move changes from parent revision to working directory | ||||
| Changes to selected files in the checked out revision appear again as | Changes to selected files in the checked out revision appear again as | ||||
| uncommitted changed in the working directory. A new revision | uncommitted changed in the working directory. A new revision | ||||
| without the selected changes is created, becomes the checked out | without the selected changes is created, becomes the checked out | ||||
| revision, and obsoletes the previous one. | revision, and obsoletes the previous one. | ||||
| @eh.command( | @eh.command( | ||||
| b'fold|squash', | b'fold|squash', | ||||
| [(b'r', b'rev', [], _(b"revision to fold"), _(b'REV')), | [(b'r', b'rev', [], _(b"revision to fold"), _(b'REV')), | ||||
| (b'', b'exact', None, _(b"only fold specified revisions")), | (b'', b'exact', None, _(b"only fold specified revisions")), | ||||
| (b'', b'from', None, _(b"fold revisions linearly to working copy parent")), | (b'', b'from', None, _(b"fold revisions linearly to working copy parent")), | ||||
| (b'n', b'note', b'', _(b'store a note on fold'), _(b'TEXT')), | (b'n', b'note', b'', _(b'store a note on fold'), _(b'TEXT')), | ||||
| ] + commitopts + commitopts2 + commitopts3, | ] + commitopts + commitopts2 + commitopts3, | ||||
| _(b'hg fold [OPTION]... [-r] REV'), | _(b'hg fold [OPTION]... [-r] REV'), | ||||
| helpbasic=True) | helpbasic=True, | ||||
| helpcategory=registrar.command.CATEGORY_CHANGE_MANAGEMENT) | |||||
| def fold(ui, repo, *revs, **opts): | def fold(ui, repo, *revs, **opts): | ||||
| """fold multiple revisions into a single one | """fold multiple revisions into a single one | ||||
| With --from, folds all the revisions linearly between the given revisions | With --from, folds all the revisions linearly between the given revisions | ||||
| and the parent of the working directory. | and the parent of the working directory. | ||||
| With --exact, folds only the specified revisions while ignoring the | With --exact, folds only the specified revisions while ignoring the | ||||
| parent of the working directory. In this case, the given revisions must | parent of the working directory. In this case, the given revisions must | ||||
| lockmod.release(lock, wlock) | lockmod.release(lock, wlock) | ||||
| @eh.command( | @eh.command( | ||||
| b'metaedit', | b'metaedit', | ||||
| [(b'r', b'rev', [], _(b"revision to edit"), _(b'REV')), | [(b'r', b'rev', [], _(b"revision to edit"), _(b'REV')), | ||||
| (b'', b'fold', None, _(b"also fold specified revisions into one")), | (b'', b'fold', None, _(b"also fold specified revisions into one")), | ||||
| (b'n', b'note', b'', _(b'store a note on metaedit'), _(b'TEXT')), | (b'n', b'note', b'', _(b'store a note on metaedit'), _(b'TEXT')), | ||||
| ] + commitopts + commitopts2 + commitopts3, | ] + commitopts + commitopts2 + commitopts3, | ||||
| _(b'hg metaedit [OPTION]... [-r] [REV]')) | _(b'hg metaedit [OPTION]... [-r] [REV]'), | ||||
| helpcategory=registrar.command.CATEGORY_CHANGE_MANAGEMENT) | |||||
| def metaedit(ui, repo, *revs, **opts): | def metaedit(ui, repo, *revs, **opts): | ||||
| """edit commit information | """edit commit information | ||||
| Edits the commit information for the specified revisions. By default, edits | Edits the commit information for the specified revisions. By default, edits | ||||
| commit information for the working directory parent. | commit information for the working directory parent. | ||||
| With --fold, also folds multiple revisions into one if necessary. In this | With --fold, also folds multiple revisions into one if necessary. In this | ||||
| case, the given revisions must form a linear unbroken chain. | case, the given revisions must form a linear unbroken chain. | ||||
| (b'', b'biject', False, _(b"alias to --pair (DEPRECATED)")), | (b'', b'biject', False, _(b"alias to --pair (DEPRECATED)")), | ||||
| (b'', b'fold', False, | (b'', b'fold', False, | ||||
| _(b"record a fold (multiple precursors, one successor)")), | _(b"record a fold (multiple precursors, one successor)")), | ||||
| (b'', b'split', False, | (b'', b'split', False, | ||||
| _(b"record a split (one precursor, multiple successors)")), | _(b"record a split (one precursor, multiple successors)")), | ||||
| (b'B', b'bookmark', [], _(b"remove revs only reachable from given" | (b'B', b'bookmark', [], _(b"remove revs only reachable from given" | ||||
| b" bookmark"), _(b'BOOKMARK'))] + metadataopts, | b" bookmark"), _(b'BOOKMARK'))] + metadataopts, | ||||
| _(b'[OPTION] [-r] REV...'), | _(b'[OPTION] [-r] REV...'), | ||||
| helpbasic=True) | helpbasic=True, | ||||
| helpcategory=registrar.command.CATEGORY_CHANGE_MANAGEMENT) | |||||
| # XXX -U --noupdate option to prevent wc update and or bookmarks update ? | # XXX -U --noupdate option to prevent wc update and or bookmarks update ? | ||||
| def cmdprune(ui, repo, *revs, **opts): | def cmdprune(ui, repo, *revs, **opts): | ||||
| """mark changesets as obsolete or succeeded by another changeset | """mark changesets as obsolete or succeeded by another changeset | ||||
| Pruning changesets marks them obsolete, hiding them from the | Pruning changesets marks them obsolete, hiding them from the | ||||
| history log, provided they have no descendants. Otherwise, all | history log, provided they have no descendants. Otherwise, all | ||||
| such descendants that aren't themselves obsolete become | such descendants that aren't themselves obsolete become | ||||
| "unstable". Use :hg:`evolve` to handle this situation. | "unstable". Use :hg:`evolve` to handle this situation. | ||||
| @eh.command( | @eh.command( | ||||
| b'split', | b'split', | ||||
| [(b'i', b'interactive', True, _(b'use interactive mode')), | [(b'i', b'interactive', True, _(b'use interactive mode')), | ||||
| (b'r', b'rev', [], _(b"revision to split"), _(b'REV')), | (b'r', b'rev', [], _(b"revision to split"), _(b'REV')), | ||||
| (b'n', b'note', b'', _(b"store a note on split"), _(b'TEXT')), | (b'n', b'note', b'', _(b"store a note on split"), _(b'TEXT')), | ||||
| ] + commitopts + commitopts2 + commitopts3, | ] + commitopts + commitopts2 + commitopts3, | ||||
| _(b'hg split [OPTION] [-r REV] [FILES]'), | _(b'hg split [OPTION] [-r REV] [FILES]'), | ||||
| helpbasic=True) | helpbasic=True, | ||||
| helpcategory=registrar.command.CATEGORY_CHANGE_MANAGEMENT) | |||||
| def cmdsplit(ui, repo, *pats, **opts): | def cmdsplit(ui, repo, *pats, **opts): | ||||
| """split a changeset into smaller changesets | """split a changeset into smaller changesets | ||||
| By default, split the current revision by prompting for all its hunks to be | By default, split the current revision by prompting for all its hunks to be | ||||
| redistributed into new changesets. | redistributed into new changesets. | ||||
| Use --rev to split a given changeset instead. | Use --rev to split a given changeset instead. | ||||
| [(b'r', b'rev', [], _(b'revision to update'), _(b'REV')), | [(b'r', b'rev', [], _(b'revision to update'), _(b'REV')), | ||||
| (b'n', b'note', b'', _(b'store a note on touch'), _(b'TEXT')), | (b'n', b'note', b'', _(b'store a note on touch'), _(b'TEXT')), | ||||
| (b'D', b'duplicate', False, | (b'D', b'duplicate', False, | ||||
| b'do not mark the new revision as successor of the old one'), | b'do not mark the new revision as successor of the old one'), | ||||
| (b'A', b'allowdivergence', False, | (b'A', b'allowdivergence', False, | ||||
| b'mark the new revision as successor of the old one potentially creating ' | b'mark the new revision as successor of the old one potentially creating ' | ||||
| b'divergence')], | b'divergence')], | ||||
| # allow to choose the seed ? | # allow to choose the seed ? | ||||
| _(b'[-r] revs')) | _(b'[-r] revs'), | ||||
| helpcategory=registrar.command.CATEGORY_CHANGE_MANAGEMENT) | |||||
| def touch(ui, repo, *revs, **opts): | def touch(ui, repo, *revs, **opts): | ||||
| """create successors identical to their predecessors but the changeset ID | """create successors identical to their predecessors but the changeset ID | ||||
| This is used to "resurrect" changesets | This is used to "resurrect" changesets | ||||
| """ | """ | ||||
| _checknotesize(ui, opts) | _checknotesize(ui, opts) | ||||
| revs = list(revs) | revs = list(revs) | ||||
| revs.extend(opts['rev']) | revs.extend(opts['rev']) | ||||
| repo.dirstate.setparents(new, node.nullid) | repo.dirstate.setparents(new, node.nullid) | ||||
| @eh.command( | @eh.command( | ||||
| b'pick|grab', | b'pick|grab', | ||||
| [(b'r', b'rev', b'', _(b'revision to pick'), _(b'REV')), | [(b'r', b'rev', b'', _(b'revision to pick'), _(b'REV')), | ||||
| (b'c', b'continue', False, b'continue interrupted pick'), | (b'c', b'continue', False, b'continue interrupted pick'), | ||||
| (b'a', b'abort', False, b'abort interrupted pick'), | (b'a', b'abort', False, b'abort interrupted pick'), | ||||
| ] + mergetoolopts, | ] + mergetoolopts, | ||||
| _(b'[-r] rev')) | _(b'[-r] rev'), | ||||
| helpcategory=registrar.command.CATEGORY_WORKING_DIRECTORY) | |||||
| def cmdpick(ui, repo, *revs, **opts): | def cmdpick(ui, repo, *revs, **opts): | ||||
| """move a commit on the top of working directory parent and updates to it.""" | """move a commit on the top of working directory parent and updates to it.""" | ||||
| cont = opts.get('continue') | cont = opts.get('continue') | ||||
| abort = opts.get('abort') | abort = opts.get('abort') | ||||
| if cont and abort: | if cont and abort: | ||||
| raise error.Abort(_(b"cannot specify both --continue and --abort")) | raise error.Abort(_(b"cannot specify both --continue and --abort")) | ||||
| hg, | hg, | ||||
| merge, | merge, | ||||
| mergeutil, | mergeutil, | ||||
| node as nodemod, | node as nodemod, | ||||
| obsolete, | obsolete, | ||||
| obsutil, | obsutil, | ||||
| phases, | phases, | ||||
| pycompat, | pycompat, | ||||
| registrar, | |||||
| repair, | repair, | ||||
| scmutil, | scmutil, | ||||
| simplemerge, | simplemerge, | ||||
| util, | util, | ||||
| ) | ) | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| (b'', b'update', False, _(b'update to the head of evolved changesets')), | (b'', b'update', False, _(b'update to the head of evolved changesets')), | ||||
| (b'c', b'continue', False, _(b'continue an interrupted evolution')), | (b'c', b'continue', False, _(b'continue an interrupted evolution')), | ||||
| (b'', b'stop', False, _(b'stop the interrupted evolution')), | (b'', b'stop', False, _(b'stop the interrupted evolution')), | ||||
| (b'', b'abort', False, _(b'abort the interrupted evolution')), | (b'', b'abort', False, _(b'abort the interrupted evolution')), | ||||
| (b'l', b'list', False, _(b'provide details on troubled changesets' | (b'l', b'list', False, _(b'provide details on troubled changesets' | ||||
| b' in the repo')), | b' in the repo')), | ||||
| ] + mergetoolopts, | ] + mergetoolopts, | ||||
| _(b'[OPTIONS]...'), | _(b'[OPTIONS]...'), | ||||
| helpbasic=True | helpbasic=True, | ||||
| helpcategory=registrar.command.CATEGORY_CHANGE_MANAGEMENT | |||||
| ) | ) | ||||
| def evolve(ui, repo, **opts): | def evolve(ui, repo, **opts): | ||||
| """solve troubled changesets in your repository | """solve troubled changesets in your repository | ||||
| Modifying history can lead to various types of troubled changesets: | Modifying history can lead to various types of troubled changesets: | ||||
| orphan, phase-divergent, or content-divergent. The evolve command resolves | orphan, phase-divergent, or content-divergent. The evolve command resolves | ||||
| your troubles by executing one of the following actions: | your troubles by executing one of the following actions: | ||||
| from mercurial import ( | from mercurial import ( | ||||
| commands, | commands, | ||||
| error, | error, | ||||
| graphmod, | graphmod, | ||||
| patch, | patch, | ||||
| obsutil, | obsutil, | ||||
| node as nodemod, | node as nodemod, | ||||
| pycompat, | pycompat, | ||||
| registrar, | |||||
| scmutil, | scmutil, | ||||
| util, | util, | ||||
| ) | ) | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| from . import ( | from . import ( | ||||
| compat, | compat, | ||||
| @eh.command( | @eh.command( | ||||
| b'obslog|olog', | b'obslog|olog', | ||||
| [(b'G', b'graph', True, _(b"show the revision DAG")), | [(b'G', b'graph', True, _(b"show the revision DAG")), | ||||
| (b'r', b'rev', [], _(b'show the specified revision or revset'), _(b'REV')), | (b'r', b'rev', [], _(b'show the specified revision or revset'), _(b'REV')), | ||||
| (b'a', b'all', False, _(b'show all related changesets, not only precursors')), | (b'a', b'all', False, _(b'show all related changesets, not only precursors')), | ||||
| (b'p', b'patch', False, _(b'show the patch between two obs versions')), | (b'p', b'patch', False, _(b'show the patch between two obs versions')), | ||||
| (b'f', b'filternonlocal', False, _(b'filter out non local commits')), | (b'f', b'filternonlocal', False, _(b'filter out non local commits')), | ||||
| ] + commands.formatteropts, | ] + commands.formatteropts, | ||||
| _(b'hg olog [OPTION]... [REV]')) | _(b'hg olog [OPTION]... [REV]'), | ||||
| helpcategory=registrar.command.CATEGORY_CHANGE_NAVIGATION) | |||||
| def cmdobshistory(ui, repo, *revs, **opts): | def cmdobshistory(ui, repo, *revs, **opts): | ||||
| """show the obsolescence history of the specified revisions | """show the obsolescence history of the specified revisions | ||||
| If no revision range is specified, we display the log for the current | If no revision range is specified, we display the log for the current | ||||
| working copy parent. | working copy parent. | ||||
| By default this command prints the selected revisions and all its | By default this command prints the selected revisions and all its | ||||
| precursors. For precursors pointing on existing revisions in the repository, | precursors. For precursors pointing on existing revisions in the repository, | ||||
| from __future__ import absolute_import | from __future__ import absolute_import | ||||
| import collections | import collections | ||||
| import hashlib | import hashlib | ||||
| from mercurial import ( | from mercurial import ( | ||||
| cmdutil, | cmdutil, | ||||
| error, | error, | ||||
| hg, | hg, | ||||
| obsolete, | obsolete, | ||||
| obsutil, | obsutil, | ||||
| registrar, | |||||
| scmutil, | scmutil, | ||||
| ) | ) | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| from . import ( | from . import ( | ||||
| exthelper, | exthelper, | ||||
| rewriteutil, | rewriteutil, | ||||
| (b'', b'as-divergence', None, _(b"preserve current latest successors")), | (b'', b'as-divergence', None, _(b"preserve current latest successors")), | ||||
| (b'', b'exact', None, _(b"only rewind explicitly selected revisions")), | (b'', b'exact', None, _(b"only rewind explicitly selected revisions")), | ||||
| (b'', b'from', [], | (b'', b'from', [], | ||||
| _(b"rewind these revisions to their predecessors"), _(b'REV')), | _(b"rewind these revisions to their predecessors"), _(b'REV')), | ||||
| (b'k', b'keep', None, | (b'k', b'keep', None, | ||||
| _(b"do not modify working directory during rewind")), | _(b"do not modify working directory during rewind")), | ||||
| ], | ], | ||||
| _(b'[--as-divergence] [--exact] [--keep] [--to REV]... [--from REV]...'), | _(b'[--as-divergence] [--exact] [--keep] [--to REV]... [--from REV]...'), | ||||
| helpbasic=True) | helpbasic=True, | ||||
| helpcategory=registrar.command.CATEGORY_CHANGE_MANAGEMENT) | |||||
| def rewind(ui, repo, **opts): | def rewind(ui, repo, **opts): | ||||
| """rewind a stack of changesets to a previous state | """rewind a stack of changesets to a previous state | ||||
| This command can be used to restore stacks of changesets to an obsolete | This command can be used to restore stacks of changesets to an obsolete | ||||
| state, creating identical copies. | state, creating identical copies. | ||||
| There are two main ways to select the rewind target. Rewinding "from" | There are two main ways to select the rewind target. Rewinding "from" | ||||
| changesets will restore the direct predecessors of these changesets (and | changesets will restore the direct predecessors of these changesets (and | ||||
| @command(b'topics', [ | @command(b'topics', [ | ||||
| (b'', b'clear', False, b'clear active topic if any'), | (b'', b'clear', False, b'clear active topic if any'), | ||||
| (b'r', b'rev', [], b'revset of existing revisions', _(b'REV')), | (b'r', b'rev', [], b'revset of existing revisions', _(b'REV')), | ||||
| (b'l', b'list', False, b'show the stack of changeset in the topic'), | (b'l', b'list', False, b'show the stack of changeset in the topic'), | ||||
| (b'', b'age', False, b'show when you last touched the topics'), | (b'', b'age', False, b'show when you last touched the topics'), | ||||
| (b'', b'current', None, b'display the current topic only'), | (b'', b'current', None, b'display the current topic only'), | ||||
| ] + commands.formatteropts, | ] + commands.formatteropts, | ||||
| _(b'hg topics [TOPIC]')) | _(b'hg topics [TOPIC]'), | ||||
| helpcategory=command.CATEGORY_CHANGE_ORGANIZATION) | |||||
| def topics(ui, repo, topic=None, **opts): | def topics(ui, repo, topic=None, **opts): | ||||
| """View current topic, set current topic, change topic for a set of revisions, or see all topics. | """View current topic, set current topic, change topic for a set of revisions, or see all topics. | ||||
| Clear topic on existing topiced revisions:: | Clear topic on existing topiced revisions:: | ||||
| hg topics --rev <related revset> --clear | hg topics --rev <related revset> --clear | ||||
| Change topic on some revisions:: | Change topic on some revisions:: | ||||
| else: | else: | ||||
| _listtopics(ui, repo, opts) | _listtopics(ui, repo, opts) | ||||
| return ret | return ret | ||||
| @command(b'stack', [ | @command(b'stack', [ | ||||
| (b'c', b'children', None, | (b'c', b'children', None, | ||||
| _(b'display data about children outside of the stack')) | _(b'display data about children outside of the stack')) | ||||
| ] + commands.formatteropts, | ] + commands.formatteropts, | ||||
| _(b'hg stack [TOPIC]')) | _(b'hg stack [TOPIC]'), | ||||
| helpcategory=command.CATEGORY_CHANGE_ORGANIZATION) | |||||
| def cmdstack(ui, repo, topic=b'', **opts): | def cmdstack(ui, repo, topic=b'', **opts): | ||||
| """list all changesets in a topic and other information | """list all changesets in a topic and other information | ||||
| List the current topic by default. | List the current topic by default. | ||||
| The --verbose version shows short nodes for the commits also. | The --verbose version shows short nodes for the commits also. | ||||
| """ | """ | ||||
| if not topic: | if not topic: | ||||