Show More
@@ -52,6 +52,7 b' from mercurial.i18n import _' | |||||
52 | from mercurial import ( |
|
52 | from mercurial import ( | |
53 | bundle2, |
|
53 | bundle2, | |
54 | changegroup, |
|
54 | changegroup, | |
|
55 | cmdutil, | |||
55 | context, |
|
56 | context, | |
56 | exchange, |
|
57 | exchange, | |
57 | extensions, |
|
58 | extensions, | |
@@ -169,6 +170,7 b' def extsetup(ui):' | |||||
169 |
|
170 | |||
170 | wrapfunction = extensions.wrapfunction |
|
171 | wrapfunction = extensions.wrapfunction | |
171 |
|
172 | |||
|
173 | wrapfunction(cmdutil, '_updatecatformatter', wrapper._updatecatformatter) | |||
172 | wrapfunction(scmutil, 'wrapconvertsink', wrapper.convertsink) |
|
174 | wrapfunction(scmutil, 'wrapconvertsink', wrapper.convertsink) | |
173 |
|
175 | |||
174 | wrapfunction(upgrade, '_finishdatamigration', |
|
176 | wrapfunction(upgrade, '_finishdatamigration', |
@@ -179,6 +179,10 b' def filectxisbinary(orig, self):' | |||||
179 | def filectxislfs(self): |
|
179 | def filectxislfs(self): | |
180 | return _islfs(self.filelog(), self.filenode()) |
|
180 | return _islfs(self.filelog(), self.filenode()) | |
181 |
|
181 | |||
|
182 | def _updatecatformatter(orig, fm, ctx, matcher, path, decode): | |||
|
183 | orig(fm, ctx, matcher, path, decode) | |||
|
184 | fm.data(rawdata=ctx[path].rawdata()) | |||
|
185 | ||||
182 | def convertsink(orig, sink): |
|
186 | def convertsink(orig, sink): | |
183 | sink = orig(sink) |
|
187 | sink = orig(sink) | |
184 | if sink.repotype == 'hg': |
|
188 | if sink.repotype == 'hg': |
@@ -842,7 +842,7 b" there's no 'lfs' destination repo requir" | |||||
842 | 0 meta |
|
842 | 0 meta | |
843 | $ grep 'lfs' convert_normal/.hg/requires |
|
843 | $ grep 'lfs' convert_normal/.hg/requires | |
844 | [1] |
|
844 | [1] | |
845 |
$ hg --cwd convert_normal |
|
845 | $ hg --cwd convert_normal cat a1 -r 0 -T '{rawdata}' | |
846 | THIS-IS-LFS-BECAUSE-10-BYTES |
|
846 | THIS-IS-LFS-BECAUSE-10-BYTES | |
847 |
|
847 | |||
848 | $ hg --config extensions.convert= --config lfs.threshold=10B \ |
|
848 | $ hg --config extensions.convert= --config lfs.threshold=10B \ | |
@@ -854,6 +854,12 b" there's no 'lfs' destination repo requir" | |||||
854 | 2 a |
|
854 | 2 a | |
855 | 1 b |
|
855 | 1 b | |
856 | 0 meta |
|
856 | 0 meta | |
|
857 | ||||
|
858 | $ hg --cwd convert_lfs cat -r 0 a1 -T '{rawdata}' | |||
|
859 | version https://git-lfs.github.com/spec/v1 | |||
|
860 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |||
|
861 | size 29 | |||
|
862 | x-is-binary 0 | |||
857 | $ hg --cwd convert_lfs debugdata a1 0 |
|
863 | $ hg --cwd convert_lfs debugdata a1 0 | |
858 | version https://git-lfs.github.com/spec/v1 |
|
864 | version https://git-lfs.github.com/spec/v1 | |
859 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
865 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
General Comments 0
You need to be logged in to leave comments.
Login now