annotate tests/test-bookmarks-rebase.t @ 22014:71083b020b4a

push: extract future heads computation into pushop Bundle2 will allow pushing all different parts of the push in a single bundle. This mean that the discovery for each part needs to be done before trying to push. Currently we may have different behaviors for phases and obsolescence markers when the push of changesets fails. For example, information may still be exchanged for a part of the history where changesets are common but where phases mismatch. So the preparation of the push need to determine what information need to be pushed in both situations. And it needs a different set of heads for this. Therefore we are moving heads computation within pushop for easy access by all parties. We start with the simplest set of heads.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 01 Jul 2014 17:20:31 +0200
parents 23f785b38af3
children 328afbad6e57
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
1 $ echo "[extensions]" >> $HGRCPATH
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
2 $ echo "rebase=" >> $HGRCPATH
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 8168
diff changeset
3
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
4 initialize repository
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
5
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
6 $ hg init
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
7
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
8 $ echo 'a' > a
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
9 $ hg ci -A -m "0"
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
10 adding a
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
11
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
12 $ echo 'b' > b
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
13 $ hg ci -A -m "1"
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
14 adding b
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
15
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
16 $ hg up 0
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
17 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
18 $ echo 'c' > c
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
19 $ hg ci -A -m "2"
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
20 adding c
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
21 created new head
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
22
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
23 $ echo 'd' > d
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
24 $ hg ci -A -m "3"
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
25 adding d
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
26
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
27 $ hg bookmark -r 1 one
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
28 $ hg bookmark -r 3 two
19112
23f785b38af3 bookmarks: fix bug that activated a bookmark even with -r passed
Sean Farley <sean.michael.farley@gmail.com>
parents: 17005
diff changeset
29 $ hg up -q two
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
30
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
31 bookmark list
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
32
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
33 $ hg bookmark
13388
a184dbd9b2c5 localrepo: sort hg bookmark output
David Soria Parra <dsp@php.net>
parents: 13386
diff changeset
34 one 1:925d80f479bb
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
35 * two 3:2ae46b1d99a7
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
36
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
37 rebase
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
38
11907
863567a1364f tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11863
diff changeset
39 $ hg rebase -s two -d one
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
40 saved backup bundle to $TESTTMP/.hg/strip-backup/*-backup.hg (glob)
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
41
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
42 $ hg log
17005
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 13469
diff changeset
43 changeset: 3:42e5ed2cdcf4
13386
f78bc5ddbe4f templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents: 13385
diff changeset
44 bookmark: two
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
45 tag: tip
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
46 parent: 1:925d80f479bb
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
47 user: test
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
48 date: Thu Jan 01 00:00:00 1970 +0000
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
49 summary: 3
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
50
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
51 changeset: 2:db815d6d32e6
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
52 parent: 0:f7b1eb17ad24
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
53 user: test
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
54 date: Thu Jan 01 00:00:00 1970 +0000
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
55 summary: 2
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
56
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
57 changeset: 1:925d80f479bb
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
58 bookmark: one
11863
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
59 user: test
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
60 date: Thu Jan 01 00:00:00 1970 +0000
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
61 summary: 1
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
62
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
63 changeset: 0:f7b1eb17ad24
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
64 user: test
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
65 date: Thu Jan 01 00:00:00 1970 +0000
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
66 summary: 0
86ec95b1d37b tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents: 11208
diff changeset
67