mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
debugchangelog: migrate from lazy to lazy is not an error
Summary: Migrating from the lazy backend to lazy backend should be a no-op. Reviewed By: liubov-dmitrieva Differential Revision: D28554382 fbshipit-source-id: 71c06584f6f7a89096ce4a94843c88cbea542475
This commit is contained in:
parent
b10a056737
commit
5f9559ad99
@ -675,8 +675,12 @@ def migrateto(repo, name):
|
||||
"lazy",
|
||||
}:
|
||||
raise error.Abort(_("cannot migrate away from lazytext backend"))
|
||||
if "lazychangelog" in repo.storerequirements and name != "lazy":
|
||||
raise error.Abort(_("cannot migrate away from lazy backend"))
|
||||
if "lazychangelog" in repo.storerequirements:
|
||||
if name != "lazy":
|
||||
raise error.Abort(_("cannot migrate away from lazy backend"))
|
||||
else:
|
||||
# No need to migrate.
|
||||
return
|
||||
if name == "revlog":
|
||||
migratetorevlog(repo)
|
||||
elif name == "rustrevlog":
|
||||
|
@ -175,10 +175,18 @@ The revlog backend does not need segmented data.
|
||||
│
|
||||
o D
|
||||
|
||||
Cannot migrate hgsql repos
|
||||
To lazy:
|
||||
|
||||
$ echo hgsql >> .hg/requires
|
||||
$ hg debugchangelog --migrate lazytext
|
||||
abort: lazytext backend can only be migrated from hybrid or doublewrite
|
||||
[255]
|
||||
|
||||
(filters out hgsql mysql import errors)
|
||||
$ hg debugchangelog --migrate revlog --config extensions.hgsql= --config hgsql.bypass=1 2>&1 | grep migrate
|
||||
abort: cannot migrate hgsql repo
|
||||
$ hg debugchangelog --migrate doublewrite
|
||||
|
||||
$ setconfig paths.default=test:server1
|
||||
|
||||
$ hg debugchangelog --migrate lazytext
|
||||
|
||||
$ hg debugchangelog --migrate lazy
|
||||
|
||||
$ hg debugchangelog --migrate lazy
|
||||
|
Loading…
Reference in New Issue
Block a user