Commit e57a5e20 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

branching: merge with stable

Pipeline #6654 failed with stage
in 5 minutes and 18 seconds
......@@ -153,35 +153,28 @@ Servers does not need to activate the effect flag recording. Effect flags that
you create will not cause interference with other clients or servers without
the effect flag recording.
Templates
=========
Evolve ship several templates that you can use to have a better visibility
about your obs history:
- precursors, for each obsolete changeset show the closest visible
precursors.
- successors, for each obsolete changeset show the closest visible
successors. It is useful when your working directory is obsolete to see
what are its successors. This information can also be retrieved with the
obslog command and the --all option.
- obsfate, for each obsolete changeset display a line summarizing what
changed between the changeset and its successors. Depending on the
verbosity level (-q and -v) it display the changeset successors, the users
that created the obsmarkers and the date range of these changes.
The template itself is not complex, the data are basically a list of
successortset. Each successorset is a dict with these fields:
- "verb", how did the revision changed, pruned or rewritten for the moment
- "users" a sorted list of users that have create obs marker between current
changeset and one of its successor
- "min_date" the tiniest date of the first obs marker between current
changeset and one of its successor
- "max_date" the biggest date between current changeset and one of its
successor
- "successors" a sorted list of locally know successors node ids
- "markers" the raw list of changesets.
Template keywords
=================
Evolve provides one template keyword that helps explore obsolescence history:
- obsorigin, for each changeset display a line summarizing what changed
between the changeset and its predecessors. Depending on the verbosity
level (-q and -v) it displays the users that created the obsmarkers and the
date range of these operations.
Evolve used to provide these template keywords, which since have been included
in core Mercurial (see :hg:`help templates -v`):
- obsolete
- obsfate (including obsfatedata, see also obsfate* template functions)
For compatibility, this extension also provides the following aliases to
template keywords from core Mercurial:
- precursors (deprecated, use predecessors instead)
- successors (deprecated, use successorssets instead)
- troubles (deprecated, use instabilities instead)
"""
evolutionhelptext = b"""
......
......@@ -219,9 +219,14 @@ def _fatemarkers(repo, ctx, filternonlocal):
r = obsutil.successorsandmarkers(repo, ctx)
if r is None:
r = []
for succset in sorted(r):
if succset[b'markers']:
yield (succset[b'successors'], succset[b'markers'])
# replacing dicts and sets, they can't be compared
data = [
(succset[b'successors'], tuple(sorted(succset[b'markers'])))
for succset in r
]
for (nodes, markers) in sorted(data):
if markers:
yield (nodes, markers)
else:
markers = successors.get(ctx.node(), ())
for marker in sorted(markers):
......
......@@ -5,4 +5,4 @@ Enable obsolescence to avoid the warning issue when obsmarkers are found
> evolution = all
> EOF
$ $TESTDIR/../contrib/check-compat-strings.sh "$TESTDIR/../hgext3rd/" "$RUNTESTDIR/.."
$ $TESTDIR/testlib/check-compat-strings.sh "$TESTDIR/../hgext3rd/" "$RUNTESTDIR/.."
......@@ -98,6 +98,11 @@ Check that obslog on the divergent revision shows both destinations
+A1
$ hg obslog --hidden 'desc(A0)' --no-origin -f
x 471f378eab4c (1) A0
reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
Check that with all option, every changeset is shown
$ hg obslog --hidden --all 471f378eab4c --patch
......@@ -123,6 +128,15 @@ Check that with all option, every changeset is shown
|
x 471f378eab4c (1) A0
$ hg obslog --hidden --all 'desc(A0)' --no-origin -f
@ 65b757b745b9 (3) A2
|
| * fdf9bde5129a (2) A1
|/
x 471f378eab4c (1) A0
reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
$ hg obslog --hidden 471f378eab4c --no-graph --no-origin -Tjson | python -m json.tool
[
{
......
This test file test the various messages when accessing obsolete
revisions.
Testing obslog and other commands accessing obsolete revisions.
Global setup
============
......
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