tests/test-tag.t
author Christoph Mewes <christoph@webvariants.de>
Wed, 22 Sep 2010 01:04:25 +0200
changeset 12552 e91302597078
parent 12316 4134686b83e1
child 12365 22f3353bcc36
permissions -rw-r--r--
i18n-de: more inotify
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     1
  $ hg init test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     2
  $ cd test
401
af4848f83e68 From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
mpm@selenic.com
parents:
diff changeset
     3
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     4
  $ echo a > a
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     5
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
     6
  $ hg commit -m "test"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     7
  $ hg history
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
     8
  changeset:   0:acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     9
  tag:         tip
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    10
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    11
  date:        Thu Jan 01 00:00:00 1970 +0000
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    12
  summary:     test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    13
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    14
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    15
  $ hg tag ' '
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    16
  abort: tag names cannot consist entirely of whitespace
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    17
  [255]
8417
39cf453da958 clone: try updating to the actual changeset specified in options
Brett Carter <brett@rdnzl.net>
parents: 6321
diff changeset
    18
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    19
  $ hg tag "bleah"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    20
  $ hg history
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    21
  changeset:   1:d4f0d2909abc
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    22
  tag:         tip
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    23
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    24
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    25
  summary:     Added tag bleah for changeset acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    26
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    27
  changeset:   0:acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    28
  tag:         bleah
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    29
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    30
  date:        Thu Jan 01 00:00:00 1970 +0000
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    31
  summary:     test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    32
  
11692
52e4ac3e63f7 tag: do not allow tag names to consist solely of whitespace (issue2307)
Benjamin Pollack <benjamin@bitquabit.com>
parents: 11185
diff changeset
    33
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    34
  $ echo foo >> .hgtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    35
  $ hg tag "bleah2" || echo "failed"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    36
  abort: working copy of .hgtags is changed (please commit .hgtags manually)
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    37
  failed
401
af4848f83e68 From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
mpm@selenic.com
parents:
diff changeset
    38
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    39
  $ hg revert .hgtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    40
  $ hg tag -r 0 x y z y y z || echo "failed"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    41
  abort: tag names must be unique
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    42
  failed
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    43
  $ hg tag tap nada dot tip null . || echo "failed"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    44
  abort: the name 'tip' is reserved
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    45
  failed
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    46
  $ hg tag "bleah" || echo "failed"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    47
  abort: tag 'bleah' already exists (use -f to force)
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    48
  failed
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    49
  $ hg tag "blecch" "bleah" || echo "failed"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    50
  abort: tag 'bleah' already exists (use -f to force)
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    51
  failed
6321
55ba3bc5b8fd tag: allow multiple tags to be added or removed
John Coomes <john.coomes@sun.com>
parents: 4933
diff changeset
    52
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    53
  $ hg tag --remove "blecch" || echo "failed"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    54
  abort: tag 'blecch' does not exist
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    55
  failed
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    56
  $ hg tag --remove "bleah" "blecch" "blough" || echo "failed"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    57
  abort: tag 'blecch' does not exist
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    58
  failed
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    59
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    60
  $ hg tag -r 0 "bleah0"
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    61
  $ hg tag -l -r 1 "bleah1"
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    62
  $ hg tag gack gawk gorp
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    63
  $ hg tag -f gack
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    64
  $ hg tag --remove gack gorp
6321
55ba3bc5b8fd tag: allow multiple tags to be added or removed
John Coomes <john.coomes@sun.com>
parents: 4933
diff changeset
    65
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    66
  $ cat .hgtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    67
  acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    68
  acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    69
  336fccc858a4eb69609a291105009e484a6b6b8d gack
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    70
  336fccc858a4eb69609a291105009e484a6b6b8d gawk
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    71
  336fccc858a4eb69609a291105009e484a6b6b8d gorp
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    72
  336fccc858a4eb69609a291105009e484a6b6b8d gack
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    73
  799667b6f2d9b957f73fa644a918c2df22bab58f gack
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    74
  799667b6f2d9b957f73fa644a918c2df22bab58f gack
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    75
  0000000000000000000000000000000000000000 gack
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    76
  336fccc858a4eb69609a291105009e484a6b6b8d gorp
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    77
  0000000000000000000000000000000000000000 gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    78
  $ cat .hg/localtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    79
  d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
1596
41366b7d6709 fix 'hg tag <tagname> <revision>
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1561
diff changeset
    80
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    81
  $ hg update 0
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    82
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    83
  $ hg tag "foobar"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    84
  $ cat .hgtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    85
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    86
  $ cat .hg/localtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    87
  d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
