Show More
@@ -20,7 +20,7 b' class dirstate(object):' | |||||
20 | def __init__(self, opener, ui, root): |
|
20 | def __init__(self, opener, ui, root): | |
21 | self._opener = opener |
|
21 | self._opener = opener | |
22 | self._root = root |
|
22 | self._root = root | |
23 |
self._dirty = |
|
23 | self._dirty = False | |
24 | self._ui = ui |
|
24 | self._ui = ui | |
25 |
|
25 | |||
26 | def __getattr__(self, name): |
|
26 | def __getattr__(self, name): | |
@@ -109,11 +109,8 b' class dirstate(object):' | |||||
109 | def branch(self): |
|
109 | def branch(self): | |
110 | return self._branch |
|
110 | return self._branch | |
111 |
|
111 | |||
112 | def markdirty(self): |
|
|||
113 | self._dirty = 1 |
|
|||
114 |
|
||||
115 | def setparents(self, p1, p2=nullid): |
|
112 | def setparents(self, p1, p2=nullid): | |
116 |
self. |
|
113 | self._dirty = True | |
117 | self._pl = p1, p2 |
|
114 | self._pl = p1, p2 | |
118 |
|
115 | |||
119 | def setbranch(self, branch): |
|
116 | def setbranch(self, branch): | |
@@ -162,10 +159,10 b' class dirstate(object):' | |||||
162 | for a in "_map _copymap _branch _pl _dirs _ignore".split(): |
|
159 | for a in "_map _copymap _branch _pl _dirs _ignore".split(): | |
163 | if hasattr(self, a): |
|
160 | if hasattr(self, a): | |
164 | self.__delattr__(a) |
|
161 | self.__delattr__(a) | |
165 |
self._dirty = |
|
162 | self._dirty = False | |
166 |
|
163 | |||
167 | def copy(self, source, dest): |
|
164 | def copy(self, source, dest): | |
168 |
self. |
|
165 | self._dirty = True | |
169 | self._copymap[dest] = source |
|
166 | self._copymap[dest] = source | |
170 |
|
167 | |||
171 | def copied(self, file): |
|
168 | def copied(self, file): | |
@@ -208,7 +205,7 b' class dirstate(object):' | |||||
208 | a marked for addition''' |
|
205 | a marked for addition''' | |
209 |
|
206 | |||
210 | if not files: return |
|
207 | if not files: return | |
211 |
self. |
|
208 | self._dirty = True | |
212 | for f in files: |
|
209 | for f in files: | |
213 | if self._copymap.has_key(f): |
|
210 | if self._copymap.has_key(f): | |
214 | del self._copymap[f] |
|
211 | del self._copymap[f] | |
@@ -227,7 +224,7 b' class dirstate(object):' | |||||
227 |
|
224 | |||
228 | def forget(self, files): |
|
225 | def forget(self, files): | |
229 | if not files: return |
|
226 | if not files: return | |
230 |
self. |
|
227 | self._dirty = True | |
231 | for f in files: |
|
228 | for f in files: | |
232 | try: |
|
229 | try: | |
233 | del self._map[f] |
|
230 | del self._map[f] | |
@@ -244,7 +241,7 b' class dirstate(object):' | |||||
244 | else: |
|
241 | else: | |
245 | self._map[f] = ('n', 0666, -1, 0) |
|
242 | self._map[f] = ('n', 0666, -1, 0) | |
246 | self._pl = (parent, nullid) |
|
243 | self._pl = (parent, nullid) | |
247 |
self. |
|
244 | self._dirty = True | |
248 |
|
245 | |||
249 | def write(self): |
|
246 | def write(self): | |
250 | if not self._dirty: |
|
247 | if not self._dirty: | |
@@ -261,7 +258,7 b' class dirstate(object):' | |||||
261 | st = self._opener("dirstate", "w", atomictemp=True) |
|
258 | st = self._opener("dirstate", "w", atomictemp=True) | |
262 | st.write(cs.getvalue()) |
|
259 | st.write(cs.getvalue()) | |
263 | st.rename() |
|
260 | st.rename() | |
264 |
self._dirty = |
|
261 | self._dirty = False | |
265 |
|
262 | |||
266 | def filterfiles(self, files): |
|
263 | def filterfiles(self, files): | |
267 | ret = {} |
|
264 | ret = {} |
General Comments 0
You need to be logged in to leave comments.
Login now