tests/test-keyword.t
author Kevin Bullock <kbullock@ringworld.org>
Wed, 20 Oct 2010 17:38:21 -0500
branchstable
changeset 12847 b00eda50ad2b
parent 12844 a1b49b9a0328
child 13069 6aff4f144ad3
permissions -rw-r--r--
pull: silence spurious 'requesting all changes' message When issuing `hg pull -r REV` in a repo with no common ancestor with the remote repo, the message 'requesting all changes' is printed, even though only the changese that are ancestors of REV are actually requested. This can be confusing for users (see http://www.selenic.com/pipermail/mercurial/2010-October/035508.html). This silences the message if (and only if) the '-r' option was passed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    12
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
    13
as it would succeed without uisetup otherwise
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    14
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    15
  $ hg --quiet kwdemo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    16
  [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    17
  keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    18
  [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    19
  demo.txt = 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    20
  [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    21
  Author = {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    22
  Date = {date|utcdate}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    23
  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
    24
  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
    25
  RCSFile = {file|basename},v
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    26
  RCSfile = {file|basename},v
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    27
  Revision = {node|short}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    28
  Source = {root}/{file},v
12372
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
    29
  $Author: test $
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
    30
  $Date: ????/??/?? ??:??:?? $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
    31
  $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
    32
  $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
12372
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
    33
  $RCSFile: demo.txt,v $
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
    34
  $RCSfile: demo.txt,v $
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
    35
  $Revision: ???????????? $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
    36
  $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
    37
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    38
  $ hg --quiet kwdemo "Branch = {branches}"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    39
  [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    40
  keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    41
  [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    42
  demo.txt = 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    43
  [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    44
  Branch = {branches}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    45
  $Branch: demobranch $
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
    46
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    47
  $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    48
  > [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    49
  > ** =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    50
  > b = ignore
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
    51
  > i = ignore
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    52
  > [hooks]
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
    53
  > EOF
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
    54
  $ cp $HGRCPATH $HGRCPATH.nohooks
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
    55
  > cat <<EOF >> $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    56
  > commit=
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    57
  > commit.test=cp a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    58
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    59
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    60
  $ hg init Test-bndl
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    61
  $ cd Test-bndl
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    62
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    63
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
    64
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    65
  $ hg kwshrink
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
    66
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    67
Symlinks cannot be created on Windows.
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    68
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
    69
 hg init t
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    70
 cd t
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    71
 echo a > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    72
 ln -s a sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    73
 hg add sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    74
 hg ci -m addsym -u mercurial
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    75
 hg bundle --base null ../test-keyword.hg
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    76
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    77
  $ hg pull -u "$TESTDIR"/test-keyword.hg
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
    78
  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
    79
  requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    80
  adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    81
  adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    82
  adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    83
  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
    84
  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
    85
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    86
  $ echo 'expand $Id$' > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    87
  $ echo 'do not process $Id:' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    88
  $ echo 'xxx $' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    89
  $ echo 'ignore $Id$' > b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    90
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    91
Output files as they were created
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
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    94
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    95
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    96
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    97
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    98
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    99
no kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   100
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   101
  $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   102
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   103
untracked candidates
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   104
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   105
  $ hg -v kwfiles --unknown
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   106
  k a
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
Add files and check status
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
  $ hg addremove
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   111
  adding a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   112
  adding b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   113
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   114
  A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   115
  A b
6061
de08788511d7 test-keyword: make it run under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 6051
diff changeset
   116
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   117
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   118
Default keyword expansion including commit hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   119
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
   120
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   121
  $ hg --debug commit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   122
  abort: empty commit message
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
   123
  [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   124
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   125
  A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   126
  A b
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
Commit with several checks
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   129
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   130
  $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   131
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   132
  b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   133
  overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   134
  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
   135
  committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   136
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   137
  ? hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   138
  $ hg debugrebuildstate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   139
  $ hg --quiet identify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   140
  ef63ca68695b
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   141
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   142
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
   143
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   144
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   145
  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
   146
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   147
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   148
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   149
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   150
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
   151
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   152
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   153
  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
   154
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   155
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   156
  ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
   157
  a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   158
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   159
Test hook execution
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   160
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   161
  $ diff a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   162
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
   163
  $ cp $HGRCPATH.nohooks $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   164
  $ rm hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   165
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   166
bundle
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   167
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   168
  $ hg bundle --base null ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   169
  2 changesets found
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   170
  $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   171
  $ hg init Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   172
  $ cd Test
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   173
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   174
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
   175
ie. if patch.diff wrapper acts as it should
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   176
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   177
  $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   178
  > [hooks]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   179
  > incoming.notify = python:hgext.notify.hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   180
  > [notify]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   181
  > sources = pull
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   182
  > diffstat = False
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
   183
  > maxsubject = 15
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   184
  > [reposubs]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   185
  > * = Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   186
  > EOF
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   187
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   188
Pull from bundle and trigger notify
6051
1038b1458d7a keyword: safeguards against erroneous behaviour or aborts
Christian Ebert <blacktrash@gmx.net>
parents: 5894
diff changeset
   189
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   190
  $ hg pull -u ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   191
  pulling from ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   192
  requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   193
  adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   194
  adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   195
  adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   196
  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
   197
  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
   198
  MIME-Version: 1.0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   199
  Content-Transfer-Encoding: 7bit
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   200
  Date: * (glob)
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
   201
  Subject: changeset in...
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   202
  From: mercurial
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   203
  X-Hg-Notification: changeset a2392c293916
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   204
  Message-Id: <hg.a2392c293916*> (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   205
  To: Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   206
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
   207
  changeset a2392c293916 in $TESTTMP/Test
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   208
  details: *cmd=changeset;node=a2392c293916 (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   209
  description:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   210
  	addsym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   211
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   212
  diffs (6 lines):
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   213
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   214
  diff -r 000000000000 -r a2392c293916 sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   215
  --- /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
   216
  +++ 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
   217
  @@ -0,0 +1,1 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   218
  +a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   219
  \ No newline at end of file
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   220
  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
   221
  MIME-Version: 1.0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   222
  Content-Transfer-Encoding: 7bit
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   223
  Date:* (glob)
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
   224
  Subject: changeset in...
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   225
  From: User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   226
  X-Hg-Notification: changeset ef63ca68695b
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   227
  Message-Id: <hg.ef63ca68695b*> (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   228
  To: Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   229
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
   230
  changeset ef63ca68695b in $TESTTMP/Test
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
   231
  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
   232
  description:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   233
  	absym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   234
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   235
  diffs (12 lines):
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   236
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   237
  diff -r a2392c293916 -r ef63ca68695b a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   238
  --- /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
   239
  +++ 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
   240
  @@ -0,0 +1,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   241
  +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   242
  +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   243
  +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   244
  diff -r a2392c293916 -r ef63ca68695b b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   245
  --- /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
   246
  +++ 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
   247
  @@ -0,0 +1,1 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   248
  +ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   249
  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
   250
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
   251
  $ cp $HGRCPATH.nohooks $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   252
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   253
Touch files and check with status
6116
e27f39865d7e keyword: add test for patch.diff monkey
Christian Ebert <blacktrash@gmx.net>
parents: 6061
diff changeset
   254
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   255
  $ touch a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   256
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   257
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   258
Update and expand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   259
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   260
  $ rm sym a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   261
  $ hg update -C
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   262
  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
   263
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   264
  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
   265
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   266
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   267
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   268
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   269
Check whether expansion is filewise
6051
1038b1458d7a keyword: safeguards against erroneous behaviour or aborts
Christian Ebert <blacktrash@gmx.net>
parents: 5894
diff changeset
   270
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   271
  $ echo '$Id$' > c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   272
  $ echo 'tests for different changenodes' >> c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   273
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   274
commit file c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   275
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   276
  $ 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
   277
  adding c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   278
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   279
force expansion
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
  $ hg -v kwexpand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   282
  overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   283
  overwriting c expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   284
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   285
compare changenodes in a and c
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   286
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   287
  $ cat a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   288
  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
   289
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   290
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   291
  $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
   292
  tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   293
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   294
record
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   295
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   296
  $ echo '$Id$' > r
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   297
  $ hg add r
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   298
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   299
record chunk
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   300
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   301
  $ python -c \
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   302
  > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   303
  $ hg record -d '1 10' -m rectest a<<EOF
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   304
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   305
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   306
  > n
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   307
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   308
  diff --git a/a b/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   309
  2 hunks, 2 lines changed
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   310
  examine changes to 'a'? [Ynsfdaq?] 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   311
  @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   312
   expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   313
  +foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   314
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   315
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   316
  record change 1/2 to 'a'? [Ynsfdaq?] 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   317
  @@ -2,2 +3,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   318
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   319
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   320
  +bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   321
  record change 2/2 to 'a'? [Ynsfdaq?] 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   322
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   323
  $ hg identify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   324
  d17e03c92c97+ tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   325
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   326
  M a
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   327
  A r
5894
e181665c1c79 keyword: add very simple mq test
Christian Ebert <blacktrash@gmx.net>
parents: 5856
diff changeset
   328
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   329
Cat modified file a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   330
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   331
  $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   332
  expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   333
  foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   334
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   335
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   336
  bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   337
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   338
Diff remaining chunk
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   339
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   340
  $ hg diff a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   341
  diff -r d17e03c92c97 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   342
  --- a/a	Wed Dec 31 23:59:51 1969 -0000
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   343
  +++ b/a	* (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   344
  @@ -2,3 +2,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   345
   foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   346
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   347
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   348
  +bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   349
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   350
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   351
  rolling back to revision 2 (undo commit)
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   352
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   353
Record all chunks in file a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   354
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   355
  $ echo foo > msg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   356
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   357
 - 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
   358
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   359
  $ hg record -l msg -d '1 11' a<<EOF
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   360
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   361
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   362
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   363
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   364
  diff --git a/a b/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   365
  2 hunks, 2 lines changed
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   366
  examine changes to 'a'? [Ynsfdaq?] 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   367
  @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   368
   expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   369
  +foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   370
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   371
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   372
  record change 1/2 to 'a'? [Ynsfdaq?] 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   373
  @@ -2,2 +3,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   374
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   375
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   376
  +bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   377
  record change 2/2 to 'a'? [Ynsfdaq?] 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   378
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   379
File a should be clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   380
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   381
  $ hg status -A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   382
  C a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   383
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   384
rollback and revert expansion
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   385
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   386
  $ cat a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   387
  expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   388
  foo
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   389
  do not process $Id:
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   390
  xxx $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   391
  bar
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   392
  $ hg --verbose rollback
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   393
  rolling back to revision 2 (undo commit)
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   394
  overwriting a expanding keywords
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   395
  $ hg status a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   396
  M a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   397
  $ cat a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   398
  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
   399
  foo
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   400
  do not process $Id:
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   401
  xxx $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   402
  bar
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   403
  $ echo '$Id$' > y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   404
  $ echo '$Id$' > z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   405
  $ hg add y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   406
  $ 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
   407
  $ cat z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   408
  $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
   409
  $ hg --verbose rollback
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   410
  rolling back to revision 2 (undo commit)
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   411
  overwriting z shrinking keywords
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   412
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   413
Only z should be overwritten
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   414
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   415
  $ hg status a y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   416
  M a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   417
  A y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   418
  A z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   419
  $ cat z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   420
  $Id$
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   421
  $ hg forget y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   422
  $ rm y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
   423
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   424
record added file alone
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   425
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   426
  $ hg -v record -l msg -d '1 12' r<<EOF
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   427
  > y
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   428
  > EOF
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   429
  diff --git a/r b/r
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   430
  new file mode 100644
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   431
  examine changes to 'r'? [Ynsfdaq?] 
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   432
  r
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   433
  committed changeset 3:899491280810
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   434
  overwriting r expanding keywords
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   435
  $ hg --verbose rollback
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   436
  rolling back to revision 2 (undo commit)
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   437
  overwriting r shrinking keywords
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   438
  $ hg forget r
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
   439
  $ rm msg r
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   440
  $ hg update -C
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
   441
  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
   442
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   443
record added keyword ignored file
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   444
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   445
  $ echo '$Id$' > i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   446
  $ hg add i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   447
  $ hg --verbose record -d '1 13' -m recignored<<EOF
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   448
  > y
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   449
  > EOF
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   450
  diff --git a/i b/i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   451
  new file mode 100644
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   452
  examine changes to 'i'? [Ynsfdaq?] 
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   453
  i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   454
  committed changeset 3:5f40fe93bbdc
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   455
  $ cat i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   456
  $Id$
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   457
  $ hg -q rollback
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   458
  $ hg forget i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   459
  $ rm i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   460
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   461
Test patch queue repo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   462
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   463
  $ hg init --mq
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   464
  $ 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
   465
  $ hg commit --mq -m mqtest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   466
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   467
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
   468
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   469
  $ cat .hg/patches/mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   470
  # HG changeset patch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   471
  # User User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   472
  # Date 1 0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   473
  # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   474
  # Parent  ef63ca68695bc9495032c6fda1350c71e6d256e9
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   475
  cndiff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   476
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   477
  diff -r ef63ca68695b -r 40a904bbbe4c c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   478
  --- /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
   479
  +++ 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
   480
  @@ -0,0 +1,2 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   481
  +$Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   482
  +tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   483
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   484
  $ hg qpop
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   485
  popping mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   486
  patch queue now empty
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   487
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   488
qgoto, implying qpush, should expand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   489
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   490
  $ hg qgoto mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   491
  applying mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   492
  now at: mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   493
  $ cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   494
  $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
   495
  tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   496
  $ hg cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   497
  $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
   498
  tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   499
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   500
Keywords should not be expanded in filelog
11046
6e9b9f6c117c keyword: test recording
Christian Ebert <blacktrash@gmx.net>
parents: 11044
diff changeset
   501
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   502
  $ hg --config 'extensions.keyword=!' cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   503
  $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   504
  tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   505
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   506
qpop and move on
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   507
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   508
  $ hg qpop
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   509
  popping mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   510
  patch queue now empty
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   511
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   512
Copy and show added kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   513
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   514
  $ hg cp a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   515
  $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   516
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   517
  c
5856
85888efbdfff keyword: test that expansion is done filewise
Christian Ebert <blacktrash@gmx.net>
parents: 5855
diff changeset
   518
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   519
Commit and show expansion in original and copy
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   520
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   521
  $ hg --debug commit -ma2c -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
   522
  c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   523
   c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   524
  overwriting c expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   525
  committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   526
  $ cat a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   527
  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
   528
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   529
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   530
  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
   531
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   532
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   533
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   534
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
   535
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   536
  $ touch c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   537
  $ hg status
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   538
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   539
Copy kwfile to keyword ignored file unexpanding keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   540
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   541
  $ hg --verbose copy a i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   542
  copying a to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   543
  overwriting i shrinking keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   544
  $ head -n 1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   545
  expand $Id$
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   546
  $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   547
  $ rm i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   548
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   549
Copy ignored file to ignored file: no overwriting
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   550
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   551
  $ hg --verbose copy b i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   552
  copying b to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   553
  $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   554
  $ rm i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   555
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   556
cp symlink (becomes regular file), and hg copy after
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   557
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   558
  $ cp sym i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   559
  $ ls -l i
12647
60c7ae35fcbe test-keyword: fix test glob to ACL/SELinux flag
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   560
  -rw-r--r--* (glob)
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   561
  $ head -1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   562
  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
   563
  $ hg copy --after --verbose sym i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   564
  copying sym to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   565
  overwriting i shrinking keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   566
  $ head -1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   567
  expand $Id$
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   568
  $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   569
  $ rm i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   570
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   571
Test different options of hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   572
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   573
  $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   574
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   575
  c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   576
  $ hg -v kwfiles --ignore
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   577
  I b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   578
  I sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   579
  $ hg kwfiles --all
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   580
  K a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   581
  K c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   582
  I b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   583
  I sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   584
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   585
Diff specific revision
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   586
12102
9aba4ceb654d test-keyword: use regular expressions instead of grepping
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11905
diff changeset
   587
  $ hg diff --rev 1
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   588
  diff -r ef63ca68695b c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   589
  --- /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
   590
  +++ b/c	* (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   591
  @@ -0,0 +1,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   592
  +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   593
  +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   594
  +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   595
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   596
Status after rollback:
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   597
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   598
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   599
  rolling back to revision 1 (undo commit)
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   600
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   601
  A c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   602
  $ hg update --clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   603
  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
   604
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   605
Custom keywordmaps as argument to kwdemo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   606
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   607
  $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   608
  [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   609
  keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   610
  [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   611
  ** = 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   612
  b = ignore
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   613
  demo.txt = 
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
   614
  i = ignore
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   615
  [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   616
  Xinfo = {author}: {desc}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   617
  $Xinfo: test: hg keyword configuration and expansion example $
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   618
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   619
Configure custom keywordmaps
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   620
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   621
  $ cat <<EOF >>$HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   622
  > [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   623
  > 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
   624
  > Xinfo = {author}: {desc}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   625
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   626
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   627
Cat and hg cat files before custom expansion
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   628
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   629
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   630
  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
   631
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   632
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   633
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   634
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   635
  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
   636
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   637
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   638
  ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
   639
  a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   640
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   641
Write custom keyword and prepare multiline commit message
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   642
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   643
  $ echo '$Xinfo$' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   644
  $ cat <<EOF >> log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   645
  > firstline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   646
  > secondline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   647
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   648
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   649
Interrupted commit should not change state
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   650
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   651
  $ hg commit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   652
  abort: empty commit message
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
   653
  [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   654
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   655
  M a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   656
  ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   657
  ? log
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   658
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   659
Commit with multiline message and custom expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   660
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   661
  $ hg --debug commit -l log -d '2 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
   662
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   663
  overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   664
  committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   665
  $ rm log
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
Stat, verify and show custom expansion (firstline)
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   668
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   669
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   670
  ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   671
  $ hg verify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   672
  checking changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   673
  checking manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   674
  crosschecking files in changesets and manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   675
  checking files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   676
  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
   677
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   678
  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
   679
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   680
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   681
  $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
   682
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   683
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   684
  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
   685
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   686
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   687
  $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
   688
  ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
   689
  a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   690
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   691
annotate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   692
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   693
  $ hg annotate a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   694
  1: expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   695
  1: do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   696
  1: xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   697
  2: $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   698
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   699
remove with status checks
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   700
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   701
  $ hg debugrebuildstate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   702
  $ hg remove a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   703
  $ hg --debug commit -m rma
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   704
  committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   705
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   706
  ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   707
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   708
Rollback, revert, and check expansion
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   709
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   710
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   711
  rolling back to revision 2 (undo commit)
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   712
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   713
  R a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   714
  ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   715
  $ 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
   716
  $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   717
  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
   718
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   719
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   720
  $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
   721
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   722
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
   723
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   724
  $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   725
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   726
Expansion in destinaton with global configuration
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   727
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   728
  $ hg --quiet clone Test globalconf
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   729
  $ cat globalconf/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   730
  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
   731
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   732
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   733
  $Xinfo: User Name <user@example.com>: firstline $
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   734
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   735
No expansion in destination with local configuration in origin only
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   736
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   737
  $ 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
   738
  $ cat localconf/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   739
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   740
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   741
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   742
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   743
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   744
Clone to test incoming
11678
f5aa20e177c0 keyword: move collecting of [keyword] patterns to reposetup (issue2303)
Christian Ebert <blacktrash@gmx.net>
parents: 11252
diff changeset
   745
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   746
  $ hg clone -r1 Test Test-a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   747
  adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   748
  adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   749
  adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   750
  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
   751
  updating to branch default
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   752
  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
   753
  $ cd Test-a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   754
  $ cat <<EOF >> .hg/hgrc
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   755
  > [paths]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   756
  > default = ../Test
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
  $ hg incoming
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
   759
  comparing with $TESTTMP/Test
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   760
  searching for changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   761
  changeset:   2:bb948857c743
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   762
  tag:         tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   763
  user:        User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   764
  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
   765
  summary:     firstline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   766
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   767
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
   768
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
   769
  $ python -c \
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
   770
  > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   771
  $ hg --debug commit -m'rejects?' -d '3 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
   772
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   773
  overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   774
  committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   775
  $ hg export -o ../rejecttest.diff tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   776
  $ cd ../Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   777
  $ hg import ../rejecttest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   778
  applying ../rejecttest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   779
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   780
  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
   781
  do not process $Id: rejecttest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   782
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   783
  $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
   784
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   785
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   786
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   787
  rolling back to revision 2 (undo commit)
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   788
  $ hg update --clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   789
  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
   790
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   791
kwexpand/kwshrink on selected files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   792
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   793
  $ mkdir x
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   794
  $ hg copy a x/a
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   795
  $ hg --verbose kwshrink a
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   796
  overwriting a shrinking keywords
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   797
  $ hg status a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   798
  $ hg --verbose kwexpand a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   799
  overwriting a expanding keywords
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
   800
  $ hg status a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   801
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   802
kwexpand x/a should abort
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   803
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   804
  $ hg --verbose kwexpand x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   805
  abort: outstanding uncommitted changes
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
   806
  [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   807
  $ cd x
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   808
  $ hg --debug commit -m xa -d '3 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
   809
  x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   810
   x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   811
  overwriting x/a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   812
  committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   813
  $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   814
  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
   815
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   816
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   817
  $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
   818
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   819
kwshrink a inside directory x
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   820
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   821
  $ hg --verbose kwshrink a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   822
  overwriting x/a shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   823
  $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   824
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   825
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   826
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   827
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   828
  $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   829
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   830
kwexpand nonexistent
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   831
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   832
  $ hg kwexpand nonexistent
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   833
  nonexistent:* (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   834
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   835
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   836
hg serve
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   837
 - expand with hgweb file
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   838
 - 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
   839
 - check errors
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   840
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   841
  $ 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
   842
  $ cat hg.pid >> $DAEMON_PIDS
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   843
  $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   844
  200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   845
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   846
  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
   847
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   848
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   849
  $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
   850
  $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   851
  200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   852
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   853
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   854
  user@1: expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   855
  user@1: do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   856
  user@1: xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   857
  user@2: $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   858
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   859
  
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
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   862
  $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   863
  200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   864
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   865
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   866
  # HG changeset patch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   867
  # User User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   868
  # Date 3 0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   869
  # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   870
  # Parent  bb948857c743469b22bbf51f7ec8112279ca5d83
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   871
  xa
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   872
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   873
  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
   874
  --- /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
   875
  +++ 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
   876
  @@ -0,0 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   877
  +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   878
  +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   879
  +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   880
  +$Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   881
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   882
  $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   883
  200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   884
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   885
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   886
  diff -r ef63ca68695b -r bb948857c743 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   887
  --- 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
   888
  +++ 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
   889
  @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   890
   expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   891
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   892
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   893
  +$Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   894
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   895
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   896
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   897
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   898
  $ cat errors.log
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   899
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   900
Prepare merge and resolve tests
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   901
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   902
  $ echo '$Id$' > m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   903
  $ hg add m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   904
  $ hg commit -m 4kw 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   905
  $ echo foo >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   906
  $ hg commit -m 5foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   907
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   908
simplemerge
6927
959113c5e1cd keyword: thorough hgweb testing
Christian Ebert <blacktrash@gmx.net>
parents: 6867
diff changeset
   909
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   910
  $ hg update 4
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
  $ echo foo >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   913
  $ hg commit -m 6foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   914
  created new head
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   915
  $ hg merge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   916
  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
   917
  (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
   918
  $ hg commit -m simplemerge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   919
  $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   920
  $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
   921
  foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   922
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   923
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
   924
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   925
  $ hg update 4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   926
  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
   927
  $ echo bar >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   928
  $ hg commit -m 8bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   929
  created new head
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   930
  $ hg merge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   931
  merging m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   932
  warning: conflicts during merge.
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   933
  merging m failed!
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   934
  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
   935
  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
   936
  [1]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   937
  $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   938
  $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   939
  <<<<<<< local
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   940
  bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   941
  =======
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   942
  foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   943
  >>>>>>> other
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   944
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   945
resolve to local
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   946
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   947
  $ HGMERGE=internal:local hg resolve -a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   948
  $ hg commit -m localresolve
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   949
  $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   950
  $Id: m 41efa6d38e9b 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
   951
  bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   952
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   953
Test restricted mode with transplant -b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   954
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   955
  $ hg update 6
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   956
  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
   957
  $ hg branch foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   958
  marked working directory as branch foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   959
  $ mv a a.bak
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   960
  $ echo foobranch > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   961
  $ cat a.bak >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   962
  $ rm a.bak
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   963
  $ hg commit -m 9foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   964
  $ hg update default
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   965
  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
   966
  $ hg -y transplant -b foo tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   967
  applying 4aa30d025d50
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   968
  4aa30d025d50 transplanted to 5a4da427c162
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   969
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   970
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
   971
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   972
  $ hg tip -p
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   973
  changeset:   11:5a4da427c162
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   974
  tag:         tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   975
  parent:      9:41efa6d38e9b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   976
  user:        test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   977
  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
   978
  summary:     9foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   979
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   980
  diff -r 41efa6d38e9b -r 5a4da427c162 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   981
  --- 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
   982
  +++ 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
   983
  @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   984
  +foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   985
   expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   986
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   987
   xxx $
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
  $ head -n 2 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   990
  foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   991
  expand $Id: a 5a4da427c162 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
   992
12495
6401e8547427 test-keyword: fix typo, rephrase
Christian Ebert <blacktrash@gmx.net>
parents: 12376
diff changeset
   993
Turn off expansion
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   994
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   995
  $ hg -q rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   996
  $ hg -q update -C
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   997
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   998
kwshrink with unknown file u
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   999
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1000
  $ cp a u
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1001
  $ hg --verbose kwshrink
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1002
  overwriting a shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1003
  overwriting m shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1004
  overwriting x/a shrinking keywords
10117
98867145f4b5 keyword: go into restricted mode when transplanting
Christian Ebert <blacktrash@gmx.net>
parents: 9602
diff changeset
  1005
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1006
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
  1007
 - cat shows unexpanded keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1008
 - hg cat shows expanded keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1009
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1010
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1011
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1012
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1013
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1014
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1015
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1016
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1017
  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
  1018
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1019
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1020
  $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
  1021
  ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
  1022
  a
11905
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
Now disable keyword expansion
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
  $ rm "$HGRCPATH"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1027
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1028
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1029
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1030
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1031
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1032
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1033
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1034
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1035
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1036
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1037
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
  1038
  ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
  1039
  a