Show More
@@ -391,6 +391,7 b' class changelog(revlog.revlog):' | |||||
391 | self._delaybuf = None |
|
391 | self._delaybuf = None | |
392 | self._divert = False |
|
392 | self._divert = False | |
393 | self.filteredrevs = frozenset() |
|
393 | self.filteredrevs = frozenset() | |
|
394 | self._copiesstorage = opener.options.get('copies-storage') | |||
394 |
|
395 | |||
395 | def tiprev(self): |
|
396 | def tiprev(self): | |
396 | for i in pycompat.xrange(len(self) -1, -2, -1): |
|
397 | for i in pycompat.xrange(len(self) -1, -2, -1): | |
@@ -633,13 +634,14 b' class changelog(revlog.revlog):' | |||||
633 | elif branch in (".", "null", "tip"): |
|
634 | elif branch in (".", "null", "tip"): | |
634 | raise error.StorageError(_('the name \'%s\' is reserved') |
|
635 | raise error.StorageError(_('the name \'%s\' is reserved') | |
635 | % branch) |
|
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 | sortedfiles = sorted(files) |
|
637 | sortedfiles = sorted(files) | |
640 | if extra is not None: |
|
638 | if extra is not None: | |
641 | for name in ('p1copies', 'p2copies', 'filesadded', 'filesremoved'): |
|
639 | for name in ('p1copies', 'p2copies', 'filesadded', 'filesremoved'): | |
642 | extra.pop(name, None) |
|
640 | extra.pop(name, None) | |
|
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 = {} | |||
643 | if p1copies is not None: |
|
645 | if p1copies is not None: | |
644 | extra['p1copies'] = encodecopies(sortedfiles, p1copies) |
|
646 | extra['p1copies'] = encodecopies(sortedfiles, p1copies) | |
645 | if p2copies is not None: |
|
647 | if p2copies is not None: |
@@ -751,6 +751,11 b' def resolvestorevfsoptions(ui, requireme' | |||||
751 | else: # explicitly mark repo as using revlogv0 |
|
751 | else: # explicitly mark repo as using revlogv0 | |
752 | options['revlogv0'] = True |
|
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 | return options |
|
759 | return options | |
755 |
|
760 | |||
756 | def resolverevlogstorevfsoptions(ui, requirements, features): |
|
761 | def resolverevlogstorevfsoptions(ui, requirements, features): |
General Comments 0
You need to be logged in to leave comments.
Login now