Show More
@@ -428,22 +428,22 b' class branchcache:' | |||
|
428 | 428 | self._delayed = True |
|
429 | 429 | return |
|
430 | 430 | try: |
|
431 |
f = |
|
|
432 | cachekey = [hex(self.tipnode), b'%d' % self.tiprev] | |
|
433 | if self.filteredhash is not None: | |
|
434 |
|
|
|
435 | f.write(b" ".join(cachekey) + b'\n') | |
|
436 | nodecount = 0 | |
|
437 | for label, nodes in sorted(self._entries.items()): | |
|
438 | label = encoding.fromlocal(label) | |
|
439 | for node in nodes: | |
|
440 |
|
|
|
441 |
|
|
|
442 |
|
|
|
443 |
|
|
|
444 |
|
|
|
445 | f.write(b"%s %s %s\n" % (hex(node), state, label)) | |
|
446 | f.close() | |
|
431 | filename = self._filename(repo) | |
|
432 | with repo.cachevfs(filename, b"w", atomictemp=True) as f: | |
|
433 | cachekey = [hex(self.tipnode), b'%d' % self.tiprev] | |
|
434 | if self.filteredhash is not None: | |
|
435 | cachekey.append(hex(self.filteredhash)) | |
|
436 | f.write(b" ".join(cachekey) + b'\n') | |
|
437 | nodecount = 0 | |
|
438 | for label, nodes in sorted(self._entries.items()): | |
|
439 | label = encoding.fromlocal(label) | |
|
440 | for node in nodes: | |
|
441 | nodecount += 1 | |
|
442 | if node in self._closednodes: | |
|
443 | state = b'c' | |
|
444 | else: | |
|
445 | state = b'o' | |
|
446 | f.write(b"%s %s %s\n" % (hex(node), state, label)) | |
|
447 | 447 | repo.ui.log( |
|
448 | 448 | b'branchcache', |
|
449 | 449 | b'wrote %s with %d labels and %d nodes\n', |
General Comments 0
You need to be logged in to leave comments.
Login now