tests/test-keyword.t
author Matt Mackall <mpm@selenic.com>
Sun, 15 Aug 2010 13:26:12 -0500
changeset 11905 0b84864d1325
parent 11678 tests/test-keyword@f5aa20e177c0
child 12102 9aba4ceb654d
permissions -rw-r--r--
tests: drop big sed from test-keyword.t
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
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    29
  \$Author: test \$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    30
  \$Date: ..../../.. ..:..:.. \$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    31
  \$Header: .*/demo.txt,v ............ ..../../.. ..:..:.. test \$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    32
  \$Id: demo.txt,v ............ ..../../.. ..:..:.. test \$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    33
  \$RCSFile: demo.txt,v \$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    34
  \$RCSfile: demo.txt,v \$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    35
  \$Revision: ............ \$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    36
  \$Source: .*/demo.txt,v \$
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
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    51
  > [hooks]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    52
  > commit=
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    53
  > commit.test=cp a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    54
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    55
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    56
  $ hg init Test-bndl
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    57
  $ cd Test-bndl
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    58
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    59
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
    60
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    61
  $ hg kwshrink
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
    62
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    63
Symlinks cannot be created on Windows.
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    64
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
    65
 hg init t
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    66
 cd t
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    67
 echo a > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    68
 ln -s a sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    69
 hg add sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    70
 hg ci -m addsym -u mercurial
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    71
 hg bundle --base null ../test-keyword.hg
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    72
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    73
  $ hg pull -u "$TESTDIR"/test-keyword.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    74
  pulling from .*test-keyword.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    75
  requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    76
  adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    77
  adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    78
  adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    79
  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
    80
  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
    81
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    82
  $ echo 'expand $Id$' > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    83
  $ echo 'do not process $Id:' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    84
  $ echo 'xxx $' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    85
  $ echo 'ignore $Id$' > b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    86
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    87
Output files as they were created
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    88
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    89
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    90
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    91
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    92
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    93
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    94
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    95
no kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    96
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
    97
  $ hg kwfiles
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
untracked candidates
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 -v kwfiles --unknown
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   102
  k a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   103
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   104
Add files and check status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   105
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   106
  $ hg addremove
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   107
  adding a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   108
  adding b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   109
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   110
  A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   111
  A b
6061
de08788511d7 test-keyword: make it run under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 6051
diff changeset
   112
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   113
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   114
Default keyword expansion including commit hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   115
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
   116
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   117
  $ hg --debug commit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   118
  abort: empty commit message
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   119
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   120
  A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   121
  A b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   122
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   123
Commit with several checks
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   124
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   125
  $ 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
   126
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   127
  b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   128
  overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   129
  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
   130
  committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   131
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   132
  ? hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   133
  $ hg debugrebuildstate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   134
  $ hg --quiet identify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   135
  ef63ca68695b
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   136
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   137
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
   138
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   139
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   140
  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
   141
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   142
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   143
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   144
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   145
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
   146
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   147
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   148
  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
   149
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   150
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   151
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   152
  a.*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   153
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   154
Test hook execution
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   155
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   156
  $ diff a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   157
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   158
Removing commit hook from config
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   159
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   160
  $ sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nohook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   161
  $ mv "$HGRCPATH".nohook "$HGRCPATH"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   162
  $ rm hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   163
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   164
bundle
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
  $ hg bundle --base null ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   167
  2 changesets found
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   168
  $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   169
  $ hg init Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   170
  $ cd Test
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   171
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   172
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
   173
