annotate tests/test-keyword.t @ 24837:edf907bd8144 stable

record: fix record with change on moved file crashes (issue4619) reverting 79fceed67676, add a test to prevent the issue from coming back.
author Laurent Charignon <lcharignon@fb.com>
date Wed, 22 Apr 2015 13:56:30 -0700
parents 79fceed67676
children 8133494accf1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1 $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
2 > [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
3 > keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
4 > mq =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
5 > notify =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
6 > record =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
7 > transplant =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
8 > [ui]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
9 > interactive = true
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
10 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
11
17015
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
12 hide outer repo
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
13 $ hg init
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
14
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
15 Run kwdemo before [keyword] files are set up
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
16 as it would succeed without uisetup otherwise
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
17
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
18 $ hg --quiet kwdemo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
19 [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
20 keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
21 [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
22 demo.txt =
13298
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
23 [keywordset]
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
24 svn = False
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
25 [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
26 Author = {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
27 Date = {date|utcdate}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
28 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
29 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
30 RCSFile = {file|basename},v
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
31 RCSfile = {file|basename},v
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
32 Revision = {node|short}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
33 Source = {root}/{file},v
12372
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
34 $Author: test $
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
35 $Date: ????/??/?? ??:??:?? $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
36 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
37 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
12372
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
38 $RCSFile: demo.txt,v $
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
39 $RCSfile: demo.txt,v $
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
40 $Revision: ???????????? $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
41 $Source: */demo.txt,v $ (glob)
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
42
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
43 $ hg --quiet kwdemo "Branch = {branches}"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
44 [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
45 keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
46 [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
47 demo.txt =
13298
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
48 [keywordset]
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
49 svn = False
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
50 [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
51 Branch = {branches}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
52 $Branch: demobranch $
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
53
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
54 $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
55 > [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
56 > ** =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
57 > b = ignore
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
58 > i = ignore
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
59 > [hooks]
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
60 > EOF
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
61 $ cp $HGRCPATH $HGRCPATH.nohooks
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
62 > cat <<EOF >> $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
63 > commit=
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
64 > commit.test=cp a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
65 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
66
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
67 $ hg init Test-bndl
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
68 $ cd Test-bndl
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
69
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
70 kwshrink should exit silently in empty/invalid repo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
71
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
72 $ hg kwshrink
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
73
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
74 Symlinks cannot be created on Windows.
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
75 A bundle to test this was made with:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
76 hg init t
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
77 cd t
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
78 echo a > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
79 ln -s a sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
80 hg add sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
81 hg ci -m addsym -u mercurial
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
82 hg bundle --base null ../test-keyword.hg
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
83
14116
cd3032437064 tests: move test bundles in a bundles/ subdirectory
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13572
diff changeset
84 $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
85 pulling from *test-keyword.hg (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
86 requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
87 adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
88 adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
89 adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
90 added 1 changesets with 1 changes to 1 files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
91 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
92
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
93 $ echo 'expand $Id$' > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
94 $ echo 'do not process $Id:' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
95 $ echo 'xxx $' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
96 $ echo 'ignore $Id$' > b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
97
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
98 Output files as they were created
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
99
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
100 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
101 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
102 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
103 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
104 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
105
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
106 no kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
107
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
108 $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
109
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
110 untracked candidates
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
111
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
112 $ hg -v kwfiles --unknown
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
113 k a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
114
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
115 Add files and check status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
116
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
117 $ hg addremove
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
118 adding a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
119 adding b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
120 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
121 A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
122 A b
6061
de08788511d7 test-keyword: make it run under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 6051
diff changeset
123
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
124
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
125 Default keyword expansion including commit hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
126 Interrupted commit should not change state or run commit hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
127
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
128 $ hg --debug commit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
129 abort: empty commit message
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
130 [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
131 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
132 A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
133 A b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
134
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
135 Commit with several checks
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
136
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
137 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
138 committing files:
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
139 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
140 b
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
141 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
142 committing changelog
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
143 overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
144 running hook commit.test: cp a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
145 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
146 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
147 ? hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
148 $ hg debugrebuildstate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
149 $ hg --quiet identify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
150 ef63ca68695b
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
151
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
152 cat files in working directory with keywords expanded
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
153
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
154 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
155 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
156 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
157 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
158 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
159
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
160 hg cat files and symlink, no expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
161
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
162 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
163 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
164 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
165 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
166 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
167 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
168
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
169 $ diff a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
170
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
171 $ cp $HGRCPATH.nohooks $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
172 $ rm hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
173
15871
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
174 hg status of kw-ignored binary file starting with '\1\n'
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
175
16098
c6c9b83a1e8a tests: tighten checks for octal escapes in shell printf.
Jim Hague <jim.hague@acm.org>
parents: 15902
diff changeset
176 >>> open("i", "wb").write("\1\nfoo")
15871
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
177 $ hg -q commit -Am metasep i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
178 $ hg status
16098
c6c9b83a1e8a tests: tighten checks for octal escapes in shell printf.
Jim Hague <jim.hague@acm.org>
parents: 15902
diff changeset
179 >>> open("i", "wb").write("\1\nbar")
15871
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
180 $ hg status
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
181 M i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
182 $ hg -q commit -m "modify metasep" i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
183 $ hg status --rev 2:3
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
184 M i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
185 $ touch empty
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
186 $ hg -q commit -A -m "another file"
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
187 $ hg status -A --rev 3:4 i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
188 C i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
189
23621
bb679344c88d keyword: update test file syntax
Christian Ebert <blacktrash@gmx.net>
parents: 22589
diff changeset
190 $ hg -q strip --no-backup 2
15871
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
191
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
192 Test hook execution
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
193
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
194 bundle
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
195
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
196 $ hg bundle --base null ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
197 2 changesets found
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
198 $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
199 $ hg init Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
200 $ cd Test
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
201
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
202 Notify on pull to check whether keywords stay as is in email
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
203 ie. if patch.diff wrapper acts as it should
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
204
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
205 $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
206 > [hooks]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
207 > incoming.notify = python:hgext.notify.hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
208 > [notify]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
209 > sources = pull
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
210 > diffstat = False
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
211 > maxsubject = 15
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
212 > [reposubs]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
213 > * = Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
214 > EOF
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
215
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
216 Pull from bundle and trigger notify
6051
1038b1458d7a keyword: safeguards against erroneous behaviour or aborts
Christian Ebert <blacktrash@gmx.net>
parents: 5894
diff changeset
217
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
218 $ hg pull -u ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
219 pulling from ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
220 requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
221 adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
222 adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
223 adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
224 added 2 changesets with 3 changes to 3 files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
225 Content-Type: text/plain; charset="us-ascii"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
226 MIME-Version: 1.0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
227 Content-Transfer-Encoding: 7bit
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
228 Date: * (glob)
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
229 Subject: changeset in...
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
230 From: mercurial
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
231 X-Hg-Notification: changeset a2392c293916
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
232 Message-Id: <hg.a2392c293916*> (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
233 To: Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
234
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
235 changeset a2392c293916 in $TESTTMP/Test (glob)
13572
1bb2a56a9d73 tests: use $TESTTMP more and use (glob) less
Martin Geisler <mg@aragost.com>
parents: 13446
diff changeset
236 details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
237 description:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
238 addsym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
239
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
240 diffs (6 lines):
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
241
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
242 diff -r 000000000000 -r a2392c293916 sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
243 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
244 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
245 @@ -0,0 +1,1 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
246 +a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
247 \ No newline at end of file
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
248 Content-Type: text/plain; charset="us-ascii"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
249 MIME-Version: 1.0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
250 Content-Transfer-Encoding: 7bit
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
251 Date:* (glob)
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
252 Subject: changeset in...
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
253 From: User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
254 X-Hg-Notification: changeset ef63ca68695b
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
255 Message-Id: <hg.ef63ca68695b*> (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
256 To: Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
257
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
258 changeset ef63ca68695b in $TESTTMP/Test (glob)
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
259 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
260 description:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
261 absym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
262
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
263 diffs (12 lines):
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
264
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
265 diff -r a2392c293916 -r ef63ca68695b a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
266 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
267 +++ b/a Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
268 @@ -0,0 +1,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
269 +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
270 +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
271 +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
272 diff -r a2392c293916 -r ef63ca68695b b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
273 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
274 +++ b/b Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
275 @@ -0,0 +1,1 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
276 +ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
277 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
6116
e27f39865d7e keyword: add test for patch.diff monkey
Christian Ebert <blacktrash@gmx.net>
parents: 6061
diff changeset
278
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
279 $ cp $HGRCPATH.nohooks $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
280
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
281 Touch files and check with status
6116
e27f39865d7e keyword: add test for patch.diff monkey
Christian Ebert <blacktrash@gmx.net>
parents: 6061
diff changeset
282
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
283 $ touch a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
284 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
285
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
286 Update and expand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
287
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
288 $ rm sym a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
289 $ hg update -C
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
290 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
291 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
292 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
293 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
294 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
295 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
296
15070
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
297 Check whether expansion is filewise and file mode is preserved
6051
1038b1458d7a keyword: safeguards against erroneous behaviour or aborts
Christian Ebert <blacktrash@gmx.net>
parents: 5894
diff changeset
298
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
299 $ echo '$Id$' > c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
300 $ echo 'tests for different changenodes' >> c
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
301 #if unix-permissions
15070
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
302 $ chmod 600 c
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
303 $ ls -l c | cut -b 1-10
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
304 -rw-------
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
305 #endif
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
306
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
307 commit file c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
308
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
309 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
310 adding c
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
311 #if unix-permissions
15070
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
312 $ ls -l c | cut -b 1-10
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
313 -rw-------
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
314 #endif
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
315
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
316 force expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
317
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
318 $ hg -v kwexpand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
319 overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
320 overwriting c expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
321
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
322 compare changenodes in a and c
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
323
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
324 $ cat a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
325 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
326 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
327 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
328 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
329 tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
330
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
331 record
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
332
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
333 $ echo '$Id$' > r
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
334 $ hg add r
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
335
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
336 record chunk
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
337
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
338 >>> lines = open('a', 'rb').readlines()
15556
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
339 >>> lines.insert(1, 'foo\n')
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
340 >>> lines.append('bar\n')
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
341 >>> open('a', 'wb').writelines(lines)
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
342 $ hg record -d '10 1' -m rectest a<<EOF
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
343 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
344 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
345 > n
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
346 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
347 diff --git a/a b/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
348 2 hunks, 2 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
349 examine changes to 'a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
350
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
351 @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
352 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
353 +foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
354 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
355 xxx $
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
356 record change 1/2 to 'a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
357
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
358 @@ -2,2 +3,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
359 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
360 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
361 +bar
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
362 record change 2/2 to 'a'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
363
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
364
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
365 $ hg identify
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
366 5f5eb23505c3+ tip
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
367 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
368 M a
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
369 A r
5894
e181665c1c79 keyword: add very simple mq test
Christian Ebert <blacktrash@gmx.net>
parents: 5856
diff changeset
370
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
371 Cat modified file a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
372
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
373 $ cat a
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
374 expand $Id: a,v 5f5eb23505c3 1970/01/01 00:00:10 test $
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
375 foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
376 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
377 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
378 bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
379
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
380 Diff remaining chunk
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
381
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
382 $ hg diff a
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
383 diff -r 5f5eb23505c3 a
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
384 --- a/a Thu Jan 01 00:00:09 1970 -0000
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
385 +++ b/a * (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
386 @@ -2,3 +2,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
387 foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
388 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
389 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
390 +bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
391
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
392 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
393 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
394 working directory now based on revision 2
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
395
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
396 Record all chunks in file a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
397
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
398 $ echo foo > msg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
399
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
400 - do not use "hg record -m" here!
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
401
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
402 $ hg record -l msg -d '11 1' a<<EOF
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
403 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
404 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
405 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
406 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
407 diff --git a/a b/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
408 2 hunks, 2 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
409 examine changes to 'a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
410
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
411 @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
412 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
413 +foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
414 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
415 xxx $
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
416 record change 1/2 to 'a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
417
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
418 @@ -2,2 +3,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
419 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
420 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
421 +bar
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
422 record change 2/2 to 'a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
423
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
424
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
425 File a should be clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
426
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
427 $ hg status -A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
428 C a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
429
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
430 rollback and revert expansion
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
431
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
432 $ cat a
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
433 expand $Id: a,v 78e0a02d76aa 1970/01/01 00:00:11 test $
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
434 foo
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
435 do not process $Id:
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
436 xxx $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
437 bar
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
438 $ hg --verbose rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
439 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
440 working directory now based on revision 2
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
441 overwriting a expanding keywords
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
442 $ hg status a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
443 M a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
444 $ cat a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
445 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
446 foo
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
447 do not process $Id:
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
448 xxx $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
449 bar
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
450 $ echo '$Id$' > y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
451 $ echo '$Id$' > z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
452 $ hg add y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
453 $ hg commit -Am "rollback only" z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
454 $ cat z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
455 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
456 $ hg --verbose rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
457 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
458 working directory now based on revision 2
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
459 overwriting z shrinking keywords
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
460
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
461 Only z should be overwritten
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
462
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
463 $ hg status a y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
464 M a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
465 A y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
466 A z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
467 $ cat z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
468 $Id$
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
469 $ hg forget y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
470 $ rm y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
471
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
472 record added file alone
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
473
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
474 $ hg -v record -l msg -d '12 2' r<<EOF
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
475 > y
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23749
diff changeset
476 > y
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
477 > EOF
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
478 diff --git a/r b/r
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
479 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
480 examine changes to 'r'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
481
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
482 committing files:
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
483 r
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
484 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
485 committing changelog
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
486 committed changeset 3:82a2f715724d
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
487 overwriting r expanding keywords
15075
77325c92db95 keyword: make status test after record and kwexpand/kwshrink reliable
Christian Ebert <blacktrash@gmx.net>
parents: 15070
diff changeset
488 $ hg status r
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
489 $ hg --verbose rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
490 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
491 working directory now based on revision 2
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
492 overwriting r shrinking keywords
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
493 $ hg forget r
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
494 $ rm msg r
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
495 $ hg update -C
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
496 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
497
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
498 record added keyword ignored file
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
499
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
500 $ echo '$Id$' > i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
501 $ hg add i
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
502 $ hg --verbose record -d '13 1' -m recignored<<EOF
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
503 > y
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23749
diff changeset
504 > y
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
505 > EOF
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
506 diff --git a/i b/i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
507 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
508 examine changes to 'i'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
509
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
510 committing files:
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
511 i
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
512 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
513 committing changelog
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
514 committed changeset 3:9f40ceb5a072
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
515 $ cat i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
516 $Id$
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
517 $ hg -q rollback
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
518 $ hg forget i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
519 $ rm i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
520
16810
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
521 amend
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
522
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
523 $ echo amend >> a
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
524 $ echo amend >> b
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
525 $ hg -q commit -d '14 1' -m 'prepare amend'
16810
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
526
17098
09305d7745dd tests: don't use dates before epoch in test-keyword.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17028
diff changeset
527 $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords
16810
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
528 overwriting a expanding keywords
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
529 $ hg -q id
17811
a8aba2921456 amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17537
diff changeset
530 67d8c481a6be
16810
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
531 $ head -1 a
17811
a8aba2921456 amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17537
diff changeset
532 expand $Id: a,v 67d8c481a6be 1970/01/01 00:00:15 test $
16810
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
533
23621
bb679344c88d keyword: update test file syntax
Christian Ebert <blacktrash@gmx.net>
parents: 22589
diff changeset
534 $ hg -q strip --no-backup tip
16810
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
535
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
536 Test patch queue repo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
537
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
538 $ hg init --mq
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
539 $ hg qimport -r tip -n mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
540 $ hg commit --mq -m mqtest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
541
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
542 Keywords should not be expanded in patch
11252
56f306238256 keyword: force dirstate normal when all changes in a file are recorded
Christian Ebert <blacktrash@gmx.net>
parents: 11065
diff changeset
543
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
544 $ cat .hg/patches/mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
545 # HG changeset patch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
546 # User User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
547 # Date 1 0
18648
76b69cccb07a export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents: 18462
diff changeset
548 # Thu Jan 01 00:00:01 1970 +0000
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
549 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
550 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
551 cndiff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
552
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
553 diff -r ef63ca68695b -r 40a904bbbe4c c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
554 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
555 +++ b/c Thu Jan 01 00:00:01 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
556 @@ -0,0 +1,2 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
557 +$Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
558 +tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
559
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
560 $ hg qpop
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
561 popping mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
562 patch queue now empty
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
563
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
564 qgoto, implying qpush, should expand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
565
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
566 $ hg qgoto mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
567 applying mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
568 now at: mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
569 $ cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
570 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
571 tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
572 $ hg cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
573 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
574 tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
575
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
576 Keywords should not be expanded in filelog
11046
6e9b9f6c117c keyword: test recording
Christian Ebert <blacktrash@gmx.net>
parents: 11044
diff changeset
577
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
578 $ hg --config 'extensions.keyword=!' cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
579 $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
580 tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
581
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
582 qpop and move on
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
583
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
584 $ hg qpop
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
585 popping mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
586 patch queue now empty
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
587
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
588 Copy and show added kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
589
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
590 $ hg cp a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
591 $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
592 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
593 c
5856
85888efbdfff keyword: test that expansion is done filewise
Christian Ebert <blacktrash@gmx.net>
parents: 5855
diff changeset
594
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
595 Commit and show expansion in original and copy
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
596
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
597 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
598 committing files:
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
599 c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
600 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
601 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
602 committing changelog
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
603 overwriting c expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
604 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
605 $ cat a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
606 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
607 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
608 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
609 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
610 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
611 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
612
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
613 Touch copied c and check its status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
614
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
615 $ touch c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
616 $ hg status
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
617
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
618 Copy kwfile to keyword ignored file unexpanding keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
619
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
620 $ hg --verbose copy a i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
621 copying a to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
622 overwriting i shrinking keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
623 $ head -n 1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
624 expand $Id$
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
625 $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
626 $ rm i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
627
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
628 Copy ignored file to ignored file: no overwriting
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
629
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
630 $ hg --verbose copy b i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
631 copying b to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
632 $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
633 $ rm i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
634
13069
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
635 cp symlink file; hg cp -A symlink file (part1)
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
636 - copied symlink points to kwfile: overwrite
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
637
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
638 #if symlink
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
639 $ cp sym i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
640 $ ls -l i
12647
60c7ae35fcbe test-keyword: fix test glob to ACL/SELinux flag
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
641 -rw-r--r--* (glob)
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
642 $ head -1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
643 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
644 $ hg copy --after --verbose sym i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
645 copying sym to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
646 overwriting i shrinking keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
647 $ head -1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
648 expand $Id$
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
649 $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
650 $ rm i
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
651 #endif
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
652
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
653 Test different options of hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
654
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
655 $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
656 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
657 c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
658 $ hg -v kwfiles --ignore
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
659 I b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
660 I sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
661 $ hg kwfiles --all
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
662 K a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
663 K c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
664 I b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
665 I sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
666
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
667 Diff specific revision
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
668
12102
9aba4ceb654d test-keyword: use regular expressions instead of grepping
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11905
diff changeset
669 $ hg diff --rev 1
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
670 diff -r ef63ca68695b c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
671 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
672 +++ b/c * (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
673 @@ -0,0 +1,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
674 +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
675 +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
676 +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
677
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
678 Status after rollback:
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
679
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
680 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
681 repository tip rolled back to revision 1 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
682 working directory now based on revision 1
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
683 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
684 A c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
685 $ hg update --clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
686 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
687
16908
6a997aacba5d tests: convert some 'hghave symlink' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16810
diff changeset
688 #if symlink
6a997aacba5d tests: convert some 'hghave symlink' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16810
diff changeset
689
13069
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
690 cp symlink file; hg cp -A symlink file (part2)
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
691 - copied symlink points to kw ignored file: do not overwrite
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
692
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
693 $ cat a > i
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
694 $ ln -s i symignored
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
695 $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
696 $ cp symignored x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
697 $ hg copy --after --verbose symignored x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
698 copying symignored to x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
699 $ head -n 1 x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
700 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
701 $ hg forget x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
702 $ rm x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
703
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
704 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
705 repository tip rolled back to revision 1 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
706 working directory now based on revision 1
13069
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
707 $ hg update --clean
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
708 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
709 $ rm i symignored
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
710
16908
6a997aacba5d tests: convert some 'hghave symlink' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16810
diff changeset
711 #endif
6a997aacba5d tests: convert some 'hghave symlink' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16810
diff changeset
712
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
713 Custom keywordmaps as argument to kwdemo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
714
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
715 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
716 [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
717 keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
718 [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
719 ** =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
720 b = ignore
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
721 demo.txt =
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
722 i = ignore
13298
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
723 [keywordset]
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
724 svn = False
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
725 [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
726 Xinfo = {author}: {desc}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
727 $Xinfo: test: hg keyword configuration and expansion example $
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
728
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
729 Configure custom keywordmaps
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
730
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
731 $ cat <<EOF >>$HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
732 > [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
733 > Id = {file} {node|short} {date|rfc822date} {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
734 > Xinfo = {author}: {desc}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
735 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
736
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
737 Cat and hg cat files before custom expansion
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
738
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
739 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
740 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
741 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
742 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
743 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
744 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
745 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
746 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
747 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
748 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
749 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
750
17424
e7cfe3587ea4 fix trivial spelling errors
Mads Kiilerich <mads@kiilerich.com>
parents: 17345
diff changeset
751 Write custom keyword and prepare multi-line commit message
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
752
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
753 $ echo '$Xinfo$' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
754 $ cat <<EOF >> log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
755 > firstline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
756 > secondline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
757 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
758
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
759 Interrupted commit should not change state
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
760
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
761 $ hg commit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
762 abort: empty commit message
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
763 [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
764 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
765 M a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
766 ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
767 ? log
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
768
17424
e7cfe3587ea4 fix trivial spelling errors
Mads Kiilerich <mads@kiilerich.com>
parents: 17345
diff changeset
769 Commit with multi-line message and custom expansion
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
770
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
771 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
772 committing files:
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
773 a
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
774 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
775 committing changelog
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
776 overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
777 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
778 $ rm log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
779
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
780 Stat, verify and show custom expansion (firstline)
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
781
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
782 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
783 ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
784 $ hg verify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
785 checking changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
786 checking manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
787 crosschecking files in changesets and manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
788 checking files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
789 3 files, 3 changesets, 4 total revisions
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
790 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
791 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
792 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
793 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
794 $Xinfo: User Name <user@example.com>: firstline $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
795 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
796 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
797 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
798 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
799 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
800 $Xinfo: User Name <user@example.com>: firstline $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
801 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
802 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
803
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
804 annotate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
805
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
806 $ hg annotate a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
807 1: expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
808 1: do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
809 1: xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
810 2: $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
811
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
812 remove with status checks
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
813
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
814 $ hg debugrebuildstate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
815 $ hg remove a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
816 $ hg --debug commit -m rma
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
817 committing files:
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
818 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
819 committing changelog
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
820 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
821 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
822 ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
823
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
824 Rollback, revert, and check expansion
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
825
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
826 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
827 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
828 working directory now based on revision 2
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
829 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
830 R a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
831 ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
832 $ hg revert --no-backup --rev tip a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
833 $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
834 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
835 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
836 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
837 $Xinfo: User Name <user@example.com>: firstline $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
838
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
839 Clone to test global and local configurations
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
840
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
841 $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
842
17485
dc0d61216672 spelling: destination
timeless@mozdev.org
parents: 17345
diff changeset
843 Expansion in destination with global configuration
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
844
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
845 $ hg --quiet clone Test globalconf
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
846 $ cat globalconf/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
847 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
848 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
849 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
850 $Xinfo: User Name <user@example.com>: firstline $
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
851
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
852 No expansion in destination with local configuration in origin only
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
853
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
854 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
855 $ cat localconf/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
856 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
857 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
858 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
859 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
860
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
861 Clone to test incoming
11678
f5aa20e177c0 keyword: move collecting of [keyword] patterns to reposetup (issue2303)
Christian Ebert <blacktrash@gmx.net>
parents: 11252
diff changeset
862
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
863 $ hg clone -r1 Test Test-a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
864 adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
865 adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
866 adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
867 added 2 changesets with 3 changes to 3 files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
868 updating to branch default
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
869 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
870 $ cd Test-a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
871 $ cat <<EOF >> .hg/hgrc
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
872 > [paths]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
873 > default = ../Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
874 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
875 $ hg incoming
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
876 comparing with $TESTTMP/Test (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
877 searching for changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
878 changeset: 2:bb948857c743
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
879 tag: tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
880 user: User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
881 date: Thu Jan 01 00:00:02 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
882 summary: firstline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
883
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
884 Imported patch should not be rejected
11678
f5aa20e177c0 keyword: move collecting of [keyword] patterns to reposetup (issue2303)
Christian Ebert <blacktrash@gmx.net>
parents: 11252
diff changeset
885
15556
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
886 >>> import re
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
887 >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read())
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
888 >>> open('a', 'wb').write(text)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
889 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
890 committing files:
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
891 a
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
892 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
893 committing changelog
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
894 overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
895 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
896 $ hg export -o ../rejecttest.diff tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
897 $ cd ../Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
898 $ hg import ../rejecttest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
899 applying ../rejecttest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
900 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
901 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
902 do not process $Id: rejecttest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
903 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
904 $Xinfo: User Name <user@example.com>: rejects? $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
905 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
906
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
907 $ hg rollback
15198
62dc0e7ab092 import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 15075
diff changeset
908 repository tip rolled back to revision 2 (undo import)
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
909 working directory now based on revision 2
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
910 $ hg update --clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
911 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
912
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
913 kwexpand/kwshrink on selected files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
914
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
915 $ mkdir x
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
916 $ hg copy a x/a
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
917 $ hg --verbose kwshrink a
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
918 overwriting a shrinking keywords
15075
77325c92db95 keyword: make status test after record and kwexpand/kwshrink reliable
Christian Ebert <blacktrash@gmx.net>
parents: 15070
diff changeset
919 - sleep required for dirstate.normal() check
77325c92db95 keyword: make status test after record and kwexpand/kwshrink reliable
Christian Ebert <blacktrash@gmx.net>
parents: 15070
diff changeset
920 $ sleep 1
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
921 $ hg status a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
922 $ hg --verbose kwexpand a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
923 overwriting a expanding keywords
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
924 $ hg status a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
925
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
926 kwexpand x/a should abort
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
927
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
928 $ hg --verbose kwexpand x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
929 abort: outstanding uncommitted changes
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
930 [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
931 $ cd x
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
932 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
933 committing files:
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
934 x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
935 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
936 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23632
diff changeset
937 committing changelog
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
938 overwriting x/a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
939 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
940 $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
941 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
942 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
943 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
944 $Xinfo: User Name <user@example.com>: xa $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
945
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
946 kwshrink a inside directory x
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
947
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
948 $ hg --verbose kwshrink a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
949 overwriting x/a shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
950 $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
951 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
952 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
953 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
954 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
955 $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
956
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
957 kwexpand nonexistent
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
958
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
959 $ hg kwexpand nonexistent
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
960 nonexistent:* (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
961
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
962
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
963 #if serve
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
964 hg serve
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
965 - expand with hgweb file
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
966 - no expansion with hgweb annotate/changeset/filediff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
967 - check errors
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
968
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
969 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
970 $ cat hg.pid >> $DAEMON_PIDS
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 17015
diff changeset
971 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/a/?style=raw'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
972 200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
973
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
974 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
975 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
976 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
977 $Xinfo: User Name <user@example.com>: firstline $
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 17015
diff changeset
978 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/a/?style=raw'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
979 200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
980
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
981
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
982 user@1: expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
983 user@1: do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
984 user@1: xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
985 user@2: $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
986
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
987
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
988
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
989
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 17015
diff changeset
990 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/tip/?style=raw'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
991 200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
992
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
993
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
994 # HG changeset patch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
995 # User User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
996 # Date 3 0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
997 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
998 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
999 xa
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1001 diff -r bb948857c743 -r b4560182a3f9 x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1002 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1003 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1004 @@ -0,0 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1005 +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1006 +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1007 +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1008 +$Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1009
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 17015
diff changeset
1010 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/bb948857c743/a?style=raw'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1011 200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1012
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1013
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1014 diff -r ef63ca68695b -r bb948857c743 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1015 --- a/a Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1016 +++ b/a Thu Jan 01 00:00:02 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1017 @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1018 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1019 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1020 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1021 +$Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1022
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1023
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1024
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1025
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1026 $ cat errors.log
17099
1c55d1add24f test-keyword: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17098
diff changeset
1027 #endif
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
1028
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1029 Prepare merge and resolve tests
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
1030
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1031 $ echo '$Id$' > m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1032 $ hg add m
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17099
diff changeset
1033 $ hg commit -m 4kw
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1034 $ echo foo >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1035 $ hg commit -m 5foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1036
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1037 simplemerge
6927
959113c5e1cd keyword: thorough hgweb testing
Christian Ebert <blacktrash@gmx.net>
parents: 6867
diff changeset
1038
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1039 $ hg update 4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1040 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1041 $ echo foo >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1042 $ hg commit -m 6foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1043 created new head
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1044 $ hg merge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1045 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1046 (branch merge, don't forget to commit)
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1047 $ hg commit -m simplemerge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1048 $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1049 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1050 foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1051
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1052 conflict: keyword should stay outside conflict zone
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1053
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1054 $ hg update 4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1055 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1056 $ echo bar >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1057 $ hg commit -m 8bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1058 created new head
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1059 $ hg merge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1060 merging m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1061 warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
1062 merging m incomplete! (edit conflicts, then use 'hg resolve --mark')
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1063 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
12314
f2daa6ab514a merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Brodie Rao <brodie@bitheap.org>
parents: 12102
diff changeset
1064 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
1065 [1]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1066 $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1067 $Id$
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21519
diff changeset
1068 <<<<<<< local: 88a80c8d172e - test: 8bar
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1069 bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1070 =======
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1071 foo
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21519
diff changeset
1072 >>>>>>> other: 85d2d2d732a5 - test: simplemerge
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1073
23622
cb9d845406e5 keyword: handle resolve to either parent
Christian Ebert <blacktrash@gmx.net>
parents: 23621
diff changeset
1074 resolve to local, m must contain hash of last change (local parent)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1075
23621
bb679344c88d keyword: update test file syntax
Christian Ebert <blacktrash@gmx.net>
parents: 22589
diff changeset
1076 $ hg resolve -t internal:local -a
21947
b081decd9062 resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21789
diff changeset
1077 (no more unresolved files)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1078 $ hg commit -m localresolve
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1079 $ cat m
23622
cb9d845406e5 keyword: handle resolve to either parent
Christian Ebert <blacktrash@gmx.net>
parents: 23621
diff changeset
1080 $Id: m 88a80c8d172e Thu, 01 Jan 1970 00:00:00 +0000 test $
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1081 bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1082
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1083 Test restricted mode with transplant -b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1084
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1085 $ hg update 6
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1086 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1087 $ hg branch foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1088 marked working directory as branch foo
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15198
diff changeset
1089 (branches are permanent and global, did you want a bookmark?)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1090 $ mv a a.bak
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1091 $ echo foobranch > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1092 $ cat a.bak >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1093 $ rm a.bak
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1094 $ hg commit -m 9foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1095 $ hg update default
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1096 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1097 $ hg -y transplant -b foo tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1098 applying 4aa30d025d50
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1099 4aa30d025d50 transplanted to e00abbf63521
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1100
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1101 Expansion in changeset but not in file
6933
17bdcd59b9ad keyword: avoid additional conflicts during merge/resolve
Christian Ebert <blacktrash@gmx.net>
parents: 6927
diff changeset
1102
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1103 $ hg tip -p
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1104 changeset: 11:e00abbf63521
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1105 tag: tip
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1106 parent: 9:800511b3a22d
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1107 user: test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1108 date: Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1109 summary: 9foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1110
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1111 diff -r 800511b3a22d -r e00abbf63521 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1112 --- a/a Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1113 +++ b/a Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1114 @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1115 +foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1116 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1117 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1118 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1119
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1120 $ head -n 2 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1121 foobranch
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1122 expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1123
12495
6401e8547427 test-keyword: fix typo, rephrase
Christian Ebert <blacktrash@gmx.net>
parents: 12376
diff changeset
1124 Turn off expansion
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1125
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1126 $ hg -q rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1127 $ hg -q update -C
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1128
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1129 kwshrink with unknown file u
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1130
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1131 $ cp a u
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1132 $ hg --verbose kwshrink
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1133 overwriting a shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1134 overwriting m shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1135 overwriting x/a shrinking keywords
10117
98867145f4b5 keyword: go into restricted mode when transplanting
Christian Ebert <blacktrash@gmx.net>
parents: 9602
diff changeset
1136
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1137 Keywords shrunk in working directory, but not yet disabled
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1138 - cat shows unexpanded keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1139 - hg cat shows expanded keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1140
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1141 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1142 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1143 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1144 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1145 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1146 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1147 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1148 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1149 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1150 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1151 $Xinfo: User Name <user@example.com>: firstline $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1152 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
1153 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1154
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1155 Now disable keyword expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1156
21703
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1157 $ cp $HGRCPATH $HGRCPATH.backup
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1158 $ rm "$HGRCPATH"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1159 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1160 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1161 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1162 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1163 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1164 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1165 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1166 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1167 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1168 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1169 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1170 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
1171 a
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16908
diff changeset
1172
21703
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1173 enable keyword expansion again
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1174
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1175 $ cat $HGRCPATH.backup >> $HGRCPATH
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1176
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1177 Test restricted mode with unshelve
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1178
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1179 $ cat <<EOF >> $HGRCPATH
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1180 > [extensions]
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1181 > shelve =
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1182 > EOF
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1183
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1184 $ echo xxxx >> a
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1185 $ hg diff
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1186 diff -r 800511b3a22d a
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1187 --- a/a Thu Jan 01 00:00:00 1970 +0000
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1188 +++ b/a * (glob)
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1189 @@ -2,3 +2,4 @@
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1190 do not process $Id:
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1191 xxx $
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1192 $Xinfo$
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1193 +xxxx
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1194 $ hg shelve -q --name tmp
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1195 $ hg shelve --list --patch
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1196 tmp (*) changes to 'localresolve' (glob)
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1197
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1198 diff --git a/a b/a
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1199 --- a/a
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1200 +++ b/a
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1201 @@ -2,3 +2,4 @@
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1202 do not process $Id:
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1203 xxx $
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1204 $Xinfo$
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1205 +xxxx
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1206
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1207 $ hg update -q -C 10
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1208 $ hg unshelve -q tmp
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1209 $ hg diff
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1210 diff -r 4aa30d025d50 a
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1211 --- a/a Thu Jan 01 00:00:00 1970 +0000
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1212 +++ b/a * (glob)
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1213 @@ -3,3 +3,4 @@
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1214 do not process $Id:
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1215 xxx $
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1216 $Xinfo$
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1217 +xxxx
99f7e5fe35f2 keyword: suppress keyword expansion while 'hg unshelve' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18648
diff changeset
1218
21704
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1219 Test restricted mode with rebase
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1220
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1221 $ cat <<EOF >> $HGRCPATH
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1222 > [extensions]
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1223 > rebase =
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1224 > EOF
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1225
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1226 $ hg update -q -C 9
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1227
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1228 $ echo xxxx >> a
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1229 $ hg commit -m '#11'
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1230 $ hg diff -c 11
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1231 diff -r 800511b3a22d -r b07670694489 a
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1232 --- a/a Thu Jan 01 00:00:00 1970 +0000
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1233 +++ b/a Thu Jan 01 00:00:00 1970 +0000
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1234 @@ -2,3 +2,4 @@
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1235 do not process $Id:
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1236 xxx $
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1237 $Xinfo$
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1238 +xxxx
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1239
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1240 $ hg diff -c 10
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1241 diff -r 27d48ee14f67 -r 4aa30d025d50 a
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1242 --- a/a Thu Jan 01 00:00:00 1970 +0000
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1243 +++ b/a Thu Jan 01 00:00:00 1970 +0000
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1244 @@ -1,3 +1,4 @@
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1245 +foobranch
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1246 expand $Id$
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1247 do not process $Id:
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1248 xxx $
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1249
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1250 $ hg rebase -q -s 10 -d 11 --keep
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1251 $ hg diff -r 9 -r 12 a
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1252 diff -r 800511b3a22d -r 1939b927726c a
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1253 --- a/a Thu Jan 01 00:00:00 1970 +0000
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1254 +++ b/a Thu Jan 01 00:00:00 1970 +0000
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1255 @@ -1,4 +1,6 @@
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1256 +foobranch
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1257 expand $Id$
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1258 do not process $Id:
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1259 xxx $
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1260 $Xinfo$
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1261 +xxxx
65dd65c645ed keyword: suppress keyword expansion while 'hg rebase' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21703
diff changeset
1262
21705
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1263 Test restricted mode with graft
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1264
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1265 $ hg graft -q 10
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1266 $ hg diff -r 9 -r 13 a
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1267 diff -r 800511b3a22d -r 01a68de1003a a
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1268 --- a/a Thu Jan 01 00:00:00 1970 +0000
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1269 +++ b/a Thu Jan 01 00:00:00 1970 +0000
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1270 @@ -1,4 +1,6 @@
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1271 +foobranch
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1272 expand $Id$
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1273 do not process $Id:
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1274 xxx $
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1275 $Xinfo$
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1276 +xxxx
dd5ca1a32109 keyword: suppress keyword expansion while 'hg graft' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21704
diff changeset
1277
21706
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1278 Test restricted mode with backout
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1279
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1280 $ hg backout -q 11
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1281 $ hg diff a
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1282 diff -r 01a68de1003a a
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1283 --- a/a Thu Jan 01 00:00:00 1970 +0000
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1284 +++ b/a * (glob)
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1285 @@ -3,4 +3,3 @@
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1286 do not process $Id:
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1287 xxx $
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1288 $Xinfo$
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1289 -xxxx
5c64c338fa9f keyword: suppress keyword expansion while 'hg backout' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21705
diff changeset
1290
21707
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1291 Test restricted mode with histedit
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1292
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1293 $ cat <<EOF >> $HGRCPATH
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1294 > [extensions]
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1295 > histedit =
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1296 > EOF
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1297
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1298 $ hg commit -m 'backout #11'
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1299 $ hg histedit -q --command - 13 <<EOF
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1300 > pick 49f5f2d940c3 14 backout #11
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1301 > pick 01a68de1003a 13 9foobranch
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1302 > EOF
e22cfd1ae97c keyword: suppress keyword expansion while 'hg histedit' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21706
diff changeset
1303
21708
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1304 Test restricted mode with fetch (with merge)
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1305
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1306 $ cat <<EOF >> $HGRCPATH
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1307 > [extensions]
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1308 > fetch =
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1309 > EOF
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1310
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1311 $ hg clone -q -r 9 . ../fetch-merge
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1312 $ cd ../fetch-merge
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1313 $ hg -R ../Test export 10 | hg import -q -
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1314 $ hg fetch -q -r 11
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1315 $ hg diff -r 9 a
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1316 diff -r 800511b3a22d a
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1317 --- a/a Thu Jan 01 00:00:00 1970 +0000
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1318 +++ b/a * (glob)
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1319 @@ -1,4 +1,6 @@
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1320 +foobranch
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1321 expand $Id$
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1322 do not process $Id:
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1323 xxx $
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1324 $Xinfo$
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1325 +xxxx
2668a78df8ba keyword: suppress keyword expansion while 'hg fetch' for internal merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21707
diff changeset
1326
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16908
diff changeset
1327 $ cd ..