tests/test-keyword
branchstable
changeset 392 45a318c5ea20
parent 384 482c91f8c230
child 409 6e2293f7b9f7
equal deleted inserted replaced
391:d3f114c111ff 392:45a318c5ea20
    28 cd Test-bndl
    28 cd Test-bndl
    29 
    29 
    30 echo % kwshrink should exit silently in empty/invalid repo
    30 echo % kwshrink should exit silently in empty/invalid repo
    31 hg kwshrink
    31 hg kwshrink
    32 
    32 
       
    33 # Symlinks cannot be created on Windows. The bundle was made with:
       
    34 #
       
    35 # hg init t
       
    36 # cd t
       
    37 # echo a > a
       
    38 # ln -s a sym
       
    39 # hg add sym
       
    40 # hg ci -m addsym -u mercurial
       
    41 # hg bundle --base null ../test-keyword.hg
       
    42 #
       
    43 hg pull -u "$TESTDIR/test-keyword.hg" \
       
    44     | sed 's/pulling from.*test-keyword.hg/pulling from test-keyword.hg/'
       
    45 
    33 echo 'expand $Id$' > a
    46 echo 'expand $Id$' > a
    34 echo 'do not process $Id:' >> a
    47 echo 'do not process $Id:' >> a
    35 echo 'xxx $' >> a
    48 echo 'xxx $' >> a
    36 echo 'ignore $Id$' > b
    49 echo 'ignore $Id$' > b
    37 ln -s a sym
    50 echo % cat
    38 echo % cat
    51 cat a b
    39 cat sym a b
       
    40 
    52 
    41 echo % addremove
    53 echo % addremove
    42 hg addremove
    54 hg addremove
    43 echo % status
    55 echo % status
    44 hg status
    56 hg status
    54 echo % status
    66 echo % status
    55 hg status
    67 hg status
    56 echo % identify
    68 echo % identify
    57 hg --quiet identify
    69 hg --quiet identify
    58 echo % cat
    70 echo % cat
    59 cat sym a b
    71 cat a b
    60 echo % hg cat
    72 echo % hg cat
    61 hg cat sym a b
    73 hg cat sym a b
    62 
    74 
    63 echo
    75 echo
    64 echo % diff a hooktest
    76 echo % diff a hooktest
    86 
    98 
    87 rm sym a b
    99 rm sym a b
    88 echo % update
   100 echo % update
    89 hg update
   101 hg update
    90 echo % cat
   102 echo % cat
    91 cat sym a b
   103 cat a b
    92 
   104 
    93 echo % check whether expansion is filewise
   105 echo % check whether expansion is filewise
    94 echo '$Id$' > c
   106 echo '$Id$' > c
    95 echo 'tests for different changenodes' >> c
   107 echo 'tests for different changenodes' >> c
    96 echo % commit c
   108 echo % commit c
   135 
   147 
   136 echo % kwfiles
   148 echo % kwfiles
   137 hg kwfiles
   149 hg kwfiles
   138 
   150 
   139 echo % diff --rev
   151 echo % diff --rev
   140 hg diff --rev 0 | grep -v 'b/c'
   152 hg diff --rev 1 | grep -v 'b/c'
   141 
   153 
   142 echo % rollback
   154 echo % rollback
   143 hg rollback
   155 hg rollback
   144 echo % status
   156 echo % status
   145 hg status
   157 hg status
   155 Id = {file} {node|short} {date|rfc822date} {author|user}
   167 Id = {file} {node|short} {date|rfc822date} {author|user}
   156 Xinfo = {author}: {desc}
   168 Xinfo = {author}: {desc}
   157 EOF
   169 EOF
   158 
   170 
   159 echo % cat
   171 echo % cat
   160 cat sym a b
   172 cat a b
   161 echo % hg cat
   173 echo % hg cat
   162 hg cat sym a b
   174 hg cat sym a b
   163 
   175 
   164 echo
   176 echo
   165 echo '$Xinfo$' >> a
   177 echo '$Xinfo$' >> a
   178 rm log
   190 rm log
   179 echo % status
   191 echo % status
   180 hg status
   192 hg status
   181 
   193 
   182 echo % cat
   194 echo % cat
   183 cat sym a b
   195 cat a b
   184 echo % hg cat
   196 echo % hg cat
   185 hg cat sym a b
   197 hg cat sym a b
   186 echo
   198 echo
   187 
   199 
   188 echo % remove
   200 echo % remove
   199 echo % cat a
   211 echo % cat a
   200 cat a
   212 cat a
   201 
   213 
   202 echo % clone to test incoming
   214 echo % clone to test incoming
   203 cd ..
   215 cd ..
   204 hg clone -r0 Test Test-a
   216 hg clone -r1 Test Test-a
   205 cd Test-a
   217 cd Test-a
   206 cat <<EOF >> .hg/hgrc
   218 cat <<EOF >> .hg/hgrc
   207 [paths]
   219 [paths]
   208 default = ../Test
   220 default = ../Test
   209 EOF
   221 EOF
   220 
   232 
   221 cd ../Test
   233 cd ../Test
   222 echo % import
   234 echo % import
   223 hg import ../rejecttest.diff
   235 hg import ../rejecttest.diff
   224 echo % cat
   236 echo % cat
   225 cat sym a b
   237 cat a b
   226 echo
   238 echo
   227 echo % rollback
   239 echo % rollback
   228 hg rollback
   240 hg rollback
   229 echo % clean update
   241 echo % clean update
   230 hg update --clean
   242 hg update --clean
   246 echo % cat a
   258 echo % cat a
   247 cat a
   259 cat a
   248 cd ..
   260 cd ..
   249 
   261 
   250 echo % kwexpand nonexistent
   262 echo % kwexpand nonexistent
   251 hg kwexpand nonexistent
   263 hg kwexpand nonexistent 2>&1 | sed 's/nonexistent:.*/nonexistent:/'
   252 
   264 
   253 echo % switch off expansion
   265 echo % switch off expansion
   254 echo % kwshrink with unknown file u
   266 echo % kwshrink with unknown file u
   255 cp a u
   267 cp a u
   256 hg --verbose kwshrink
   268 hg --verbose kwshrink
   257 echo % cat
   269 echo % cat
   258 cat sym a b
   270 cat a b
   259 echo % hg cat
   271 echo % hg cat
   260 hg cat sym a b
   272 hg cat sym a b
   261 echo
   273 echo
   262 rm $HGRCPATH
   274 rm $HGRCPATH
   263 echo % cat
   275 echo % cat
   264 cat sym a b
   276 cat a b
   265 echo % hg cat
   277 echo % hg cat
   266 hg cat sym a b
   278 hg cat sym a b
   267 echo
   279 echo