sapling/eden/scm
Michael Devine 0dceab8e95 New custom immutable revision object to track commit conversions: conversionrevision
Summary:
The Mercurial convert extension passes around parameters to indicate a commit that needs to be converted from source to sink. For existing converters like Git, this is a simple 1:1 conversion: a commit in the source gets mapped to a commit in the sink, and so they use the source commit hash (sometimes called rev or version in the API) to represent the commit to be converted.

Our converter is much more complicated. Source commits get converted multiple times to account for different ways of mounting it into the destination file system and commit history. The commits are also coming from multiple source Git projects. This means that we need multiple pieces of data to represent a single commit conversion action.

Thus far, we've been trying to meet part of this need by using concatenated strings of (variant, commithash). This logic is breaking down as we add more fields. This commit adds a new immutable object called "conversionrevision" that represents the (variant, source commit hash, source project name, destination path) that is the unique identifier for the individual commit conversions we need to perform. This commit also includes logic for serializing and deserializing these objects as strings (useful because the converter seems to require commit IDs to be strings) and unit tests for all of the new logic.

Reviewed By: tchebb

Differential Revision: D19606867

fbshipit-source-id: 77815ca858f841d452874e95dfa3b351bafde306
2020-02-05 10:20:19 -08:00
..
contrib py3 iteritems -> pycompat.iteritems 2020-02-04 15:29:39 -08:00
distutils_rust setup: properly install the binaries 2020-01-22 09:29:18 -08:00
doc Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
edenscm New custom immutable revision object to track commit conversions: conversionrevision 2020-02-05 10:20:19 -08:00
edenscmnative Update to Rust 1.41.0 2020-02-04 18:03:03 -08:00
exec eden: add helper command for working with apfs 2020-02-03 16:59:17 -08:00
i18n py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
lib cpython-ext: add a way to wrap Rust Write object into a Python object 2020-02-04 18:41:13 -08:00
newdoc Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
pystubs py3: localrepo: manually fixup some type annotations 2020-02-03 17:07:36 -08:00
slides Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
tests New custom immutable revision object to track commit conversions: conversionrevision 2020-02-05 10:20:19 -08:00
.editorconfig Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
.flake8 Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
.gitignore py3: fix some type issues detected by pyre with some type stubs 2020-01-31 16:38:02 -08:00
COPYING Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
gen_version.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
hgeditor Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
Makefile py3/make: rename hg3 to local3 and clean up fix 2020-01-29 11:56:38 -08:00
README.rst Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
setup3.py py3: chg: fix compatibility 2020-02-03 18:26:57 -08:00
setup.py py3: remove pycompat3 2020-02-04 22:15:16 -08:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing::

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.