2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2019-09-28 02:47:48 +03:00
|
|
|
Test migration between narrow-heads and non-narrow-heads
|
|
|
|
|
|
|
|
$ enable remotenames amend
|
|
|
|
$ setconfig experimental.narrow-heads=true visibility.enabled=true mutation.record=true mutation.enabled=true mutation.date="0 0" experimental.evolution= remotenames.rename.default=remote
|
|
|
|
|
|
|
|
$ newrepo
|
|
|
|
$ drawdag << 'EOS'
|
|
|
|
> B C
|
|
|
|
> |/
|
|
|
|
> A
|
|
|
|
> EOS
|
|
|
|
|
|
|
|
Make 'B' public, and 'C' draft.
|
|
|
|
|
|
|
|
$ hg debugremotebookmark master $B
|
|
|
|
$ hg phase $B
|
2019-11-19 00:21:22 +03:00
|
|
|
112478962961147124edd43549aedd1a335e44bf: public
|
2019-09-28 02:47:48 +03:00
|
|
|
$ hg phase $C
|
2019-11-19 00:21:22 +03:00
|
|
|
dc0947a82db884575bb76ea10ac97b08536bfa03: draft
|
2019-09-28 02:47:48 +03:00
|
|
|
|
|
|
|
Migrate down.
|
|
|
|
|
|
|
|
$ setconfig experimental.narrow-heads=false
|
2020-03-05 22:39:12 +03:00
|
|
|
|
|
|
|
(Test if the repo is locked, the auto migration is skipped)
|
|
|
|
$ EDENSCM_TEST_PRETEND_LOCKED=lock hg phase $B
|
|
|
|
112478962961147124edd43549aedd1a335e44bf: public
|
|
|
|
|
2019-09-28 02:47:48 +03:00
|
|
|
$ hg phase $B
|
2019-11-19 00:21:22 +03:00
|
|
|
112478962961147124edd43549aedd1a335e44bf: public
|
2019-09-28 02:47:48 +03:00
|
|
|
$ hg phase $C
|
2019-11-19 00:21:22 +03:00
|
|
|
dc0947a82db884575bb76ea10ac97b08536bfa03: draft
|
2019-09-28 02:47:48 +03:00
|
|
|
$ drawdag << 'EOS'
|
|
|
|
> D
|
|
|
|
> |
|
|
|
|
> A
|
|
|
|
> EOS
|
|
|
|
$ hg phase $D
|
2019-11-19 00:21:22 +03:00
|
|
|
b18e25de2cf5fc4699a029ed635882849e53ef73: draft
|
2019-09-28 02:47:48 +03:00
|
|
|
|
|
|
|
Migrate up.
|
|
|
|
|
|
|
|
$ setconfig experimental.narrow-heads=true
|
|
|
|
$ hg phase $B
|
2019-11-19 00:21:22 +03:00
|
|
|
112478962961147124edd43549aedd1a335e44bf: public
|
2019-09-28 02:47:48 +03:00
|
|
|
$ hg phase $C
|
2019-11-19 00:21:22 +03:00
|
|
|
dc0947a82db884575bb76ea10ac97b08536bfa03: draft
|
2019-09-28 02:47:48 +03:00
|
|
|
$ hg phase $D
|
2019-11-19 00:21:22 +03:00
|
|
|
b18e25de2cf5fc4699a029ed635882849e53ef73: draft
|
2019-11-09 06:28:34 +03:00
|
|
|
|
|
|
|
Test (legacy) secret commit migration.
|
|
|
|
|
|
|
|
$ newrepo
|
|
|
|
$ setconfig experimental.narrow-heads=false
|
|
|
|
|
|
|
|
$ drawdag << 'EOS'
|
|
|
|
> D
|
|
|
|
> |
|
|
|
|
> M C
|
|
|
|
> |/
|
|
|
|
> | B
|
|
|
|
> |/
|
|
|
|
> A
|
|
|
|
> EOS
|
|
|
|
$ hg debugremotebookmark master $M
|
2020-06-29 21:24:57 +03:00
|
|
|
$ hg debugmakepublic $M
|
2019-11-09 06:28:34 +03:00
|
|
|
$ hg phase --force --draft $C
|
|
|
|
$ hg phase --force --secret $D+$B
|
|
|
|
$ hg hide $D -q
|
|
|
|
|
|
|
|
Migrate up.
|
|
|
|
|
|
|
|
$ setconfig experimental.narrow-heads=true
|
|
|
|
$ hg log -G -T '{desc} {phase}'
|
|
|
|
o M public
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ o C draft
|
|
|
|
├─╯
|
|
|
|
│ o B draft
|
|
|
|
├─╯
|
2019-11-09 06:28:34 +03:00
|
|
|
o A public
|
|
|
|
|
|
|
|
Migrate down.
|
|
|
|
|
|
|
|
$ rm .hg/store/phaseroots
|
|
|
|
$ setconfig experimental.narrow-heads=false
|
|
|
|
$ hg log -G -T '{desc} {phase}'
|
|
|
|
o M public
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ o C draft
|
|
|
|
├─╯
|
|
|
|
│ o B draft
|
|
|
|
├─╯
|
2019-11-09 06:28:34 +03:00
|
|
|
o A public
|
|
|
|
|
|
|
|
(Check: D is invisible)
|