Mercurial > evolve
changeset 4774:12a88b988875
branching: merge stable into default
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 29 Jul 2019 13:54:57 +0200 |
parents | 75bc0a51809a (current diff) c1d0faaa5b92 (diff) |
children | cc96716f2ebf 395ab63d2af7 |
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 Wed Jul 17 12:47:37 2019 -0700 +++ b/CHANGELOG Mon Jul 29 13:54:57 2019 +0200 @@ -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 Wed Jul 17 12:47:37 2019 -0700 +++ b/docs/evolve-faq.rst Mon Jul 29 13:54:57 2019 +0200 @@ -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 Wed Jul 17 12:47:37 2019 -0700 +++ b/hgext3rd/evolve/__init__.py Mon Jul 29 13:54:57 2019 +0200 @@ -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 Wed Jul 17 12:47:37 2019 -0700 +++ b/hgext3rd/evolve/cmdrewrite.py Mon Jul 29 13:54:57 2019 +0200 @@ -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 Wed Jul 17 12:47:37 2019 -0700 +++ b/hgext3rd/evolve/evolvecmd.py Mon Jul 29 13:54:57 2019 +0200 @@ -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 Wed Jul 17 12:47:37 2019 -0700 +++ b/tests/test-evolve-split.t Mon Jul 29 13:54:57 2019 +0200 @@ -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
--- a/tests/test-evolve.t Wed Jul 17 12:47:37 2019 -0700 +++ b/tests/test-evolve.t Mon Jul 29 13:54:57 2019 +0200 @@ -595,7 +595,7 @@ picking 3:0e84df4912da "add 3" $ hg graft -r1 grafting 1:73d38bb17fd7 "add 1" - $ hg prune -r2 --succ . + $ hg prune -r2 --successor . 1 changesets pruned $ glog --hidden @ 6:417185465d2c@default(draft) add 1