Mercurial > hg > evolve
changeset 4884:85a97f37c78f mercurial-5.0
branching: merge the two mercurial-5.0 heads
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 29 Jul 2019 14:42:49 +0200 (2019-07-29) |
parents | 1340d6718a88 (current diff) 9ae3a1d71d4b (diff) |
children | f1af4909c6dc |
files | CHANGELOG hgext3rd/evolve/__init__.py hgext3rd/evolve/cmdrewrite.py hgext3rd/evolve/evolvecmd.py tests/test-evolve.t |
diffstat | 7 files changed, 23 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ * pick: no longer forget file in case of conflict (issue6037) * pick: properly report and cleanup "unfinished state" * prune: don't update wcp if pruned revision are unrelated (issue6137) + * prune: spell --successor flag without any unnecessary shortcuts * evolve: properly prune changeset with no change in case of conflict (issue5967) * touch: detect resulting divergence in more cases (issue6107)
--- a/docs/evolve-faq.rst +++ b/docs/evolve-faq.rst @@ -157,11 +157,11 @@ Fix my history afterward: ``prune -n`` -------------------------------------- -Sometimes you need to create an obsolete marker by hand. This may happen when -upstream has applied some of your patches for example. +Sometimes you need to create an obsolescence marker by hand. This may happen +when upstream has applied some of your patches for example. -you can use ``hg prune <old-changeset> --succ <new-changeset>`` to add obsolete -marker. +You can use ``hg prune <old-changeset> --successor <new-changeset>`` to add +obsolescence marker. View diff from the last amend ----------------------------- @@ -172,8 +172,8 @@ [alias] odiff = diff --rev 'limit(predecessors(.),1)' --rev . -View obsolete markers ---------------------- +View obsolescence markers +------------------------- hgview_ is the only viewer that currently supports this feature. You need version 1.6.2 @@ -204,12 +204,3 @@ graphical viewer do not. You can use ``hg log --graph --hidden`` from the command line - - - - - - - - -
--- a/hgext3rd/evolve/__init__.py +++ b/hgext3rd/evolve/__init__.py @@ -1274,7 +1274,7 @@ revs = repo.revs("(%ld)::", revs) kwargs['rev'] = [] kwargs['new'] = [] - kwargs['succ'] = [] + kwargs['successor'] = [] kwargs['biject'] = False return cmdrewrite.cmdprune(ui, repo, *revs, **kwargs)
--- a/hgext3rd/evolve/cmdrewrite.py +++ b/hgext3rd/evolve/cmdrewrite.py @@ -965,7 +965,7 @@ @eh.command( b'prune|obsolete', [(b'n', b'new', [], _(b"successor changeset (DEPRECATED)")), - (b's', b'succ', [], _(b"successor changeset"), _(b'REV')), + (b's', b'successor', [], _(b"successor changeset"), _(b'REV')), (b'r', b'rev', [], _(b"revisions to prune"), _(b'REV')), (b'k', b'keep', None, _(b"does not modify working copy during prune")), (b'n', b'note', b'', _(b'store a note on prune'), _(b'TEXT')), @@ -973,9 +973,9 @@ b"(pairing multiple precursors to multiple successors)")), (b'', b'biject', False, _(b"alias to --pair (DEPRECATED)")), (b'', b'fold', False, - _(b"record a fold (multiple precursors, one successors)")), + _(b"record a fold (multiple precursors, one successor)")), (b'', b'split', False, - _(b"record a split (on precursor, multiple successors)")), + _(b"record a split (one precursor, multiple successors)")), (b'B', b'bookmark', [], _(b"remove revs only reachable from given" b" bookmark"), _(b'BOOKMARK'))] + metadataopts, _(b'[OPTION] [-r] REV...'), @@ -992,23 +992,23 @@ When you prune the parent of your working copy, Mercurial updates the working copy to a non-obsolete parent. - You can use ``-s/--succ`` to tell Mercurial that a newer version (successor) of the - pruned changeset exists. Mercurial records successor revisions in obsolescence - markers. + You can use ``-s/--successor`` to tell Mercurial that a newer version + (successor) of the pruned changeset exists. Mercurial records successor + revisions in obsolescence markers. If you prune a single revision and specify multiple revisions in - ``-s/--succ``, you are recording a "split" and must acknowledge it by + ``-s/--successor``, you are recording a "split" and must acknowledge it by passing ``--split``. Similarly, when you prune multiple changesets with a single successor, you must pass the ``--fold`` option. - If you want to supersede multiple revisions at the same time, use + If you want to supersede multiple revisions at the same time, use the ``--pair`` option to pair the pruned precursor and successor changesets. This is commonly useful for resolving history divergence, or when someone - else does edits history without obsolescence enabled. + else edits history without obsolescence enabled. """ _checknotesize(ui, opts) revs = scmutil.revrange(repo, list(revs) + opts.get('rev')) - succs = opts['new'] + opts['succ'] + succs = opts['new'] + opts['successor'] bookmarks = set(opts.get('bookmark')) metadata = _getmetadata(**opts) biject = opts.get('pair') or opts.get('biject')
--- a/hgext3rd/evolve/evolvecmd.py +++ b/hgext3rd/evolve/evolvecmd.py @@ -1537,8 +1537,9 @@ If so, evolve rebases that changeset. If not, evolve refuses to guess your intention, and gives a hint about what you might want to do next. - When ``--update`` is used, successful evolve operations update the - working directory to the newly created changesets. + When ``--update`` is used, successful evolve operations update the working + directory to the newly created changesets. Moreover, an update will always + be performed if the current working directory parent is obsolete. Automatic mode only handles common use cases. For example, it avoids taking action in the case of ambiguity, and it ignores orphan changesets that are
--- a/tests/test-evolve-split.t +++ b/tests/test-evolve-split.t @@ -42,7 +42,7 @@ $ printf "pp" > pp; $ hg add pp $ hg commit -m "_pp" - $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split + $ hg prune --successor "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split 1 changesets pruned 1 new orphan changesets $ hg log -G