Mercurial > hg-stable
view tests/test-backwards-remove.t @ 39781:3e801ffd7269
filelog: custom filelog to be used with narrow repos
Narrow repos may have file revisions whose copy/rename metadata
references files not in the store. This can pose problems when
consumers attempt to access a missing referenced file revision.
The narrow extension hacks around this problem by implementing a
derived filelog type that provides custom implementations of
renamed(), size(), and cmp() which handle renames against files not
in the narrow spec by silently removing the rename metadata.
While silently dropping metadata isn't the most robust solution,
it is the easiest to implement.
This commit ports the custom narrow filelog class to core.
When a narrow repo is constructed, its ifilestorage creation
function will automatically use the new filelog type. This means
the extra logic is 0 cost for non-narrow repos and shouldn't
interfere with their operation.
Differential Revision: https://phab.mercurial-scm.org/D4643
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 13 Sep 2018 16:02:22 -0700 |
parents | 4c94b6d0fb1c |
children | 5c2a4f37eace |
line wrap: on
line source
$ hg init $ echo This is file a1 > a $ hg add a $ hg commit -m "commit #0" $ ls a $ echo This is file b1 > b $ hg add b $ hg commit -m "commit #1" $ hg co 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved B should disappear $ ls a