equal
deleted
inserted
replaced
129 def _join(self, f): |
129 def _join(self, f): |
130 # much faster than os.path.join() |
130 # much faster than os.path.join() |
131 # it's safe because f is always a relative path |
131 # it's safe because f is always a relative path |
132 return self._rootdir + f |
132 return self._rootdir + f |
133 |
133 |
134 def flagfunc(self, fallback): |
134 def flagfunc(self, buildfallback): |
|
135 if self._checklink and self._checkexec: |
|
136 def f(x): |
|
137 p = self._join(x) |
|
138 if os.path.islink(p): |
|
139 return 'l' |
|
140 if util.isexec(p): |
|
141 return 'x' |
|
142 return '' |
|
143 return f |
|
144 |
|
145 fallback = buildfallback() |
135 if self._checklink: |
146 if self._checklink: |
136 if self._checkexec: |
|
137 def f(x): |
|
138 p = self._join(x) |
|
139 if os.path.islink(p): |
|
140 return 'l' |
|
141 if util.isexec(p): |
|
142 return 'x' |
|
143 return '' |
|
144 return f |
|
145 def f(x): |
147 def f(x): |
146 if os.path.islink(self._join(x)): |
148 if os.path.islink(self._join(x)): |
147 return 'l' |
149 return 'l' |
148 if 'x' in fallback(x): |
150 if 'x' in fallback(x): |
149 return 'x' |
151 return 'x' |
155 return 'l' |
157 return 'l' |
156 if util.isexec(self._join(x)): |
158 if util.isexec(self._join(x)): |
157 return 'x' |
159 return 'x' |
158 return '' |
160 return '' |
159 return f |
161 return f |
160 return fallback |
162 else: |
|
163 return fallback |
161 |
164 |
162 def getcwd(self): |
165 def getcwd(self): |
163 cwd = os.getcwd() |
166 cwd = os.getcwd() |
164 if cwd == self._root: |
167 if cwd == self._root: |
165 return '' |
168 return '' |