This instance will be upgraded to Heptapod 0.23.2 on 2021-08-05 at 11:00 UTC+2 (a few minutes of down time)

Commit 3da0a91d authored by Anton Shestakov's avatar Anton Shestakov
Browse files

branching: merge into stable in preparation for release

--HG--
branch : stable
Pipeline #12248 passed with stage
in 4 minutes and 8 seconds
flake8:
image: octobus/ci-py2-hgext3rd
script:
- hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' -X hgext3rd/evolve/thirdparty | xargs -0 flake8
.prepare_hg: &prepare_hg
- hg pull -R /ci/repos/mercurial/
- hg_branch=$(tests/testlib/map-hg-rev.sh "$(hg identify --branch)")
- hg -R /ci/repos/mercurial/ update "$hg_branch"
- hg_rev=$(hg log -R /ci/repos/mercurial/ -r . -T '{node}')
- echo testing with mercurial branch="$hg_branch", revision="$hg_rev"
pytype:
image: octobus/ci-py3-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- echo testing with mercurial branch="$hg_rev", revision="$(hg log -R /ci/repos/mercurial/ -r . -T '{node}')"
- *prepare_hg
- pytype --version
- jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')
- pytype -P /ci/repos/mercurial/:hgext3rd -k hgext3rd -x hgext3rd/evolve/thirdparty -j $jobs || true
when: manual
tests-py2-cext:
image: octobus/ci-py2-hgext3rd
variables:
PY: py2
PYTHON: python
RUNTEST_ARGS: ""
TEST_HGMODULEPOLICY: "allow"
.runtests_template: &runtests
image: octobus/ci-$PY-hgext3rd
before_script:
- (cd tests; ls -1 test-check-*.t > /tmp/check-tests.txt)
script:
- hg pull -R /ci/repos/mercurial/
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- echo testing with mercurial branch="$hg_rev", revision="$(hg log -R /ci/repos/mercurial/ -r . -T '{node}')"
- (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always)
- *prepare_hg
- ("$PYTHON" --version)
- (cd tests; set -x; HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" /ci/repos/mercurial/tests/run-tests.py --color=always $RUNTEST_ARGS)
checks-py2:
<<: *runtests
variables:
RUNTEST_ARGS: "--test-list /tmp/check-tests.txt"
checks-py3:
<<: *runtests
variables:
PY: py3
PYTHON: python3
RUNTEST_ARGS: "--test-list /tmp/check-tests.txt"
tests-py2-cext:
<<: *runtests
variables:
RUNTEST_ARGS: "--no-rust --blacklist /tmp/check-tests.txt"
TEST_HGMODULEPOLICY: "c"
tests-py2-pure:
image: octobus/ci-py2-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- echo testing with mercurial branch="$hg_rev", revision="$(hg log -R /ci/repos/mercurial/ -r . -T '{node}')"
- (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always --pure)
<<: *runtests
variables:
RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
TEST_HGMODULEPOLICY: "py"
tests-py3-cext:
image: octobus/ci-py3-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- echo testing with mercurial branch="$hg_rev", revision="$(hg log -R /ci/repos/mercurial/ -r . -T '{node}')"
- (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always)
<<: *runtests
variables:
PY: py3
PYTHON: python3
RUNTEST_ARGS: "--no-rust --blacklist /tmp/check-tests.txt"
TEST_HGMODULEPOLICY: "c"
tests-py3-pure:
image: octobus/ci-py3-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- echo testing with mercurial branch="$hg_rev", revision="$(hg log -R /ci/repos/mercurial/ -r . -T '{node}')"
- (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always --pure)
<<: *runtests
variables:
PY: py3
PYTHON: python3
RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
TEST_HGMODULEPOLICY: "py"
doc:
image: octobus/ci-py2-evolve-doc
......
This is the actual check list for releasing evolve version X.Y.Z
More details in the [README file](README#L179).
More details in the [README.rst file](README.rst#L199).
Preparation
......
Changelog
=========
10.1.0 - in progress
--------------------
* compatibility with Mercurial 5.6
* numerous minor changes to packaging, Makefile, README moved to README.rst
* metaedit: update bookmark location when applicable
* evolve: various improvements to content-divergence resolution
* evolve: fix various issues with --continue when solving content-divergence
* rewind: add a --dry-run flag
* rewind: properly record rewind of splits as folds
* evolve: while resolving conflicts, the evolved node will no longer be a
dirstate parent (won't show up in `hg parents` and not as `@` in `hg log -G`,
but it will show up as `%` with hg >= 5.4)
topic (0.20.0)
* stack: support foo#stack relation revset (hg-5.4+ only)
* merge: add a experimental.topic.linear-merge option to allow oedipus merges
in some cases
10.0.3 - in progress
--------------------
......
......@@ -2,7 +2,7 @@ include CHANGELOG
include COPYING
include hgext3rd/topic/README
include MANIFEST.in
include README
include README.rst
include setup.py
recursive-include tests *.py *.sh *.t
......@@ -22,7 +22,6 @@ exclude ./hgext3rd/evolve/legacy.py
exclude .hg-format-source
exclude Makefile
exclude tests/test-drop.t
exclude tests/test-inhibit.t
exclude tests/test-oldconvert.t
prune contrib
......
VERSION=$(shell python setup.py --version)
PYTHON ?= python
VERSION = $(shell python setup.py --version)
TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
HGTESTS = $(HGROOT)/tests
PYTHON=python
.PHONY: help
help:
@echo 'Commonly used make targets:'
@echo ' deb-prepare - prepare the build of a debian package'
@echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
@echo ' tests - run all tests in the automatic test suite'
.PHONY: all
all: help
.PHONY: deb-prepare
deb-prepare:
python setup.py sdist --dist-dir ..
mv -f ../hg-evolve-$(VERSION).tar.gz ../mercurial-evolve_$(VERSION).orig.tar.gz
......@@ -13,42 +23,23 @@ deb-prepare:
cp -r debian/ ../mercurial-evolve_$(VERSION).orig/
@cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd`
.PHONY: install-home
install-home:
$(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force
# test targets
TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
HGTESTS=$(HGROOT)/tests
help:
@echo 'Commonly used make targets:'
@echo ' deb-prepare - prepare the build of a debian package'
@echo ' tests - run all tests in the automatic test suite'
@echo ' all-version-tests - run all tests against many hg versions'
@echo ' tests-%s - run all tests in the specified hg version'
all: help
.PHONY: doc
doc:
$(MAKE) -C docs
.PHONY: _check_hgroot
_check_hgroot:
ifeq ($(HGROOT),)
$(error HGROOT is not set to the root of the hg source tree)
endif
.PHONY: tests
tests: _check_hgroot
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
# /!\ run outside of the compatibility branch output test will likely fails
test-%: _check_hgroot
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@
tests-%: _check_hgroot
hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \
(cd $(HGROOT) ; $(MAKE) clean ) && \
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
# build a script to extract declared version
all-version-tests: tests-@
.PHONY: tests all-version-tests
......@@ -3,9 +3,9 @@ Mutable History For Mercurial
=============================
Evolve Extension
=================
================
This package supplies the ``evolve`` extension for Mercurial,
This package supplies the evolve extension for Mercurial,
**The full implementation of the changeset evolution concept is still in
progress.** Please subscribe to the `evolve-testers mailing list
......@@ -14,39 +14,43 @@ date with changes.
This extension:
* enables the "changeset evolution" feature of Mercurial core,
* enables the "`changeset evolution`_" feature of core Mercurial,
* provides a set of commands to mutate your history,
* provides a set of commands to rewrite history in a distributed way,
* issues several warning messages when troubles from some mutable appears in
your repository,
* issues various warning messages when "troubles" from changeset evolution
appear in your repository,
* provides an ``hg evolve`` command to deal with such "troubles",
* provides an ``hg evolve`` command to deal with such troubles,
* improves performance of obsolescence marker exchanges and discovery during
* improves performance of obsolescence marker exchange and discovery during
push and pull.
.. _`changeset evolution`: https://www.mercurial-scm.org/wiki/ChangesetEvolution
Documentation
-------------
We recommend reading the documentation first. An online version is
available here:
We recommend reading the documentation first. An online version is available
here:
https://www.mercurial-scm.org/doc/evolution/
Source of the documentation can be found in ``docs/``.
How to Install
==============
Using Pip
---------
You can install the latest evolution version usin pip::
You can install the latest released version using pip::
$ pip install --user hg-evolve
Then just enable it in you hgrc::
Then enable it in your hgrc::
$ hg config --edit # adds the two line below:
$ hg config --edit # add these two lines:
[extensions]
evolve =
......@@ -57,53 +61,58 @@ To install a local version from source::
$ hg clone https://www.mercurial-scm.org/repo/evolve/
$ cd evolve
# optionally `hg update <target revision>`
$ pip install --user .
Then just enable it in you hgrc::
Then enable it in your hgrc::
$ hg config --edit # adds the two line below:
$ hg config --edit # add these two lines:
[extensions]
evolve =
Documentation lives in ``doc/``.
It's also possible to use evolve without installing it, in which case you will
need to provide the full path to ``hgext3rd/evolve/``, for example::
Server Only Setup
[extensions]
evolve = ~/evolve/hgext3rd/evolve
Server-only Setup
=================
It is possible to enable a smaller subset of the extensions aimed at server
serving repository. It skips the additions of the new commands and local UI
messages that might add performance overheads. To use the server only
extension, install the package and use::
It is possible to enable a smaller subset of the features aimed at servers that
simply serve repositories::
$ hg config --edit # adds the two line below:
$ hg config --edit # add these two lines:
[extensions]
evolve.serveronly =
It skips the additions of the new commands and local UI messages that might add
performance overhead.
Extension Purpose
=================
The goal of this extension is to provide an appropriate place for code and
concept related to changeset evolution to mature. In this extension we allow
for hackier code, unlocking quick experimentation and faster iterations.
concepts related to `changeset evolution`_ to mature. In this extension we
allow hackier code, unlocking quick experimentation and faster iterations.
In addition, the evolve extensions support a wider set of Mercurial version,
allowing us to reach a larger user base for feedback. The Evolve extension is
not tight to the Mercurial release cycle and can release new feature and bug
fix at a higher rate if necessary.
In addition, evolve extension supports a wide range of Mercurial versions,
allowing us to reach a larger user base for feedback. The extension is not tied
to the Mercurial release cycle and can release new features and bug fixes at a
higher rate if necessary.
Once a concept is ready enough, its implementation is moved into Mercurial
core. The maturation period helped us to get a clearer picture of what was
Once a concept is deemed ready, its implementation is moved into core
Mercurial. The maturation period helped us to get a clearer picture of what was
needed. During the upstreaming process, we can use this clearer picture to
clean up the code and upgrade it to an appropriate quality for Mercurial core.
clean up the code and upgrade it to an appropriate quality for core Mercurial.
Python 3 support
Python 3 Support
================
Mercurial announced beta support for Python 3 starting with its 5.0 release.
Since 9.1.0, ``evolve`` has beta support for Python 3.6+.
Mercurial announced official `support for Python 3`_ starting with its 5.2
release. Since 9.3.0, evolve has official support for Python 3.6+.
Support will stay in beta while Mercurial's support for Python 3 remains in
beta and until it is a bit more battle-tested.
.. _`support for Python 3`: https://www.mercurial-scm.org/wiki/Python3
How to Contribute
=================
......@@ -112,13 +121,14 @@ Discussion happens on the #hg-evolve IRC on freenode_.
.. _freenode: https://freenode.net/
Bugs are to be reported on the mercurial's bug tracker (component: `evolution`_):
Bugs are to be reported on the Mercurial's bug tracker (component:
`evolution`_).
.. _evolution: https://bz.mercurial-scm.org/buglist.cgi?component=evolution&query_format=advanced&resolution=---
The recommended way is to create Merge Request on
The recommended way to submit a patch is to create a Merge Request on
https://foss.heptapod.net/mercurial/evolve. To do so, create an account and
request access. You'll then be able to create topic based merge request.
request access. You'll then be able to create a topic-based merge request.
Alternatively, you can use the patchbomb extension to send email to `mercurial
devel <https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel>`_.
......@@ -127,14 +137,13 @@ command like this::
$ hg email --to mercurial-devel@mercurial-scm.org --flag evolve-ext --rev '<your patches>'
For guidelines on the patch description, see the `official Mercurial guideline`_.
.. _`official Mercurial guideline`: https://mercurial-scm.org/wiki/ContributingChanges#Patch_descriptions
Please don't forget to update and run the tests when you fix a bug or
add a feature. To run the tests, you need a working copy of Mercurial,
say in $HGSRC::
Please don't forget to update and run the tests when you fix a bug or add a
feature. To run the tests, you need a working copy of Mercurial, say in
$HGSRC::
$ cd tests
$ python $HGSRC/tests/run-tests.py
......@@ -152,8 +161,8 @@ See also tests/test-check-compat-strings.t.
Branch policy
-------------
The evolve tests are highly impacted by changes in core. To deal with this, we
use named branches.
The evolve tests are highly impacted by changes in core Mercurial. To deal with
this, we use named branches.
There are two main branches: "stable" and "default". Tests on these branches
are supposed to pass with the corresponding "default" and "stable" branch from
......@@ -164,10 +173,9 @@ Mercurial. They are the "mercurial-x.y" branches. They are used to apply
expected test changes only, no code changes should happen there.
Test output changes from a changeset in core should add the following line to
their patch description:
CORE-TEST-OUTPUT-UPDATE: <CORE-NODE-ID>
their patch description::
CORE-TEST-OUTPUT-UPDATE: <changeset hash>
Format-source config
====================
......@@ -175,16 +183,16 @@ Format-source config
Format-source helps smooth out the pain of merging after auto-formatting.
Follow the installation instructions at the `format-source`_ repo.
.. _`format-source`: https://bitbucket.org/octobus/format-source
.. _`format-source`: https://foss.heptapod.net/mercurial/format-source
Then update both your global and repo config files::
Then update your per-repo config file::
$ hg config -l # add the lines below
$ hg config --local --edit # add these lines:
[extensions]
formatsource =
[format-source]
byteify-strings = python3 ~/workspace/octobus/mercurial-devel/contrib/byteify-strings.py --dictiter --treat-as-kwargs kwargs opts commitopts TROUBLES --allow-attr-methods
byteify-strings = python3 ~/hg/contrib/byteify-strings.py --dictiter --treat-as-kwargs kwargs opts commitopts TROUBLES --allow-attr-methods
byteify-strings:mode.input = file
byteify-strings:mode.output = pipe
......
......@@ -170,9 +170,9 @@ mercurial-evolve (6.8.0-1) unstable; urgency=medium
-- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Mon, 23 Oct 2017 15:41:03 +0200
mercurial-evolve (6.7.1-1) unstable; urgency=medium
* new upstream release
-- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Tue, 10 Oct 2017 16:03:23 +0200
mercurial-evolve (6.7.0-1) unstable; urgency=medium
......
......@@ -5,21 +5,21 @@ Maintainer: Logilab <contact@logilab.fr>
Uploaders:
Julien Cristau <julien.cristau@logilab.fr>,
Pierre-Yves David <pierre-yves.david@logilab.fr>,
Standards-Version: 3.9.3
Standards-Version: 4.3.0
Build-Depends:
mercurial (>= 4.6),
python,
python3,
debhelper (>= 10),
dh-python,
python-sphinx (>= 1.0.8),
python-sphinx,
imagemagick,
librsvg2-bin,
wget,
sphinx-common,
X-Python-Version: >= 2.7
graphviz,
X-Python3-Version: >= 3.6
Homepage: https://www.mercurial-scm.org/doc/evolution/
Vcs-Browser: https://www.mercurial-scm.org/repo/evolve/
Vcs-Hg: https://www.mercurial-scm.org/repo/evolve/
Package: mercurial-evolve
Architecture: all
......@@ -36,5 +36,3 @@ Description: evolve extension for Mercurial
.
This extension provides several commands to mutate history and deal with issues
it may raise.
html
README
README.rst
......@@ -30,12 +30,7 @@ override_dh_python3:
find debian -path '*/hgext3rd/__init__.py' -delete
dh_python3
override_dh_auto_clean: clean-docs
override_dh_auto_clean:
dh_auto_clean
rm -f tests/*.err
clean-docs:
rm -rf html
rm -f docs/static/logo-evolve.ico
rm -f docs/tutorials/tutorial.rst
rm -f docs/tutorials/topic-tutorial.rst
$(MAKE) -C docs clean
extend-diff-ignore = "^(contrib/|.gitlab-ci.yml|.hg-format-source|MANIFEST|Makefile|docs/tutorial/.netlify|hgext3rd/evolve/hack/|tests/.testtimes)"
extend-diff-ignore = "^(contrib/|\.gitlab/|\.gitlab-ci.yml|\.hg-format-source|MANIFEST|Makefile|docs/tutorial/\.netlify|hgext3rd/evolve/hack/|tests/\.testtimes|tests/test-drop\.t|tests/test-oldconvert\.t)"
test-drop.t
test-inhibit.t
test-simple4server.t
tests/test-simple4server-bundle2.t
SPHINXBUILD ?= sphinx-build
.PHONY: all
all: tutorials/tutorial.rst tutorials/topic-tutorial.rst static/logo-evolve.ico
$(SPHINXBUILD) . ../html/
......@@ -10,4 +11,11 @@ tutorials/topic-tutorial.rst: tutorials/topic-tutorial.t test2rst.py
python test2rst.py tutorials/
static/logo-evolve.ico: static/logo-evolve.svg
convert -resize 36x36 static/logo-evolve.svg static/logo-evolve.ico
convert -resize 36x36 $< $@
.PHONY: clean
clean:
rm -rf ../html
rm -f static/logo-evolve.ico
rm -f tutorials/tutorial.rst
rm -f tutorials/topic-tutorial.rst
###########################################################
Possible troubles in rewriting history and their resolution
###########################################################
.. Copyright 2020 Sushil Khanchi <sushilkhanchi97@gmail.com>
.. Octobus SAS <contact@octobus.net>
Rewriting history, and especially rewriting draft history that have been
exchanged can lead to "unstable" situation.
This document is intended for developer of the changeset evolution concept. It
cover through the technical aspects of each "instability" a changeset can get
into. It aims at building an exhaustive list of each cases and sub-cases and the
status of automatic resolution for these cases.
Public changeset are part of the permanent history and are never considered
unstable.
.. contents:: :depth: 4
******
Orphan
******
Basics
======
A changeset is orphan when there is at least one obsolete ancestor.
As a resolution, we need to find a new appropriate parents for the
changeset and rebase the orphan there.
If the parents of an orphan changeset are orphan themself, they will have to be
"stabilised" fist.
Cause of trouble
================
Orphan can appears because the user locally rewrite changeset with descendants.
In this case the orphan are created when the command run. They are few real use
case for such action and the user interface should focus on discouraging it.
Orphan can also happens when the users created new changeset on draft that got
rewritten in another repository. The orphan are then "discovered" when the
obsolescence information of the ancestors is pulled in the local repository.
This is the most common way to create phase divergences.
Source of Complexity
====================
There can be different situations we need to take care of when dealing with
resolution of an orphan changeset, like:
* parents might not be obsolete (yet) and orphan themself. They will need to be
resolved first.
* obsolete parent has conflicting rewrites (content-divergence), so there might
not be an obvious "good spot" to rebase the changeset too.
* obsolete parent could have been prune, so it has not direct successors,
* obsolete parent was split in multiple changesets. This comes with multiple
variants:
* successors could be linear of spread across multiple branches,
* successors could have been reordered after the initial split,
* Some of the successors could have been pruned.
* the orphan changeset can be a merge and orphan may come any numbers of parents
* rebasing might lead to conflict.
Details of Sub cases
====================
.. contents::
:local:
O-A: Linear changeset (one parent)
----------------------------------
O-A1: parent has a single successors
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Stabilisation Strategy**
Solution is Clear.
Relocate the orphan changeset onto the single successor of obsolete parent.
**Current Support Level**
Good: current implementation is expected to perform the planned stabilisation.
O-A2: parent is pruned (no successors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^