Show More
@@ -42,17 +42,17 class idirstate(Protocol): | |||||
42 | """True if file tracking changes in progress.""" |
|
42 | """True if file tracking changes in progress.""" | |
43 | ) |
|
43 | ) | |
44 |
|
44 | |||
45 | def _ignorefiles(): |
|
45 | def _ignorefiles(self): | |
46 | """Return a list of files containing patterns to ignore.""" |
|
46 | """Return a list of files containing patterns to ignore.""" | |
47 |
|
47 | |||
48 | def _ignorefileandline(f): |
|
48 | def _ignorefileandline(self, f): | |
49 | """Given a file `f`, return the ignore file and line that ignores it.""" |
|
49 | """Given a file `f`, return the ignore file and line that ignores it.""" | |
50 |
|
50 | |||
51 | _checklink = interfaceutil.Attribute("""Callable for checking symlinks.""") |
|
51 | _checklink = interfaceutil.Attribute("""Callable for checking symlinks.""") | |
52 | _checkexec = interfaceutil.Attribute("""Callable for checking exec bits.""") |
|
52 | _checkexec = interfaceutil.Attribute("""Callable for checking exec bits.""") | |
53 |
|
53 | |||
54 | @contextlib.contextmanager |
|
54 | @contextlib.contextmanager | |
55 | def changing_parents(repo): |
|
55 | def changing_parents(self, repo): | |
56 | """Context manager for handling dirstate parents. |
|
56 | """Context manager for handling dirstate parents. | |
57 |
|
57 | |||
58 | If an exception occurs in the scope of the context manager, |
|
58 | If an exception occurs in the scope of the context manager, | |
@@ -61,7 +61,7 class idirstate(Protocol): | |||||
61 | """ |
|
61 | """ | |
62 |
|
62 | |||
63 | @contextlib.contextmanager |
|
63 | @contextlib.contextmanager | |
64 | def changing_files(repo): |
|
64 | def changing_files(self, repo): | |
65 | """Context manager for handling dirstate files. |
|
65 | """Context manager for handling dirstate files. | |
66 |
|
66 | |||
67 | If an exception occurs in the scope of the context manager, |
|
67 | If an exception occurs in the scope of the context manager, | |
@@ -69,10 +69,10 class idirstate(Protocol): | |||||
69 | released. |
|
69 | released. | |
70 | """ |
|
70 | """ | |
71 |
|
71 | |||
72 | def hasdir(d): |
|
72 | def hasdir(self, d): | |
73 | pass |
|
73 | pass | |
74 |
|
74 | |||
75 | def flagfunc(buildfallback): |
|
75 | def flagfunc(self, buildfallback): | |
76 | """build a callable that returns flags associated with a filename |
|
76 | """build a callable that returns flags associated with a filename | |
77 |
|
77 | |||
78 | The information is extracted from three possible layers: |
|
78 | The information is extracted from three possible layers: | |
@@ -81,7 +81,7 class idirstate(Protocol): | |||||
81 | 3. a more expensive mechanism inferring the flags from the parents. |
|
81 | 3. a more expensive mechanism inferring the flags from the parents. | |
82 | """ |
|
82 | """ | |
83 |
|
83 | |||
84 | def getcwd(): |
|
84 | def getcwd(self): | |
85 | """Return the path from which a canonical path is calculated. |
|
85 | """Return the path from which a canonical path is calculated. | |
86 |
|
86 | |||
87 | This path should be used to resolve file patterns or to convert |
|
87 | This path should be used to resolve file patterns or to convert | |
@@ -89,19 +89,19 class idirstate(Protocol): | |||||
89 | used to get real file paths. Use vfs functions instead. |
|
89 | used to get real file paths. Use vfs functions instead. | |
90 | """ |
|
90 | """ | |
91 |
|
91 | |||
92 | def pathto(f, cwd=None): |
|
92 | def pathto(self, f, cwd=None): | |
93 | pass |
|
93 | pass | |
94 |
|
94 | |||
95 | def get_entry(path): |
|
95 | def get_entry(self, path): | |
96 | """return a DirstateItem for the associated path""" |
|
96 | """return a DirstateItem for the associated path""" | |
97 |
|
97 | |||
98 | def __contains__(key): |
|
98 | def __contains__(self, key): | |
99 | """Check if bytestring `key` is known to the dirstate.""" |
|
99 | """Check if bytestring `key` is known to the dirstate.""" | |
100 |
|
100 | |||
101 | def __iter__(): |
|
101 | def __iter__(self): | |
102 | """Iterate the dirstate's contained filenames as bytestrings.""" |
|
102 | """Iterate the dirstate's contained filenames as bytestrings.""" | |
103 |
|
103 | |||
104 | def items(): |
|
104 | def items(self): | |
105 | """Iterate the dirstate's entries as (filename, DirstateItem. |
|
105 | """Iterate the dirstate's entries as (filename, DirstateItem. | |
106 |
|
106 | |||
107 | As usual, filename is a bytestring. |
|
107 | As usual, filename is a bytestring. | |
@@ -109,19 +109,19 class idirstate(Protocol): | |||||
109 |
|
109 | |||
110 | iteritems = items |
|
110 | iteritems = items | |
111 |
|
111 | |||
112 | def parents(): |
|
112 | def parents(self): | |
113 | pass |
|
113 | pass | |
114 |
|
114 | |||
115 | def p1(): |
|
115 | def p1(self): | |
116 | pass |
|
116 | pass | |
117 |
|
117 | |||
118 | def p2(): |
|
118 | def p2(self): | |
119 | pass |
|
119 | pass | |
120 |
|
120 | |||
121 | def branch(): |
|
121 | def branch(self): | |
122 | pass |
|
122 | pass | |
123 |
|
123 | |||
124 | def setparents(p1, p2=None): |
|
124 | def setparents(self, p1, p2=None): | |
125 | """Set dirstate parents to p1 and p2. |
|
125 | """Set dirstate parents to p1 and p2. | |
126 |
|
126 | |||
127 | When moving from two parents to one, "merged" entries a |
|
127 | When moving from two parents to one, "merged" entries a | |
@@ -131,26 +131,26 class idirstate(Protocol): | |||||
131 | See localrepo.setparents() |
|
131 | See localrepo.setparents() | |
132 | """ |
|
132 | """ | |
133 |
|
133 | |||
134 | def setbranch(branch, transaction): |
|
134 | def setbranch(self, branch, transaction): | |
135 | pass |
|
135 | pass | |
136 |
|
136 | |||
137 | def invalidate(): |
|
137 | def invalidate(self): | |
138 | """Causes the next access to reread the dirstate. |
|
138 | """Causes the next access to reread the dirstate. | |
139 |
|
139 | |||
140 | This is different from localrepo.invalidatedirstate() because it always |
|
140 | This is different from localrepo.invalidatedirstate() because it always | |
141 | rereads the dirstate. Use localrepo.invalidatedirstate() if you want to |
|
141 | rereads the dirstate. Use localrepo.invalidatedirstate() if you want to | |
142 | check whether the dirstate has changed before rereading it.""" |
|
142 | check whether the dirstate has changed before rereading it.""" | |
143 |
|
143 | |||
144 | def copy(source, dest): |
|
144 | def copy(self, source, dest): | |
145 | """Mark dest as a copy of source. Unmark dest if source is None.""" |
|
145 | """Mark dest as a copy of source. Unmark dest if source is None.""" | |
146 |
|
146 | |||
147 | def copied(file): |
|
147 | def copied(self, file): | |
148 | pass |
|
148 | pass | |
149 |
|
149 | |||
150 | def copies(): |
|
150 | def copies(self): | |
151 | pass |
|
151 | pass | |
152 |
|
152 | |||
153 | def normalize(path, isknown=False, ignoremissing=False): |
|
153 | def normalize(self, path, isknown=False, ignoremissing=False): | |
154 | """ |
|
154 | """ | |
155 | normalize the case of a pathname when on a casefolding filesystem |
|
155 | normalize the case of a pathname when on a casefolding filesystem | |
156 |
|
156 | |||
@@ -168,16 +168,16 class idirstate(Protocol): | |||||
168 | - version provided via command arguments |
|
168 | - version provided via command arguments | |
169 | """ |
|
169 | """ | |
170 |
|
170 | |||
171 | def clear(): |
|
171 | def clear(self): | |
172 | pass |
|
172 | pass | |
173 |
|
173 | |||
174 | def rebuild(parent, allfiles, changedfiles=None): |
|
174 | def rebuild(self, parent, allfiles, changedfiles=None): | |
175 | pass |
|
175 | pass | |
176 |
|
176 | |||
177 | def write(tr): |
|
177 | def write(self, tr): | |
178 | pass |
|
178 | pass | |
179 |
|
179 | |||
180 | def addparentchangecallback(category, callback): |
|
180 | def addparentchangecallback(self, category, callback): | |
181 | """add a callback to be called when the wd parents are changed |
|
181 | """add a callback to be called when the wd parents are changed | |
182 |
|
182 | |||
183 | Callback will be called with the following arguments: |
|
183 | Callback will be called with the following arguments: | |
@@ -187,7 +187,7 class idirstate(Protocol): | |||||
187 | with a newer callback. |
|
187 | with a newer callback. | |
188 | """ |
|
188 | """ | |
189 |
|
189 | |||
190 | def walk(match, subrepos, unknown, ignored, full=True): |
|
190 | def walk(self, match, subrepos, unknown, ignored, full=True): | |
191 | """ |
|
191 | """ | |
192 | Walk recursively through the directory tree, finding all files |
|
192 | Walk recursively through the directory tree, finding all files | |
193 | matched by match. |
|
193 | matched by match. | |
@@ -199,7 +199,7 class idirstate(Protocol): | |||||
199 |
|
199 | |||
200 | """ |
|
200 | """ | |
201 |
|
201 | |||
202 | def status(match, subrepos, ignored, clean, unknown): |
|
202 | def status(self, match, subrepos, ignored, clean, unknown): | |
203 | """Determine the status of the working copy relative to the |
|
203 | """Determine the status of the working copy relative to the | |
204 | dirstate and return a pair of (unsure, status), where status is of type |
|
204 | dirstate and return a pair of (unsure, status), where status is of type | |
205 | scmutil.status and: |
|
205 | scmutil.status and: | |
@@ -216,12 +216,12 class idirstate(Protocol): | |||||
216 | dirstate was written |
|
216 | dirstate was written | |
217 | """ |
|
217 | """ | |
218 |
|
218 | |||
219 | def matches(match): |
|
219 | def matches(self, match): | |
220 | """ |
|
220 | """ | |
221 | return files in the dirstate (in whatever state) filtered by match |
|
221 | return files in the dirstate (in whatever state) filtered by match | |
222 | """ |
|
222 | """ | |
223 |
|
223 | |||
224 | def verify(m1, m2, p1, narrow_matcher=None): |
|
224 | def verify(self, m1, m2, p1, narrow_matcher=None): | |
225 | """ |
|
225 | """ | |
226 | check the dirstate contents against the parent manifest and yield errors |
|
226 | check the dirstate contents against the parent manifest and yield errors | |
227 | """ |
|
227 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now