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