##// END OF EJS Templates
copies: prepare changelog for more copies storage mode...
marmoute -
r43296:0b87eb2f default
parent child Browse files
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,13 +634,14 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)
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 645 if p1copies is not None:
644 646 extra['p1copies'] = encodecopies(sortedfiles, p1copies)
645 647 if p2copies is not None:
@@ -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