Show More
@@ -54,20 +54,6 b' def _getfsnow(vfs):' | |||
|
54 | 54 | os.close(tmpfd) |
|
55 | 55 | vfs.unlink(tmpname) |
|
56 | 56 | |
|
57 | def nonnormalentries(dmap): | |
|
58 | '''Compute the nonnormal dirstate entries from the dmap''' | |
|
59 | try: | |
|
60 | return parsers.nonnormalotherparententries(dmap._map) | |
|
61 | except AttributeError: | |
|
62 | nonnorm = set() | |
|
63 | otherparent = set() | |
|
64 | for fname, e in dmap.iteritems(): | |
|
65 | if e[0] != 'n' or e[3] == -1: | |
|
66 | nonnorm.add(fname) | |
|
67 | if e[0] == 'n' and e[2] == -2: | |
|
68 | otherparent.add(fname) | |
|
69 | return nonnorm, otherparent | |
|
70 | ||
|
71 | 57 | class dirstate(object): |
|
72 | 58 | |
|
73 | 59 | def __init__(self, opener, ui, root, validate, sparsematchfn): |
@@ -162,13 +148,13 b' class dirstate(object):' | |||
|
162 | 148 | |
|
163 | 149 | @propertycache |
|
164 | 150 | def _nonnormalset(self): |
|
165 |
nonnorm, otherparents = |
|
|
151 | nonnorm, otherparents = self._map.nonnormalentries() | |
|
166 | 152 | self._otherparentset = otherparents |
|
167 | 153 | return nonnorm |
|
168 | 154 | |
|
169 | 155 | @propertycache |
|
170 | 156 | def _otherparentset(self): |
|
171 |
nonnorm, otherparents = |
|
|
157 | nonnorm, otherparents = self._map.nonnormalentries() | |
|
172 | 158 | self._nonnormalset = nonnorm |
|
173 | 159 | return otherparents |
|
174 | 160 | |
@@ -843,7 +829,7 b' class dirstate(object):' | |||
|
843 | 829 | |
|
844 | 830 | st.write(parsers.pack_dirstate(self._map._map, self._copymap, self._pl, |
|
845 | 831 | now)) |
|
846 |
self._nonnormalset, self._otherparentset = |
|
|
832 | self._nonnormalset, self._otherparentset = self._map.nonnormalentries() | |
|
847 | 833 | st.close() |
|
848 | 834 | self._lastnormaltime = 0 |
|
849 | 835 | self._dirty = self._dirtypl = False |
@@ -1369,3 +1355,18 b' class dirstatemap(object):' | |||
|
1369 | 1355 | |
|
1370 | 1356 | def keys(self): |
|
1371 | 1357 | return self._map.keys() |
|
1358 | ||
|
1359 | def nonnormalentries(self): | |
|
1360 | '''Compute the nonnormal dirstate entries from the dmap''' | |
|
1361 | try: | |
|
1362 | return parsers.nonnormalotherparententries(self._map) | |
|
1363 | except AttributeError: | |
|
1364 | nonnorm = set() | |
|
1365 | otherparent = set() | |
|
1366 | for fname, e in self._map.iteritems(): | |
|
1367 | if e[0] != 'n' or e[3] == -1: | |
|
1368 | nonnorm.add(fname) | |
|
1369 | if e[0] == 'n' and e[2] == -2: | |
|
1370 | otherparent.add(fname) | |
|
1371 | return nonnorm, otherparent | |
|
1372 |
General Comments 0
You need to be logged in to leave comments.
Login now