annotate tests/bundles/remote.sh @ 40417:49c7b701fdc2 stable

phase: add an archived phase This phase allows for hidden changesets in the "user space". It differs from the "internal" phase which is intended for internal by-product only. There have been discussions at the 4.8 sprint to use such phase to speedup cleanup after history rewriting operation. Shipping it in the same release as the 'internal-phase' groups the associated `requires` entry. The important bit is to have support for this phase in the earliest version of mercurial possible. Adding the UI to manipulate this new phase later seems fine. The current plan for archived usage and user interface are as follow. On a repository with internal-phase on and evolution off: * history rewriting command set rewritten changeset in the archived phase. (This mean updating the cleanupnodes method). * keep `hg unbundle .hg/strip-backup/X.hg` as a way to restore changeset for now (backup bundle need to contains phase data) * [maybe] add a `hg strip --soft` advance flag (a light way to expose the feature without getting in the way of a better UI) Mercurial 4.8 freeze is too close to get the above in by then. We don't introduce a new repository `requirement` as we reuse the one introduced with the 'archived' phase during the 4.8 cycle.
author Boris Feld <boris.feld@octobus.net>
date Wed, 17 Oct 2018 14:47:01 +0200
parents 5d57b2101ab1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20832
5d57b2101ab1 tests: don't hardcode path to bash interpreter
Olle Lundberg <geek@nerd.sh>
parents: 14117
diff changeset
1 #!/usr/bin/env bash
14117
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
2 hg init remote
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
3 cd remote
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
4
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
5 echo "0" >> afile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
6 hg add afile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
7 hg commit -m "0.0"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
8 echo "1" >> afile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
9 hg commit -m "0.1"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
10 echo "2" >> afile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
11 hg commit -m "0.2"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
12 echo "3" >> afile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
13 hg commit -m "0.3"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
14 hg update -C 0
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
15 echo "1" >> afile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
16 hg commit -m "1.1"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
17 echo "2" >> afile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
18 hg commit -m "1.2"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
19 echo "a line" > fred
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
20 echo "3" >> afile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
21 hg add fred
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
22 hg commit -m "1.3"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
23 hg mv afile adifferentfile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
24 hg commit -m "1.3m"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
25 hg update -C 3
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
26 hg mv afile anotherfile
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
27 hg commit -m "0.3m"
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
28
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
29 hg bundle -a ../remote.hg
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
30
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
31 cd ..
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
32 rm -Rf remote