diff mercurial/localrepo.py @ 43026:0b87eb2fba67

copies: prepare changelog for more copies storage mode We want to store copies information in sidedata, the logic will be quite similar to the one used for extra, but sightly different (not in extra, no hash impact). We start with small refactoring to make our work easier and the coming changesets cleaners. Differential Revision: https://phab.mercurial-scm.org/D6936
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 25 Sep 2019 03:48:41 +0200
parents 188476e48f51
children 827cb4fe62a3
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Sep 27 05:17:30 2019 +0200
+++ b/mercurial/localrepo.py	Wed Sep 25 03:48:41 2019 +0200
@@ -751,6 +751,11 @@
     else: # explicitly mark repo as using revlogv0
         options['revlogv0'] = True
 
+    writecopiesto = ui.config('experimental', 'copies.write-to')
+    copiesextramode = ('changeset-only', 'compatibility')
+    if (writecopiesto in copiesextramode):
+        options['copies-storage'] = 'extra'
+
     return options
 
 def resolverevlogstorevfsoptions(ui, requirements, features):