ie. if patch.diff wrapper acts as it should
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   174
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   175
  $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   176
  > [hooks]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   177
  > incoming.notify = python:hgext.notify.hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   178
  > [notify]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   179
  > sources = pull
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   180
  > diffstat = False
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   181
  > [reposubs]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   182
  > * = Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   183
  > EOF
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   184
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   185
Pull from bundle and trigger notify
6051
1038b1458d7a keyword: safeguards against erroneous behaviour or aborts
Christian Ebert <blacktrash@gmx.net>
parents: 5894
diff changeset
   186
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   187
  $ hg pull -u ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   188
  pulling from ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   189
  requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   190
  adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   191
  adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   192
  adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   193
  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
   194
  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
   195
  MIME-Version: 1.0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   196
  Content-Transfer-Encoding: 7bit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   197
  Date: .*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   198
  Subject: changeset in .*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   199
  From: mercurial
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   200
  X-Hg-Notification: changeset a2392c293916
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   201
  Message-Id: <hg.a2392c293916.*>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   202
  To: Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   203
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   204
  changeset a2392c293916 in .*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   205
  details: .*?cmd=changeset;node=a2392c293916
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   206
  description:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   207
  	addsym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   208
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   209
  diffs (6 lines):
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   210
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   211
  diff -r 000000000000 -r a2392c293916 sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   212
  --- /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
   213
  +++ 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
   214
  @@ -0,0 +1,1 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   215
  +a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   216
  \ No newline at end of file
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   217
  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
   218
  MIME-Version: 1.0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   219
  Content-Transfer-Encoding: 7bit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   220
  Date:.*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   221
  Subject: changeset in.*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   222
  From: User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   223
  X-Hg-Notification: changeset ef63ca68695b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   224
  Message-Id: <hg.ef63ca68695b.*>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   225
  To: Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   226
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   227
  changeset ef63ca68695b in .*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   228
  details: .*?cmd=changeset;node=ef63ca68695b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   229
  description:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   230
  	absym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   231
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   232
  diffs (12 lines):
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   233
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   234
  diff -r a2392c293916 -r ef63ca68695b a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   235
  --- /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
   236
  +++ 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
   237
  @@ -0,0 +1,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   238
  +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   239
  +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   240
  +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   241
  diff -r a2392c293916 -r ef63ca68695b b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   242
  --- /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
   243
  +++ 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
   244
  @@ -0,0 +1,1 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   245
  +ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   246
  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
   247
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   248
Remove notify config
6116
e27f39865d7e keyword: add test for patch.diff monkey
Christian Ebert <blacktrash@gmx.net>
parents: 6061
diff changeset
   249
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   250
  $ sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nonotify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   251
  $ mv "$HGRCPATH".nonotify "$HGRCPATH"
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
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   294
record chunk
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   295
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   296
  $ python -c \
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   297
  > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   298
  $ hg record -d '1 10' -m rectest<<EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   299
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   300
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   301
  > n
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   302
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   303
  diff --git a/a b/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   304
  2 hunks, 2 lines changed
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   305
  examine changes to 'a'? [Ynsfdaq?] 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   306
  @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   307
   expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   308
  +foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   309
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   310
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   311
  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
   312
  @@ -2,2 +3,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   313
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   314
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   315
  +bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   316
  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
   317
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   318
  $ hg identify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   319
  d17e03c92c97+ tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   320
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   321
  M a
5894
e181665c1c79 keyword: add very simple mq test
Christian Ebert <blacktrash@gmx.net>
parents: 5856
diff changeset
   322
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   323
Cat modified file a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   324
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   325
  $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   326
  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
   327
  foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   328
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   329
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   330
  bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   331
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   332
Diff remaining chunk
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   333
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   334
  $ hg diff | grep -v 'b/a'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   335
  diff -r d17e03c92c97 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   336
  --- a/a	Wed Dec 31 23:59:51 1969 -0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   337
  @@ -2,3 +2,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   338
   foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   339
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   340
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   341
  +bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   342
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   343
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   344
  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
   345
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   346
Record all chunks in file a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   347
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   348
  $ echo foo > msg
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
 - 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
   351
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   352
  $ hg record -l msg -d '1 11'<<EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   353
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   354
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   355
  > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   356
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   357
  diff --git a/a b/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   358
  2 hunks, 2 lines changed
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   359
  examine changes to 'a'? [Ynsfdaq?] 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   360
  @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   361
   expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   362
  +foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   363
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   364
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   365
  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
   366
  @@ -2,2 +3,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   367
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   368
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   369
  +bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   370
  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
   371
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   372
File a should be clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   373
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   374
  $ hg status -A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   375
  C a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   376
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   377
  $ rm msg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   378
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   379
  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
   380
  $ hg update -C
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   381
  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
   382
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   383
Test patch queue repo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   384
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   385
  $ hg init --mq
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   386
  $ 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
   387
  $ hg commit --mq -m mqtest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   388
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   389
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
   390
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   391
  $ cat .hg/patches/mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   392
  # HG changeset patch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   393
  # User User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   394
  # Date 1 0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   395
  # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   396
  # Parent  ef63ca68695bc9495032c6fda1350c71e6d256e9
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   397
  cndiff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   398
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   399
  diff -r ef63ca68695b -r 40a904bbbe4c c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   400
  --- /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
   401
  +++ 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
   402
  @@ -0,0 +1,2 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   403
  +$Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   404
  +tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   405
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   406
  $ hg qpop
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   407
  popping mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   408
  patch queue now empty
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   409
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   410
qgoto, implying qpush, should expand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   411
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   412
  $ hg qgoto mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   413
  applying mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   414
  now at: mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   415
  $ cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   416
  $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
   417
  tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   418
  $ hg cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   419
  $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
   420
  tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   421
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   422
Keywords should not be expanded in filelog
11046
6e9b9f6c117c keyword: test recording
Christian Ebert <blacktrash@gmx.net>
parents: 11044
diff changeset
   423
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   424
  $ hg --config 'extensions.keyword=!' cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   425
  $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   426
  tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   427
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   428
qpop and move on
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   429
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   430
  $ hg qpop
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   431
  popping mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   432
  patch queue now empty
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   433
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   434
Copy and show added kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   435
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   436
  $ hg cp a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   437
  $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   438
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   439
  c
