sapling/hgext/convert
Matt Harbison 2583a8e324 convert: allow the sink object to be wrapped when the extension isn't loaded
The next patch will wrap the conversion code, in order to write out a
requirement for 'lfs' when appropriate.  Wrapping convcmd.convertsink() in an
afterloaded callback works fine when the convert extension is enabled by the
user.  The problem here is that lfconvert uses the convert extension, whether or
not it was formally enabled by the user.

My first attempt was to have lfs install an afterloaded callback that would wrap
the convert sink if convert was loaded, or wrap lfconvert if it wasn't.  Then
the lfconvert override could install an afterloaded callback to try wrapping the
convert sink again, before calling the original lfconvert.  But that breaks down
if largefiles can't load the convert extension on the fly. [1]  Further, some
tests were failing with an error indicating that the size of the afterloaded
list changed while iterating it.

Yuya mentioned that maybe some bits of convert could be moved into core, but I'm
not sure where to draw that line.  The convertsink() method depends on the list
of sinks, which in turn depends on the sink classes.

[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-November/108038.html
2017-11-26 14:59:39 -05:00
..
__init__.py convert: avoid wrong lfconvert defaults by moving configitems to core 2017-11-28 23:20:08 -05:00
bzr.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
common.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
convcmd.py convert: allow the sink object to be wrapped when the extension isn't loaded 2017-11-26 14:59:39 -05:00
cvs.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
cvsps.py doctest: bulk-replace string literals with b'' for Python 3 2017-09-03 14:32:11 +09:00
darcs.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
filemap.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
git.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
gnuarch.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
hg.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
monotone.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
p4.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
subversion.py convert: save an indicator of the repo type for sources and sinks 2017-11-22 20:49:01 -05:00
transport.py convert: remove if False block 2017-07-07 15:08:23 -04:00