##// END OF EJS Templates
mergetools: add new conflict marker format with diffs in...
mergetools: add new conflict marker format with diffs in I use 3-way conflict markers. Often when I resolve them, I manually compare one the base with one side and apply the differences to the other side. That can be hard when the conflict marker is large. This patch introduces a new type of conflict marker, which I'm hoping will make it easier to resolve conflicts. The new format uses `<<<<<<<` and `>>>>>>>` to open and close the markers, just like our existing 2-way and 3-way conflict markers. Instead of having 2 or 3 snapshots (left+right or left+base+right), it has a sequence of diffs. A diff looks like this: ``` ------- base +++++++ left a -b +c d ``` A diff that adds one side ("diff from nothing") has a `=======` header instead and does not have have `+` prefixed on its lines. A regular 3-way merge can be viewed as adding one side plus a diff between the base and the other side. It thus has two ways of being represented, depending on which side is being diffed: ``` <<<<<<< ======= left contents on left ------- base +++++++ right contents on -left +right >>>>>>> ``` or ``` <<<<<<< ------- base +++++++ left contents on -right +left ======= right contents on right >>>>>>> ``` I've made it so the new merge tool tries to pick a version that has the most common lines (no difference in the example above). I've called the new tool "mergediff" to stick to the convention of starting with "merge" if the tool tries a regular 3-way merge. The idea came from my pet VCS (placeholder name `jj`), which has support for octopus merges and other ways of ending up with merges of more than 3 versions. I wanted to be able to represent such conflicts in the working copy and therefore thought of this format (although I have not yet implemented it in my VCS). I then attended a meeting with Larry McVoy, who said BitKeeper has an option (`bk smerge -g`) for showing a similar format, which reminded me to actually attempt this in Mercurial. Differential Revision: https://phab.mercurial-scm.org/D9551

File last commit:

r46620:2c0ddb79 default
r46724:bdc2bf68 default
Show More
requirements.txt
176 lines | 5.9 KiB | text/plain | TextLexer
Matt Harbison
help: create packages for the help text...
r44031 Repositories contain a file (``.hg/requires``) containing a list of
features/capabilities that are *required* for clients to interface
with the repository. This file has been present in Mercurial since
version 0.9.2 (released December 2006).
One of the first things clients do when opening a repository is read
``.hg/requires`` and verify that all listed requirements are supported,
aborting if not. Requirements are therefore a strong mechanism to
prevent incompatible clients from reading from unknown repository
formats or even corrupting them by writing to them.
Extensions may add requirements. When they do this, clients not running
an extension will be unable to read from repositories.
The following sections describe the requirements defined by the
Mercurial core distribution.
revlogv1
========
When present, revlogs are version 1 (RevlogNG). RevlogNG was introduced
in 2006. The ``revlogv1`` requirement has been enabled by default
since the ``requires`` file was introduced in Mercurial 0.9.2.
If this requirement is not present, version 0 revlogs are assumed.
store
=====
The *store* repository layout should be used.
This requirement has been enabled by default since the ``requires`` file
was introduced in Mercurial 0.9.2.
fncache
=======
The *fncache* repository layout should be used.
The *fncache* layout hash encodes filenames with long paths and
encodes reserved filenames.
This requirement is enabled by default when the *store* requirement is
enabled (which is the default behavior). It was introduced in Mercurial
1.1 (released December 2008).
shared
======
Denotes that the store for a repository is shared from another location
(defined by the ``.hg/sharedpath`` file).
This requirement is set when a repository is created via :hg:`share`.
The requirement was added in Mercurial 1.3 (released July 2009).
relshared
=========
Derivative of ``shared``; the location of the store is relative to the
store of this repository.
This requirement is set when a repository is created via :hg:`share`
using the ``--relative`` option.
The requirement was added in Mercurial 4.2 (released May 2017).
dotencode
=========
The *dotencode* repository layout should be used.
The *dotencode* layout encodes the first period or space in filenames
to prevent issues on OS X and Windows.
This requirement is enabled by default when the *store* requirement
is enabled (which is the default behavior). It was introduced in
Mercurial 1.7 (released November 2010).
parentdelta
===========
Denotes a revlog delta encoding format that was experimental and
replaced by *generaldelta*. It should not be seen in the wild because
it was never enabled by default.
This requirement was added in Mercurial 1.7 and removed in Mercurial
1.9.
generaldelta
============
Revlogs should be created with the *generaldelta* flag enabled. The
generaldelta flag will cause deltas to be encoded against a parent
revision instead of the previous revision in the revlog.
Support for this requirement was added in Mercurial 1.9 (released
July 2011). The requirement was disabled on new repositories by
default until Mercurial 3.7 (released February 2016).
manifestv2
==========
Denotes that version 2 of manifests are being used.
Support for this requirement was added in Mercurial 3.4 (released
May 2015). The new format failed to meet expectations and support
for the format and requirement were removed in Mercurial 4.6
(released May 2018) since the feature never graduated frome experiment
status.
treemanifest
============
Denotes that tree manifests are being used. Tree manifests are
one manifest per directory (as opposed to a single flat manifest).
Support for this requirement was added in Mercurial 3.4 (released
August 2015). The requirement is currently experimental and is
disabled by default.
exp-sparse
==========
The working directory is sparse (only contains a subset of files).
Support for this requirement was added in Mercurial 4.3 (released
August 2017). This requirement and feature are experimental and may
disappear in a future Mercurial release. The requirement will only
be present on repositories that have opted in to a sparse working
directory.
bookmarksinstore
==================
Bookmarks are stored in ``.hg/store/`` instead of directly in ``.hg/``
where they used to be stored. The active bookmark is still stored
directly in ``.hg/``. This makes them always shared by ``hg share``,
whether or not ``-B`` was passed.
Support for this requirement was added in Mercurial 5.1 (released
August 2019). The requirement will only be present on repositories
that have opted in to this format (by having
``format.bookmarks-in-store=true`` set when they were created).
upgrade: support upgrade and downgrade from persistent nodemap...
r45356
persistent-nodemap
==================
The `nodemap` index (mapping nodeid to local revision number) is persisted on
disk. This provides speed benefit (if the associated native code is used). The
persistent nodemap is only used for two revlogs: the changelog and the
manifestlog.
Support for this requirement was added in Mercurial 5.5 (released August 2020).
Note that as of 5.5, only installations compiled with the Rust extension will
benefit from a speedup. The other installations will do the necessary work to
keep the index up to date, but will suffer a slowdown.
Pulkit Goyal
helptext: document exp-sharesafe in internals/requirements.txt...
r46056
exp-sharesafe
=============
NOTE: This requirement is for internal development only. The semantics are not
frozed yet, the feature is experimental. It's not advised to use it for any
production repository yet.
Represents that the repository can be shared safely. Requirements and config of
the source repository will be shared.
Requirements are stored in ``.hg/store`` instead of directly in ``.hg/`` where
they used to be stored. Some working copy related requirements are still stored
in ``.hg/``.
Shares read the ``.hg/hgrc`` of the source repository.
Pulkit Goyal
helptext: update first hg version when share-safe will be released...
r46620 Support for this requirement was added in Mercurial 5.7 (released
February 2021). The requirement will only be present on repositories that have
Pulkit Goyal
helptext: document exp-sharesafe in internals/requirements.txt...
r46056 opted in to this format (by having ``format.exp-share-safe=true`` set when
they were created).