mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
640a873e9c
Summary: When migrating down from narrow-heads, we need to restore phase roots. Use a repo requirement to track the migration state, and perform migrations on demand. Reviewed By: sfilipco Differential Revision: D17584604 fbshipit-source-id: 36c04b0385dd94481f5340a3ecd8eeef3506c765
50 lines
1.1 KiB
Perl
50 lines
1.1 KiB
Perl
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
|
|
1: public
|
|
$ hg phase $C
|
|
2: draft
|
|
|
|
Migrate down.
|
|
|
|
$ setconfig experimental.narrow-heads=false
|
|
$ hg phase $B
|
|
migrating repo to old-style visibility and phases
|
|
(this restores the behavior to a known good state; post in Source Control @ FB if you have issues)
|
|
(added 1 draft roots)
|
|
1: public
|
|
$ hg phase $C
|
|
2: draft
|
|
$ drawdag << 'EOS'
|
|
> D
|
|
> |
|
|
> A
|
|
> EOS
|
|
$ hg phase $D
|
|
3: draft
|
|
|
|
Migrate up.
|
|
|
|
$ setconfig experimental.narrow-heads=true
|
|
$ hg phase $B
|
|
migrating repo to new-style visibility and phases
|
|
(this does not affect most workflows; post in Source Control @ FB if you have issues)
|
|
1: public
|
|
$ hg phase $C
|
|
2: draft
|
|
$ hg phase $D
|
|
3: draft
|