sapling/eden/scm/edenscm/hgext
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
..
absorb fix_map 2020-01-28 18:24:56 -08:00
amend hg-py3: make amend-next/prev work 2020-02-03 17:05:34 -08:00
commitcloud py3: add pycompat.ABC 2020-01-31 17:05:54 -08:00
convert New custom immutable revision object to track commit conversions: conversionrevision 2020-02-05 10:20:19 -08:00
extlib unicode: consistently use 'utf-8' everywhere 2020-01-31 17:34:53 -08:00
fastannotate py3: add type annotations to i18n 2020-02-03 07:35:31 -08:00
fsmonitor fsmonitor: catch watchman issue and fallback 2020-02-03 18:04:25 -08:00
hgevents hgevents: disable events during status 2020-01-29 10:30:22 -08:00
hggit context: add some type annotations 2020-02-03 07:35:32 -08:00
highlight Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
infinitepush py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
lfs py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
memcommit memcommit: refactor code to be pyre friendly 2020-01-30 20:08:34 -08:00
perfsuite py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
pushrebase pyre: add stub for "bindings" 2020-01-31 13:18:54 -08:00
remotefilelog py3 iteritems -> pycompat.iteritems 2020-02-04 15:29:39 -08:00
repogenerator Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
snapshot pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
treemanifest py3: add pycompat.ABC 2020-01-31 17:05:54 -08:00
__init__.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
arcdiff.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
automv.py pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
blackbox.py py3: blackbox: fix some encoding issues 2020-01-29 07:45:18 -08:00
catnotate.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
checkmessagehook.py hg-py3: make metaedit command work 2020-01-31 18:29:01 -08:00
checkserverbookmark.py util: remove redundant 'timed' function 2020-02-04 12:33:40 -08:00
chistedit.py fix_map 2020-01-28 18:24:56 -08:00
churn.py pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
cleanobsstore.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
clienttelemetry.py py3: clienttelemetry: fix some encoding issues 2020-01-29 14:27:11 -08:00
clindex.py typing: enable pyre 2019-12-04 10:55:00 -08:00
clindex.pyx py3/cython: set the language_level to 3str 2020-01-30 12:52:06 -08:00
clonebundles.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
commitextras.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
conflictinfo.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
copytrace.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
crdump.py fix_map 2020-01-28 18:24:56 -08:00
debugcommitmessage.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
debugshell.py py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
dialect.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
directaccess.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
dirsync.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
disablesymlinks.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
drop.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
edrecord.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
eol.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
errorredirect.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
extdiff.py pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
extorder.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
extutil.py commitcloud: use our background spawning utility 2019-12-20 16:14:19 -08:00
fastlog.py rename fbconduit extension to fbscmquery 2019-12-13 03:23:25 -08:00
fbhistedit.py py3: fix histedit json parsing 2020-01-31 10:56:30 -08:00
fbscmquery.py hg-py3: make metaedit command work 2020-01-31 18:29:01 -08:00
fixcorrupt.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
generic_bisect.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
githelp.py hgext: add hg equivalent for 'git stash clear' 2020-02-03 12:59:46 -08:00
gitlookup.py pyre: add stub for "bindings" 2020-01-31 13:18:54 -08:00
gitrevset.py gitnode: try using commit extra first 2019-12-20 16:14:25 -08:00
globalrevs.py pyre: add stub for "bindings" 2020-01-31 13:18:54 -08:00
gpg.py pycompat: drop sysbytes, sysstr, strurl, bytesurl 2020-01-31 17:59:53 -08:00
grepdiff.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
grpcheck.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
hgsql.py py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
hiddenerror.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
histedit.py py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
infinitepushbackup.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
interactiveui.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
journal.py pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
linkrevcache.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
logginghelper.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
lz4revlog.py pyre: add stub for "bindings" 2020-01-31 13:18:54 -08:00
mergedriver.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
morestatus.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
myparent.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
nointerrupt.py nointerrupt: make output more stable 2020-02-04 20:36:42 -08:00
ownercheck.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
patchrmdir.py typing: enable pyre 2019-12-04 10:55:00 -08:00
patchrmdir.pyx py3/cython: set the language_level to 3str 2020-01-30 12:52:06 -08:00
phabdiff.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
phabstatus.py py3: enable more tests 2020-02-01 10:39:39 -08:00
phrevset.py py3: drop the use of re.LOCALE for some regexes 2020-01-28 14:32:30 -08:00
progressfile.py Update pyre version for eden 2019-12-20 16:14:21 -08:00
pullcreatemarkers.py pullcreatemarkers: print how many commits are marked as landed 2020-01-21 07:36:34 -08:00
rage.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
rebase.py hg-py3: fix restack-multidest/t and fold 2020-02-03 17:05:35 -08:00
remotenames.py remotenames: write bytes to the file 2020-01-31 17:31:24 -08:00
reset.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
sampling.py Update pyre version for eden 2019-12-20 16:14:21 -08:00
schemes.py py3: remove b prefix 2020-01-28 10:29:15 -08:00
sendunbundlereplay.py util: remove redundant 'timed' function 2020-02-04 12:33:40 -08:00
share.py mq: remove references about mq 2020-01-13 17:39:43 -08:00
shelve.py fix_map 2020-01-28 18:24:56 -08:00
sigtrace.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
simplecache.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
smartlog.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
sparse.py py3: fix sparse utf8 logging 2020-01-30 09:58:26 -08:00
sshaskpass.py typing: enable pyre 2019-12-04 10:55:00 -08:00
stablerev.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
stat.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
traceprof.py typing: enable pyre 2019-12-04 10:55:00 -08:00
traceprof.pyx py3/cython: set the language_level to 3str 2020-01-30 12:52:06 -08:00
tweakdefaults.py rebase: prevent fast-foward rebases with conflicting changes 2020-01-06 15:06:50 -08:00
undo.py py3: decode undolog redonode 2020-01-31 15:27:31 -08:00
whereami.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
win32mbcs.py py3: move checkwinfilename() to a separate file and add type hints 2020-01-31 20:18:21 -08:00
win32text.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00