annotate tests/test-rebase-bookmarks.t @ 16098:c6c9b83a1e8a stable

tests: tighten checks for octal escapes in shell printf. printf on AIX default shell ksh (89) says \1 is an invalid escape. It insists on at least 2 digits. This causes failures in test-keyword.t and test-status.t. check-code.py already looks out for \NNN and recommends using Python for outputting octal values. Extend the check to \NN and \N and fix up resulting failures.
author Jim Hague <jim.hague@acm.org>
date Wed, 08 Feb 2012 16:56:00 +0000
parents 65df60a3f96b
children f2719b387380 4116504d1ec4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14884
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
2 > [extensions]
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
3 > graphlog=
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
4 > rebase=
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
5 >
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 14884
diff changeset
6 > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 14884
diff changeset
7 > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 14884
diff changeset
8 >
14884
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
9 > [alias]
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
10 > tglog = log -G --template "{rev}: '{desc}' bookmarks: {bookmarks}\n"
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
11 > EOF
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
12
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
13 Create a repo with several bookmarks
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
14 $ hg init a
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
15 $ cd a
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
16
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
17 $ echo a > a
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
18 $ hg ci -Am A
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
19 adding a
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
20
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
21 $ echo b > b
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
22 $ hg ci -Am B
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
23 adding b
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
24 $ hg book 'X'
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
25 $ hg book 'Y'
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
26
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
27 $ echo c > c
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
28 $ hg ci -Am C
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
29 adding c
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
30 $ hg book 'Z'
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
31
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
32 $ hg up -q 0
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
33
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
34 $ echo d > d
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
35 $ hg ci -Am D
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
36 adding d
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
37 created new head
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
38
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
39 $ hg tglog
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
40 @ 3: 'D' bookmarks:
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
41 |
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
42 | o 2: 'C' bookmarks: Y Z
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
43 | |
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
44 | o 1: 'B' bookmarks: X
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
45 |/
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
46 o 0: 'A' bookmarks:
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
47
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
48
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
49 Move only rebased bookmarks
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
50
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
51 $ cd ..
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
52 $ hg clone -q a a1
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
53
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
54 $ cd a1
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
55 $ hg up -q Z
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
56
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
57 $ hg rebase --detach -s Y -d 3
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
58 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
59
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
60 $ hg tglog
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
61 @ 3: 'C' bookmarks: Y Z
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
62 |
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
63 o 2: 'D' bookmarks:
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
64 |
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
65 | o 1: 'B' bookmarks: X
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
66 |/
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
67 o 0: 'A' bookmarks:
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
68
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
69 Keep bookmarks to the correct rebased changeset
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
70
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
71 $ cd ..
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
72 $ hg clone -q a a2
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
73
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
74 $ cd a2
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
75 $ hg up -q Z
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
76
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
77 $ hg rebase -s 1 -d 3
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
78 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
79
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
80 $ hg tglog
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
81 @ 3: 'C' bookmarks: Y Z
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
82 |
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
83 o 2: 'B' bookmarks: X
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
84 |
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
85 o 1: 'D' bookmarks:
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
86 |
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
87 o 0: 'A' bookmarks:
c0ccd70df52c rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
88