Read about our upcoming Code of Conduct on this issue

Commit aae91a21 authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

branching: merge stable into default

......@@ -19,6 +19,7 @@ Changelog
* 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)
......
......@@ -157,11 +157,11 @@ You can also use evolve to solve `phase-divergent` and `content-divergent` chang
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 @@ An ``odiff`` alias have been added by ``enable.sh``
[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 @@ Only ``hg log`` and ``hgview`` support it, other
graphical viewer do not.
You can use ``hg log --graph --hidden`` from the command line
......@@ -1274,7 +1274,7 @@ def stripwrapper(orig, ui, repo, *revs, **kwargs):
revs = repo.revs("(%ld)::", revs)
kwargs['rev'] = []
kwargs['new'] = []
kwargs['succ'] = []
kwargs['successor'] = []
kwargs['biject'] = False
return cmdrewrite.cmdprune(ui, repo, *revs, **kwargs)
......
......@@ -965,7 +965,7 @@ def _getmetadata(**opts):
@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 @@ def _getmetadata(**opts):
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 @@ def cmdprune(ui, repo, *revs, **opts):
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')
......
......@@ -1537,8 +1537,9 @@ def evolve(ui, repo, **opts):
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
......
......@@ -42,7 +42,7 @@ Create a split commit
$ 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
......
......@@ -595,7 +595,7 @@ Normal testing
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment