Show More
@@ -31,6 +31,16 b' def setup():' | |||||
31 | pass |
|
31 | pass | |
32 |
|
32 | |||
33 | class excludeddir(manifest.treemanifest): |
|
33 | class excludeddir(manifest.treemanifest): | |
|
34 | """Stand-in for a directory that is excluded from the repository. | |||
|
35 | ||||
|
36 | With narrowing active on a repository that uses treemanifests, | |||
|
37 | some of the directory revlogs will be excluded from the resulting | |||
|
38 | clone. This is a huge storage win for clients, but means we need | |||
|
39 | some sort of pseudo-manifest to surface to internals so we can | |||
|
40 | detect a merge conflict outside the narrowspec. That's what this | |||
|
41 | class is: it stands in for a directory whose node is known, but | |||
|
42 | whose contents are unknown. | |||
|
43 | """ | |||
34 | def __init__(self, dir, node): |
|
44 | def __init__(self, dir, node): | |
35 | super(excludeddir, self).__init__(dir) |
|
45 | super(excludeddir, self).__init__(dir) | |
36 | self._node = node |
|
46 | self._node = node | |
@@ -48,6 +58,7 b' class excludeddir(manifest.treemanifest)' | |||||
48 | return self |
|
58 | return self | |
49 |
|
59 | |||
50 | class excludeddirmanifestctx(manifest.treemanifestctx): |
|
60 | class excludeddirmanifestctx(manifest.treemanifestctx): | |
|
61 | """context wrapper for excludeddir - see that docstring for rationale""" | |||
51 | def __init__(self, dir, node): |
|
62 | def __init__(self, dir, node): | |
52 | self._dir = dir |
|
63 | self._dir = dir | |
53 | self._node = node |
|
64 | self._node = node | |
@@ -60,6 +71,15 b' class excludeddirmanifestctx(manifest.tr' | |||||
60 | self._dir) |
|
71 | self._dir) | |
61 |
|
72 | |||
62 | class excludedmanifestrevlog(manifest.manifestrevlog): |
|
73 | class excludedmanifestrevlog(manifest.manifestrevlog): | |
|
74 | """Stand-in for excluded treemanifest revlogs. | |||
|
75 | ||||
|
76 | When narrowing is active on a treemanifest repository, we'll have | |||
|
77 | references to directories we can't see due to the revlog being | |||
|
78 | skipped. This class exists to conform to the manifestrevlog | |||
|
79 | interface for those directories and proactively prevent writes to | |||
|
80 | outside the narrowspec. | |||
|
81 | """ | |||
|
82 | ||||
63 | def __init__(self, dir): |
|
83 | def __init__(self, dir): | |
64 | self._dir = dir |
|
84 | self._dir = dir | |
65 |
|
85 |
General Comments 0
You need to be logged in to leave comments.
Login now