equal
deleted
inserted
replaced
18 opener is an open()-like callable that can be used to open the |
18 opener is an open()-like callable that can be used to open the |
19 dirstate file; root is the root of the directory tracked by |
19 dirstate file; root is the root of the directory tracked by |
20 the dirstate. |
20 the dirstate. |
21 ''' |
21 ''' |
22 |
22 |
|
23 # TODO: all these private methods and attributes should be made |
|
24 # public or removed from the interface. |
|
25 _ignore = interfaceutil.Attribute('Matcher for ignored files.') |
|
26 |
|
27 def _ignorefiles(): |
|
28 """Return a list of files containing patterns to ignore.""" |
|
29 |
|
30 def _ignorefileandline(f): |
|
31 "Given a file `f`, return the ignore file and line that ignores it." |
|
32 |
|
33 _checklink = interfaceutil.Attribute('Callable for checking symlinks.') |
|
34 _checkexec = interfaceutil.Attribute('Callable for checking exec bits.') |
|
35 |
23 @contextlib.contextmanager |
36 @contextlib.contextmanager |
24 def parentchange(): |
37 def parentchange(): |
25 '''Context manager for handling dirstate parents. |
38 '''Context manager for handling dirstate parents. |
26 |
39 |
27 If an exception occurs in the scope of the context manager, |
40 If an exception occurs in the scope of the context manager, |
34 that modify the dirstate parent. |
47 that modify the dirstate parent. |
35 ''' |
48 ''' |
36 |
49 |
37 def hasdir(d): |
50 def hasdir(d): |
38 pass |
51 pass |
39 |
|
40 _ignore = interfaceutil.Attribute('Matcher for ignored files.') |
|
41 |
|
42 _checklink = interfaceutil.Attribute('Callable for checking symlinks.') |
|
43 _checkexec = interfaceutil.Attribute('Callable for checking exec bits.') |
|
44 |
52 |
45 def flagfunc(buildfallback): |
53 def flagfunc(buildfallback): |
46 pass |
54 pass |
47 |
55 |
48 def getcwd(): |
56 def getcwd(): |
193 dirstate, (oldp1, oldp2), (newp1, newp2) |
201 dirstate, (oldp1, oldp2), (newp1, newp2) |
194 |
202 |
195 Category is a unique identifier to allow overwriting an old callback |
203 Category is a unique identifier to allow overwriting an old callback |
196 with a newer callback. |
204 with a newer callback. |
197 """ |
205 """ |
198 |
|
199 def _ignorefiles(): |
|
200 """Return a list of files containing patterns to ignore. |
|
201 |
|
202 TODO this should not be exposed.""" |
|
203 |
|
204 def _ignorefileandline(f): |
|
205 """Given a file `f`, return the ignore file and line that ignores it. |
|
206 |
|
207 TODO this should not be exposed.""" |
|
208 |
206 |
209 def walk(match, subrepos, unknown, ignored, full=True): |
207 def walk(match, subrepos, unknown, ignored, full=True): |
210 ''' |
208 ''' |
211 Walk recursively through the directory tree, finding all files |
209 Walk recursively through the directory tree, finding all files |
212 matched by match. |
210 matched by match. |