1596
41366b7d6709 fix 'hg tag <tagname> <revision>
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1561
diff changeset
    88
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    89
  $ hg tag -l 'xx
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    90
  > newline'
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    91
  abort: '\n' cannot be used in a tag name
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    92
  [255]
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    93
  $ hg tag -l 'xx:xx'
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    94
  abort: ':' cannot be used in a tag name
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    95
  [255]
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    96
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    97
cloning local tags
2647
46182568b4ce change 'hg tag' to tag the parent rev instead of tip
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1933
diff changeset
    98
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    99
  $ cd ..
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   100
  $ hg -R test log -r0:5
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   101
  changeset:   0:acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   102
  tag:         bleah
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   103
  tag:         bleah0
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   104
  tag:         foobar
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   105
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   106
  date:        Thu Jan 01 00:00:00 1970 +0000
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   107
  summary:     test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   108
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   109
  changeset:   1:d4f0d2909abc
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   110
  tag:         bleah1
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   111
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   112
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   113
  summary:     Added tag bleah for changeset acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   114
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   115
  changeset:   2:336fccc858a4
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   116
  tag:         gawk
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   117
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   118
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   119
  summary:     Added tag bleah0 for changeset acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   120
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   121
  changeset:   3:799667b6f2d9
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   122
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   123
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   124
  summary:     Added tag gack, gawk, gorp for changeset 336fccc858a4
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   125
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   126
  changeset:   4:154eeb7c0138
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   127
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   128
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   129
  summary:     Added tag gack for changeset 799667b6f2d9
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   130
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   131
  changeset:   5:b4bb47aaff09
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   132
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   133
  date:        Thu Jan 01 00:00:00 1970 +0000
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   134
  summary:     Removed tag gack, gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   135
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   136
  $ hg clone -q -rbleah1 test test1
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   137
  $ hg -R test1 parents --style=compact
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   138
  1[tip]   d4f0d2909abc   1970-01-01 00:00 +0000   test
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   139
    Added tag bleah for changeset acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   140
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   141
  $ hg clone -q -r5 test#bleah1 test2
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   142
  $ hg -R test2 parents --style=compact
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   143
  5[tip]   b4bb47aaff09   1970-01-01 00:00 +0000   test
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   144
    Removed tag gack, gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   145
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   146
  $ hg clone -q -U test#bleah1 test3
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   147
  $ hg -R test3 parents --style=compact
4892
d69b1fb111b9 tag: handle .hgtags and .hg/localtags with missing final newline (issue 601)
Bryan O'Sullivan <bos@serpentine.com>
parents: 2647
diff changeset
   148
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   149
  $ cd test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   150
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   151
issue 601
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   152
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   153
  $ python << EOF
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   154
  > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close()
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   155
  > f = file('.hg/localtags', 'w'); f.write(last); f.close()
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   156
  > EOF
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   157
  $ cat .hg/localtags; echo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   158
  d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   159
  $ hg tag -l localnewline
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   160
  $ cat .hg/localtags; echo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   161
  d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   162
  c2899151f4e76890c602a2597a650a72666681bf localnewline
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   163
  
11063
eb23c876c111 tag: warn users about tag/branch possible name conflicts
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8417
diff changeset
   164
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   165
  $ python << EOF
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   166
  > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   167
  > f = file('.hgtags', 'w'); f.write(last); f.close()
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   168
  > EOF
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   169
  $ hg ci -m'broken manual edit of .hgtags'
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   170
  $ cat .hgtags; echo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   171
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   172
  $ hg tag newline
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   173
  $ cat .hgtags; echo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   174
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   175
  a0eea09de1eeec777b46f2085260a373b2fbc293 newline
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   176
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   177
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   178
tag and branch using same name
11185
6d7cf82453be tag: add -e/--edit option for modifying the commit message
Steve Losh <steve@stevelosh.com>
parents: 11063
diff changeset
   179
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   180
  $ hg branch tag-and-branch-same-name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   181
  marked working directory as branch tag-and-branch-same-name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   182
  $ hg ci -m"discouraged"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   183
  $ hg tag tag-and-branch-same-name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   184
  warning: tag tag-and-branch-same-name conflicts with existing branch name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   185
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   186
test custom commit messages
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   187
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   188
  $ cat > $HGTMP/editor <<'__EOF__'
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   189
  > #!/bin/sh
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   190
  > echo "custom tag message" > "$1"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   191
  > echo "second line" >> "$1"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   192
  > __EOF__
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   193
  $ chmod +x "$HGTMP"/editor
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   194
  $ HGEDITOR="'$HGTMP'"/editor hg tag custom-tag -e
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   195
  $ hg log -l1 --template "{desc}\n"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   196
  custom tag message
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   197
  second line