Show More
@@ -160,6 +160,7 b' def findfile(repo, hash):' | |||
|
160 | 160 | |
|
161 | 161 | class largefilesdirstate(dirstate.dirstate): |
|
162 | 162 | _large_file_dirstate = True |
|
163 | _tr_key_suffix = b'-large-files' | |
|
163 | 164 | |
|
164 | 165 | def __getitem__(self, key): |
|
165 | 166 | return super(largefilesdirstate, self).__getitem__(unixpath(key)) |
@@ -133,6 +133,10 b' CHANGE_TYPE_FILES = "files"' | |||
|
133 | 133 | |
|
134 | 134 | @interfaceutil.implementer(intdirstate.idirstate) |
|
135 | 135 | class dirstate: |
|
136 | ||
|
137 | # used by largefile to avoid overwritting transaction callbacK | |
|
138 | _tr_key_suffix = b'' | |
|
139 | ||
|
136 | 140 | def __init__( |
|
137 | 141 | self, |
|
138 | 142 | opener, |
@@ -951,7 +955,10 b' class dirstate:' | |||
|
951 | 955 | |
|
952 | 956 | # make sure we invalidate the current change on abort |
|
953 | 957 | if tr is not None: |
|
954 |
tr.addabort( |
|
|
958 | tr.addabort( | |
|
959 | b'dirstate-invalidate%s' % self._tr_key_suffix, | |
|
960 | on_abort, | |
|
961 | ) | |
|
955 | 962 | |
|
956 | 963 | self._attached_to_a_transaction = True |
|
957 | 964 | |
@@ -961,7 +968,7 b' class dirstate:' | |||
|
961 | 968 | |
|
962 | 969 | # delay writing in-memory changes out |
|
963 | 970 | tr.addfilegenerator( |
|
964 | b'dirstate-1-main', | |
|
971 | b'dirstate-1-main%s' % self._tr_key_suffix, | |
|
965 | 972 | (self._filename,), |
|
966 | 973 | on_success, |
|
967 | 974 | location=b'plain', |
@@ -969,7 +976,7 b' class dirstate:' | |||
|
969 | 976 | ) |
|
970 | 977 | if write_key: |
|
971 | 978 | tr.addfilegenerator( |
|
972 | b'dirstate-2-key-post', | |
|
979 | b'dirstate-2-key-post%s' % self._tr_key_suffix, | |
|
973 | 980 | (self._filename_th,), |
|
974 | 981 | lambda f: self._write_tracked_hint(tr, f), |
|
975 | 982 | location=b'plain', |
General Comments 0
You need to be logged in to leave comments.
Login now