Show More
@@ -391,6 +391,7 b' class changelog(revlog.revlog):' | |||
|
391 | 391 | self._delaybuf = None |
|
392 | 392 | self._divert = False |
|
393 | 393 | self.filteredrevs = frozenset() |
|
394 | self._copiesstorage = opener.options.get('copies-storage') | |
|
394 | 395 | |
|
395 | 396 | def tiprev(self): |
|
396 | 397 | for i in pycompat.xrange(len(self) -1, -2, -1): |
@@ -633,21 +634,22 b' class changelog(revlog.revlog):' | |||
|
633 | 634 | elif branch in (".", "null", "tip"): |
|
634 | 635 | raise error.StorageError(_('the name \'%s\' is reserved') |
|
635 | 636 | % branch) |
|
636 | extrasentries = p1copies, p2copies, filesadded, filesremoved | |
|
637 | if extra is None and any(x is not None for x in extrasentries): | |
|
638 | extra = {} | |
|
639 | 637 | sortedfiles = sorted(files) |
|
640 | 638 | if extra is not None: |
|
641 | 639 | for name in ('p1copies', 'p2copies', 'filesadded', 'filesremoved'): |
|
642 | 640 | extra.pop(name, None) |
|
643 | if p1copies is not None: | |
|
644 | extra['p1copies'] = encodecopies(sortedfiles, p1copies) | |
|
645 | if p2copies is not None: | |
|
646 | extra['p2copies'] = encodecopies(sortedfiles, p2copies) | |
|
647 |
if |
|
|
648 |
extra[' |
|
|
649 |
if |
|
|
650 |
extra[' |
|
|
641 | if self._copiesstorage == 'extra': | |
|
642 | extrasentries = p1copies, p2copies, filesadded, filesremoved | |
|
643 | if extra is None and any(x is not None for x in extrasentries): | |
|
644 | extra = {} | |
|
645 | if p1copies is not None: | |
|
646 | extra['p1copies'] = encodecopies(sortedfiles, p1copies) | |
|
647 | if p2copies is not None: | |
|
648 | extra['p2copies'] = encodecopies(sortedfiles, p2copies) | |
|
649 | if filesadded is not None: | |
|
650 | extra['filesadded'] = encodefileindices(sortedfiles, filesadded) | |
|
651 | if filesremoved is not None: | |
|
652 | extra['filesremoved'] = encodefileindices(sortedfiles, filesremoved) | |
|
651 | 653 | |
|
652 | 654 | if extra: |
|
653 | 655 | extra = encodeextra(extra) |
@@ -751,6 +751,11 b' def resolvestorevfsoptions(ui, requireme' | |||
|
751 | 751 | else: # explicitly mark repo as using revlogv0 |
|
752 | 752 | options['revlogv0'] = True |
|
753 | 753 | |
|
754 | writecopiesto = ui.config('experimental', 'copies.write-to') | |
|
755 | copiesextramode = ('changeset-only', 'compatibility') | |
|
756 | if (writecopiesto in copiesextramode): | |
|
757 | options['copies-storage'] = 'extra' | |
|
758 | ||
|
754 | 759 | return options |
|
755 | 760 | |
|
756 | 761 | def resolverevlogstorevfsoptions(ui, requirements, features): |
General Comments 0
You need to be logged in to leave comments.
Login now