comparison mercurial/dirstate.py @ 51700:7f0cb9ee0534

Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 10:02:46 +0200
parents 493034cc3265
children ca7bde5dbafb
comparison
equal deleted inserted replaced
51699:bd1483fd7088 51700:7f0cb9ee0534
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
139 # used by largefile to avoid overwritting transaction callback 140 # used by largefile to avoid overwritting transaction callback
140 _tr_key_suffix = b'' 141 _tr_key_suffix = b''
141 142
142 def __init__( 143 def __init__(
143 self, 144 self,
877 p1_tracked, 878 p1_tracked,
878 p2_info=False, 879 p2_info=False,
879 possibly_dirty=False, 880 possibly_dirty=False,
880 parentfiledata=None, 881 parentfiledata=None,
881 ): 882 ):
883
882 # note: I do not think we need to double check name clash here since we 884 # note: I do not think we need to double check name clash here since we
883 # are in a update/merge case that should already have taken care of 885 # are in a update/merge case that should already have taken care of
884 # this. The test agrees 886 # this. The test agrees
885 887
886 self._dirty = True 888 self._dirty = True
1088 # XXX move before the dirty check once `unlock` stop calling `write` 1090 # XXX move before the dirty check once `unlock` stop calling `write`
1089 assert not self._invalidated_context 1091 assert not self._invalidated_context
1090 1092
1091 write_key = self._use_tracked_hint and self._dirty_tracked_set 1093 write_key = self._use_tracked_hint and self._dirty_tracked_set
1092 if tr: 1094 if tr:
1095
1093 self._setup_tr_abort(tr) 1096 self._setup_tr_abort(tr)
1094 self._attached_to_a_transaction = True 1097 self._attached_to_a_transaction = True
1095 1098
1096 def on_success(f): 1099 def on_success(f):
1097 self._attached_to_a_transaction = False 1100 self._attached_to_a_transaction = False
1281 results[nf] = st 1284 results[nf] = st
1282 else: 1285 else:
1283 badfn(ff, badtype(kind)) 1286 badfn(ff, badtype(kind))
1284 if nf in dmap: 1287 if nf in dmap:
1285 results[nf] = None 1288 results[nf] = None
1286 except OSError as inst: 1289 except (OSError) as inst:
1287 # nf not found on disk - it is dirstate only 1290 # nf not found on disk - it is dirstate only
1288 if nf in dmap: # does it exactly match a missing file? 1291 if nf in dmap: # does it exactly match a missing file?
1289 results[nf] = None 1292 results[nf] = None
1290 else: # does it match a missing directory? 1293 else: # does it match a missing directory?
1291 if self._map.hasdir(nf): 1294 if self._map.hasdir(nf):