Show More
@@ -1461,6 +1461,13 b' class localrepository(object):' | |||||
1461 | # dirstate is invalidated separately in invalidatedirstate() |
|
1461 | # dirstate is invalidated separately in invalidatedirstate() | |
1462 | if k == 'dirstate': |
|
1462 | if k == 'dirstate': | |
1463 | continue |
|
1463 | continue | |
|
1464 | if (k == 'changelog' and | |||
|
1465 | self.currenttransaction() and | |||
|
1466 | self.changelog._delayed): | |||
|
1467 | # The changelog object may store unwritten revisions. We don't | |||
|
1468 | # want to lose them. | |||
|
1469 | # TODO: Solve the problem instead of working around it. | |||
|
1470 | continue | |||
1464 |
|
1471 | |||
1465 | if clearfilecache: |
|
1472 | if clearfilecache: | |
1466 | del self._filecache[k] |
|
1473 | del self._filecache[k] |
@@ -179,3 +179,14 b" for i in [b'1', b'2', b'3']:" | |||||
179 | print('data mismatch') |
|
179 | print('data mismatch') | |
180 | except Exception as ex: |
|
180 | except Exception as ex: | |
181 | print('cannot read data: %r' % ex) |
|
181 | print('cannot read data: %r' % ex) | |
|
182 | ||||
|
183 | with repo.wlock(), repo.lock(), repo.transaction('test'): | |||
|
184 | with open(b'4', 'wb') as f: | |||
|
185 | f.write(b'4') | |||
|
186 | repo.dirstate.normal('4') | |||
|
187 | repo.commit('4') | |||
|
188 | revsbefore = len(repo.changelog) | |||
|
189 | repo.invalidate(clearfilecache=True) | |||
|
190 | revsafter = len(repo.changelog) | |||
|
191 | if revsbefore != revsafter: | |||
|
192 | print('changeset lost by repo.invalidate()') |
General Comments 0
You need to be logged in to leave comments.
Login now