equal
deleted
inserted
replaced
134 CHANGE_TYPE_FILES = "files" |
134 CHANGE_TYPE_FILES = "files" |
135 |
135 |
136 |
136 |
137 @interfaceutil.implementer(intdirstate.idirstate) |
137 @interfaceutil.implementer(intdirstate.idirstate) |
138 class dirstate: |
138 class dirstate: |
139 |
|
140 # used by largefile to avoid overwritting transaction callback |
139 # used by largefile to avoid overwritting transaction callback |
141 _tr_key_suffix = b'' |
140 _tr_key_suffix = b'' |
142 |
141 |
143 def __init__( |
142 def __init__( |
144 self, |
143 self, |
878 p1_tracked, |
877 p1_tracked, |
879 p2_info=False, |
878 p2_info=False, |
880 possibly_dirty=False, |
879 possibly_dirty=False, |
881 parentfiledata=None, |
880 parentfiledata=None, |
882 ): |
881 ): |
883 |
|
884 # note: I do not think we need to double check name clash here since we |
882 # note: I do not think we need to double check name clash here since we |
885 # are in a update/merge case that should already have taken care of |
883 # are in a update/merge case that should already have taken care of |
886 # this. The test agrees |
884 # this. The test agrees |
887 |
885 |
888 self._dirty = True |
886 self._dirty = True |
1090 # XXX move before the dirty check once `unlock` stop calling `write` |
1088 # XXX move before the dirty check once `unlock` stop calling `write` |
1091 assert not self._invalidated_context |
1089 assert not self._invalidated_context |
1092 |
1090 |
1093 write_key = self._use_tracked_hint and self._dirty_tracked_set |
1091 write_key = self._use_tracked_hint and self._dirty_tracked_set |
1094 if tr: |
1092 if tr: |
1095 |
|
1096 self._setup_tr_abort(tr) |
1093 self._setup_tr_abort(tr) |
1097 self._attached_to_a_transaction = True |
1094 self._attached_to_a_transaction = True |
1098 |
1095 |
1099 def on_success(f): |
1096 def on_success(f): |
1100 self._attached_to_a_transaction = False |
1097 self._attached_to_a_transaction = False |
1284 results[nf] = st |
1281 results[nf] = st |
1285 else: |
1282 else: |
1286 badfn(ff, badtype(kind)) |
1283 badfn(ff, badtype(kind)) |
1287 if nf in dmap: |
1284 if nf in dmap: |
1288 results[nf] = None |
1285 results[nf] = None |
1289 except (OSError) as inst: |
1286 except OSError as inst: |
1290 # nf not found on disk - it is dirstate only |
1287 # nf not found on disk - it is dirstate only |
1291 if nf in dmap: # does it exactly match a missing file? |
1288 if nf in dmap: # does it exactly match a missing file? |
1292 results[nf] = None |
1289 results[nf] = None |
1293 else: # does it match a missing directory? |
1290 else: # does it match a missing directory? |
1294 if self._map.hasdir(nf): |
1291 if self._map.hasdir(nf): |