5856
85888efbdfff keyword: test that expansion is done filewise
Christian Ebert <blacktrash@gmx.net>
parents: 5855
diff changeset
   440
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   441
Commit and show expansion in original and copy
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   442
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   443
  $ 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
   444
  c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   445
   c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   446
  overwriting c expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   447
  committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   448
  $ cat a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   449
  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
   450
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   451
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   452
  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
   453
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   454
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   455
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   456
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
   457
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   458
  $ touch c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   459
  $ hg status
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   460
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   461
Test different options of hg kwfiles
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 kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   464
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   465
  c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   466
  $ hg -v kwfiles --ignore
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   467
  I b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   468
  I sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   469
  $ hg kwfiles --all
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   470
  K a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   471
  K c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   472
  I b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   473
  I sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   474
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   475
Diff specific revision
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   476
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   477
  $ hg diff --rev 1 | grep -v 'b/c'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   478
  diff -r ef63ca68695b c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   479
  --- /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
   480
  @@ -0,0 +1,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   481
  +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   482
  +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   483
  +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   484
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   485
Status after rollback:
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   486
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   487
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   488
  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
   489
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   490
  A c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   491
  $ hg update --clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   492
  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
   493
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   494
Custom keywordmaps as argument to kwdemo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   495
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   496
  $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   497
  [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   498
  keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   499
  [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   500
  ** = 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   501
  b = ignore
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   502
  demo.txt = 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   503
  [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   504
  Xinfo = {author}: {desc}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   505
  $Xinfo: test: hg keyword configuration and expansion example $
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   506
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   507
Configure custom keywordmaps
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   508
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   509
  $ cat <<EOF >>$HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   510
  > [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   511
  > 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
   512
  > Xinfo = {author}: {desc}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   513
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   514
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   515
Cat and hg cat files before custom expansion
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   516
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   517
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   518
  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
   519
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   520
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   521
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   522
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   523
  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
   524
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   525
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   526
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   527
  a.*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   528
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   529
Write custom keyword and prepare multiline commit message
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   530
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   531
  $ echo '$Xinfo$' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   532
  $ cat <<EOF >> log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   533
  > firstline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   534
  > secondline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   535
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   536
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   537
Interrupted commit should not change state
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   538
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   539
  $ hg commit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   540
  abort: empty commit message
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   541
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   542
  M a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   543
  ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   544
  ? log
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   545
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   546
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
   547
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   548
  $ 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
   549
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   550
  overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   551
  committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   552
  $ rm log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   553
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   554
Stat, verify and show custom expansion (firstline)
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   555
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   556
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   557
  ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   558
  $ hg verify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   559
  checking changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   560
  checking manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   561
  crosschecking files in changesets and manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   562
  checking files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   563
  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
   564
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   565
  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
   566
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   567
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   568
  $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
   569
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   570
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   571
  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
   572
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   573
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   574
  $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
   575
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   576
  a.*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   577
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   578
annotate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   579
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   580
  $ hg annotate a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   581
  1: expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   582
  1: do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   583
  1: xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   584
  2: $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   585
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   586
remove with status checks
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   587
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   588
  $ hg debugrebuildstate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   589
  $ hg remove a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   590
  $ hg --debug commit -m rma
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   591
  committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   592
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   593
  ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   594
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   595
Rollback, revert, and check expansion
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   596
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   597
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   598
  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
   599
  $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   600
  R a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   601
  ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   602
  $ 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
   603
  $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   604
  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
   605
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   606
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   607
  $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
   608
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   609
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
   610
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   611
  $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   612
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   613
Expansion in destinaton with global configuration
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   614
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   615
  $ hg --quiet clone Test globalconf
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   616
  $ cat globalconf/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   617
  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
   618
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   619
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   620
  $Xinfo: User Name <user@example.com>: firstline $
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   621
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   622
No expansion in destination with local configuration in origin only
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   623
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   624
  $ 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
   625
  $ cat localconf/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   626
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   627
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   628
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   629
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   630
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   631
Clone to test incoming
11678
f5aa20e177c0 keyword: move collecting of [keyword] patterns to reposetup (issue2303)
Christian Ebert <blacktrash@gmx.net>
parents: 11252
diff changeset
   632
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   633
  $ hg clone -r1 Test Test-a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   634
  requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   635
  adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   636
  adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   637
  adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   638
  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
   639
  updating to branch default
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   640
  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
   641
  $ cd Test-a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   642
  $ cat <<EOF >> .hg/hgrc
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   643
  > [paths]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   644
  > default = ../Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   645
  > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   646
  $ hg incoming
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   647
  comparing with .*test-keyword.t/Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   648
  searching for changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   649
  changeset:   2:bb948857c743
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   650
  tag:         tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   651
  user:        User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   652
  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
   653
  summary:     firstline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   654
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   655
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
   656
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   657
  $ sed -e 's/Id.*/& rejecttest/' a > a.new
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   658
  $ mv a.new a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   659
  $ 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
   660
  a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   661
  overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   662
  committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   663
  $ hg export -o ../rejecttest.diff tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   664
  $ cd ../Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   665
  $ hg import ../rejecttest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   666
  applying ../rejecttest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   667
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   668
  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
   669
  do not process $Id: rejecttest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   670
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   671
  $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
   672
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   673
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   674
  $ hg rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   675
  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
   676
  $ hg update --clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   677
  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
   678
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   679
kwexpand/kwshrink on selected files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   680
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   681
  $ mkdir x
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   682
  $ hg copy a x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   683
  $ hg --verbose kwexpand a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   684
  overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   685
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   686
kwexpand x/a should abort
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   687
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   688
  $ hg --verbose kwexpand x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   689
  abort: outstanding uncommitted changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   690
  $ cd x
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   691
  $ 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
   692
  x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   693
   x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   694
  overwriting x/a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   695
  committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   696
  $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   697
  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
   698
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   699
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   700
  $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
   701
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   702
kwshrink a inside directory x
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   703
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   704
  $ hg --verbose kwshrink a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   705
  overwriting x/a shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   706
  $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   707
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   708
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   709
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   710
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   711
  $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   712
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   713
kwexpand nonexistent
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   714
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   715
  $ hg kwexpand nonexistent
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   716
  nonexistent:.*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   717
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   718
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   719
hg serve
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   720
 - expand with hgweb file
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   721
 - 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
   722
 - check errors
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   723
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   724
  $ 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
   725
  $ cat hg.pid >> $DAEMON_PIDS
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   726
  $ $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
   727
  200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   728
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   729
  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
   730
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   731
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   732
  $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
   733
  $ $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
   734
  200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   735
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   736
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   737
  user@1: expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   738
  user@1: do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   739
  user@1: xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   740
  user@2: $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   741
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   742
  
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
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   745
  $ $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
   746
  200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   747
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   748
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   749
  # HG changeset patch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   750
  # User User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   751
  # Date 3 0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   752
  # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   753
  # Parent  bb948857c743469b22bbf51f7ec8112279ca5d83
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   754
  xa
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   755
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   756
  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
   757
  --- /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
   758
  +++ 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
   759
  @@ -0,0 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   760
  +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   761
  +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   762
  +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   763
  +$Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   764
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   765
  $ $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
   766
  200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   767
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   768
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   769
  diff -r ef63ca68695b -r bb948857c743 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   770
  --- 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
   771
  +++ 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
   772
  @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   773
   expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   774
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   775
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   776
  +$Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   777
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   778
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   779
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   780
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   781
  $ cat errors.log
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   782
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   783
Prepare merge and resolve tests
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   784
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   785
  $ echo '$Id$' > m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   786
  $ hg add m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   787
  $ hg commit -m 4kw 
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   788
  $ echo foo >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   789
  $ hg commit -m 5foo
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
simplemerge
6927
959113c5e1cd keyword: thorough hgweb testing
Christian Ebert <blacktrash@gmx.net>
parents: 6867
diff changeset
   792
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   793
  $ hg update 4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   794
  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
   795
  $ echo foo >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   796
  $ hg commit -m 6foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   797
  created new head
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   798
  $ hg merge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   799
  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
   800
  (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
   801
  $ hg commit -m simplemerge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   802
  $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   803
  $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
   804
  foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   805
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   806
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
   807
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   808
  $ hg update 4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   809
  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
   810
  $ echo bar >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   811
  $ hg commit -m 8bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   812
  created new head
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   813
  $ hg merge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   814
  merging m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   815
  warning: conflicts during merge.
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   816
  merging m failed!
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   817
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   818
  use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   819
  $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   820
  $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   821
  <<<<<<< local
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   822
  bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   823
  =======
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   824
  foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   825
  >>>>>>> other
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   826
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   827
resolve to local
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   828
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   829
  $ HGMERGE=internal:local hg resolve -a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   830
  $ hg commit -m localresolve
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   831
  $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   832
  $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
   833
  bar
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
Test restricted mode with transplant -b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   836
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   837
  $ hg update 6
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   838
  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
   839
  $ hg branch foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   840
  marked working directory as branch foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   841
  $ mv a a.bak
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   842
  $ echo foobranch > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   843
  $ cat a.bak >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   844
  $ rm a.bak
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   845
  $ hg commit -m 9foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   846
  $ hg update default
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   847
  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
   848
  $ hg -y transplant -b foo tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   849
  applying 4aa30d025d50
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   850
  4aa30d025d50 transplanted to 5a4da427c162
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   851
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   852
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
   853
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   854
  $ hg tip -p
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   855
  changeset:   11:5a4da427c162
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   856
  tag:         tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   857
  parent:      9:41efa6d38e9b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   858
  user:        test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   859
  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
   860
  summary:     9foobranch
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
  diff -r 41efa6d38e9b -r 5a4da427c162 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   863
  --- 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
   864
  +++ 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
   865
  @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   866
  +foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   867
   expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   868
   do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   869
   xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   870
  
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   871
  $ head -n 2 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   872
  foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   873
  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
   874
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   875
Switch of expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   876
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   877
  $ hg -q rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   878
  $ hg -q update -C
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   879
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   880
kwshrink with unknown file u
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
  $ cp a u
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   883
  $ hg --verbose kwshrink
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   884
  overwriting a shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   885
  overwriting m shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   886
  overwriting x/a shrinking keywords
10117
98867145f4b5 keyword: go into restricted mode when transplanting
Christian Ebert <blacktrash@gmx.net>
parents: 9602
diff changeset
   887
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   888
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
   889
 - cat shows unexpanded keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   890
 - hg cat shows expanded keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   891
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   892
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   893
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   894
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   895
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   896
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   897
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   898
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   899
  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
   900
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   901
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   902
  $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
   903
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   904
  a.*
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   906
Now disable keyword expansion
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
  $ rm "$HGRCPATH"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   909
  $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   910
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   911
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   912
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   913
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   914
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   915
  $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   916
  expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   917
  do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   918
  xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   919
  $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   920
  ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
   921
  a.*