[Updated] [++ ] D8660: upgrade: support running upgrade if repository has share-safe requirement
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Mon Aug 10 15:29:39 UTC 2020
pulkit updated this revision to Diff 22384.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8660?vs=21979&id=22384
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8660/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8660
AFFECTED FILES
mercurial/upgrade.py
tests/test-share-safe.t
CHANGE DETAILS
diff --git a/tests/test-share-safe.t b/tests/test-share-safe.t
--- a/tests/test-share-safe.t
+++ b/tests/test-share-safe.t
@@ -167,6 +167,38 @@
$ hg showconfig hooks --config extensions.untrusted=$TESTTMP/untrusted.py
[1]
+Update the source repository format and check that shared repo works
+
+ $ cd ../source
+ $ echo "[format]" >> .hg/hgrc
+ $ echo "revlog-compression=zstd" >> .hg/hgrc
+
+ $ hg debugupgraderepo --run -q -R ../shared1
+ abort: cannot upgrade repository; unsupported source requirement: shared
+ [255]
+
+ $ hg debugupgraderepo --run -q
+ upgrade will perform the following actions:
+
+ requirements
+ preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlogv1, sparserevlog, store
+ added: revlog-compression-zstd
+
+ $ hg log -r .
+ changeset: 1:5f6d8a4bf34a
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: added b
+
+Shared one should work
+ $ cd ../shared1
+ $ hg log -r .
+ changeset: 2:155349b645be
+ tag: tip
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: added c
+
Unsharing works
$ hg unshare
diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -108,6 +108,7 @@
requirements.SIDEDATA_REQUIREMENT,
requirements.COPIESSDC_REQUIREMENT,
requirements.NODEMAP_REQUIREMENT,
+ requirements.SHARESAFE_REQUIREMENT,
}
for name in compression.compengines:
engine = compression.compengines[name]
To: pulkit, #hg-reviewers, marmoute
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200810/76618f7b/attachment.html>
More information about the Mercurial-patches
mailing list