# HG changeset patch # User Pierre-Yves David # Date 1564404169 -7200 # Node ID 85a97f37c78f633197965ba588c226755ac600c3 # Parent 1340d6718a881c8c35bbdd02188250d9275a2ebe# Parent 9ae3a1d71d4b2afc2d8ecdcc135ea76f232b3d6d branching: merge the two mercurial-5.0 heads diff -r 1340d6718a88 -r 85a97f37c78f CHANGELOG --- a/CHANGELOG Mon Jul 29 13:19:54 2019 +0200 +++ b/CHANGELOG Mon Jul 29 14:42:49 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) diff -r 1340d6718a88 -r 85a97f37c78f docs/evolve-faq.rst --- a/docs/evolve-faq.rst Mon Jul 29 13:19:54 2019 +0200 +++ b/docs/evolve-faq.rst Mon Jul 29 14:42:49 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 --succ `` to add obsolete -marker. +You can use ``hg prune --successor `` 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 - - - - - - - - - diff -r 1340d6718a88 -r 85a97f37c78f hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Mon Jul 29 13:19:54 2019 +0200 +++ b/hgext3rd/evolve/__init__.py Mon Jul 29 14:42:49 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) diff -r 1340d6718a88 -r 85a97f37c78f hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Mon Jul 29 13:19:54 2019 +0200 +++ b/hgext3rd/evolve/cmdrewrite.py Mon Jul 29 14:42:49 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') diff -r 1340d6718a88 -r 85a97f37c78f hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Mon Jul 29 13:19:54 2019 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Mon Jul 29 14:42:49 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 diff -r 1340d6718a88 -r 85a97f37c78f tests/test-evolve-split.t --- a/tests/test-evolve-split.t Mon Jul 29 13:19:54 2019 +0200 +++ b/tests/test-evolve-split.t Mon Jul 29 14:42:49 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 diff -r 1340d6718a88 -r 85a97f37c78f tests/test-evolve.t --- a/tests/test-evolve.t Mon Jul 29 13:19:54 2019 +0200 +++ b/tests/test-evolve.t Mon Jul 29 14:42:49 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