Mercurial > hg
comparison hgext/lfs/__init__.py @ 42620:d98ec36be808
convert: add a config option to help doing identity hg->hg conversion
I want to change the computation of the list of files modified by a
commit. In principle, this would simply change a cache. But since this
information is stored in commits rather than a cache, changing it
means changing commit hashes (going forward).
Some users rely on the convert extension from hg to hg not changing
hashes when nothing changes (usually). Allow these users to preserve
hashes despite changes to the changelog files computation by reusing
these files lists when the manifest is unchanged (since these files
list are derived from the manifest).
Differential Revision: https://phab.mercurial-scm.org/D6643
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Sat, 13 Jul 2019 23:45:32 -0400 |
parents | c9e1104e6272 |
children | 268662aac075 |
comparison
equal
deleted
inserted
replaced
42619:20d0e59be79b | 42620:d98ec36be808 |
---|---|
225 repo.svfs.lfslocalblobstore = blobstore.local(repo) | 225 repo.svfs.lfslocalblobstore = blobstore.local(repo) |
226 repo.svfs.lfsremoteblobstore = blobstore.remote(repo) | 226 repo.svfs.lfsremoteblobstore = blobstore.remote(repo) |
227 | 227 |
228 class lfsrepo(repo.__class__): | 228 class lfsrepo(repo.__class__): |
229 @localrepo.unfilteredmethod | 229 @localrepo.unfilteredmethod |
230 def commitctx(self, ctx, error=False): | 230 def commitctx(self, ctx, error=False, origctx=None): |
231 repo.svfs.options['lfstrack'] = _trackedmatcher(self) | 231 repo.svfs.options['lfstrack'] = _trackedmatcher(self) |
232 return super(lfsrepo, self).commitctx(ctx, error) | 232 return super(lfsrepo, self).commitctx(ctx, error, origctx=origctx) |
233 | 233 |
234 repo.__class__ = lfsrepo | 234 repo.__class__ = lfsrepo |
235 | 235 |
236 if 'lfs' not in repo.requirements: | 236 if 'lfs' not in repo.requirements: |
237 def checkrequireslfs(ui, repo, **kwargs): | 237 def checkrequireslfs(ui, repo, **kwargs): |