tests/test-tag.t
author Jeremy Whitlock <jcscoobyrs@gmail.com>
Wed, 28 Jul 2010 23:05:03 -0600
changeset 11969 52ec5c813723
parent 11788 b3de1438028d
child 12156 4c94b6d0fb1c
permissions -rw-r--r--
color: enable branches support This commit updates the branches command to use ui.label for the branch names and the changeset. This implementation allows assigning colors to the four states of a branch: active, closed, current and inactive. While you can configure color for the four states, only current and closed have default colors of green and black bold respectively.
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
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     6
  $ hg commit -m "test" -d "1000000 0"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     7
  $ hg history
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
     8
  changeset:   0:0acdaf898367
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
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    11
  date:        Mon Jan 12 13:46:40 1970 +0000
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
8417
39cf453da958 clone: try updating to the actual changeset specified in options
Brett Carter <brett@rdnzl.net>
parents: 6321
diff changeset
    17
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    18
  $ hg tag -d "1000000 0" "bleah"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    19
  $ hg history
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    20
  changeset:   1:3ecf002a1c57
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    21
  tag:         tip
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    22
  user:        test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    23
  date:        Mon Jan 12 13:46:40 1970 +0000
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    24
  summary:     Added tag bleah for changeset 0acdaf898367
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    25
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    26
  changeset:   0:0acdaf898367
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    27
  tag:         bleah
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    28
  user:        test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    29
  date:        Mon Jan 12 13:46:40 1970 +0000
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    30
  summary:     test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    31
  
11692
52e4ac3e63f7 tag: do not allow tag names to consist solely of whitespace (issue2307)
Benjamin Pollack <benjamin@bitquabit.com>
parents: 11185
diff changeset
    32
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    33
  $ echo foo >> .hgtags
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    34
  $ hg tag -d "1000000 0" "bleah2" || echo "failed"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    35
  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
    36
  failed
401
af4848f83e68 From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
mpm@selenic.com
parents:
diff changeset
    37
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    38
  $ hg revert .hgtags
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    39
  $ hg tag -d "1000000 0" -r 0 x y z y y z || echo "failed"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    40
  abort: tag names must be unique
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    41
  failed
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    42
  $ hg tag -d "1000000 0" tap nada dot tip null . || echo "failed"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    43
  abort: the name 'tip' is reserved
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    44
  failed
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    45
  $ hg tag -d "1000000 0" "bleah" || echo "failed"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    46
  abort: tag 'bleah' already exists (use -f to force)
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    47
  failed
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    48
  $ hg tag -d "1000000 0" "blecch" "bleah" || echo "failed"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    49
  abort: tag 'bleah' already exists (use -f to force)
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    50
  failed
6321
55ba3bc5b8fd tag: allow multiple tags to be added or removed
John Coomes <john.coomes@sun.com>
parents: 4933
diff changeset
    51
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    52
  $ hg tag -d "1000000 0" --remove "blecch" || echo "failed"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    53
  abort: tag 'blecch' does not exist
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    54
  failed
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    55
  $ hg tag -d "1000000 0" --remove "bleah" "blecch" "blough" || echo "failed"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    56
  abort: tag 'blecch' does not exist
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    57
  failed
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    58
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    59
  $ hg tag -d "1000000 0" -r 0 "bleah0"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    60
  $ hg tag -l -d "1000000 0" -r 1 "bleah1"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    61
  $ hg tag -d "1000000 0" gack gawk gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    62
  $ hg tag -d "1000000 0" -f gack
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    63
  $ hg tag -d "1000000 0" --remove gack gorp
6321
55ba3bc5b8fd tag: allow multiple tags to be added or removed
John Coomes <john.coomes@sun.com>
parents: 4933
diff changeset
    64
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    65
  $ cat .hgtags
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    66
  0acdaf8983679e0aac16e811534eb49d7ee1f2b4 bleah
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    67
  0acdaf8983679e0aac16e811534eb49d7ee1f2b4 bleah0
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    68
  868cc8fbb43b754ad09fa109885d243fc49adae7 gack
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    69
  868cc8fbb43b754ad09fa109885d243fc49adae7 gawk
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    70
  868cc8fbb43b754ad09fa109885d243fc49adae7 gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    71
  868cc8fbb43b754ad09fa109885d243fc49adae7 gack
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    72
  3807bcf62c5614cb6c16436b514d7764ca5f1631 gack
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    73
  3807bcf62c5614cb6c16436b514d7764ca5f1631 gack
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    74
  0000000000000000000000000000000000000000 gack
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    75
  868cc8fbb43b754ad09fa109885d243fc49adae7 gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    76
  0000000000000000000000000000000000000000 gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    77
  $ cat .hg/localtags
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    78
  3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1
1596
41366b7d6709 fix 'hg tag <tagname> <revision>
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1561
diff changeset
    79
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    80
  $ hg update 0
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    81
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    82
  $ hg tag -d "1000000 0" "foobar"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    83
  $ cat .hgtags
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    84
  0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    85
  $ cat .hg/localtags
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    86
  3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1
1596
41366b7d6709 fix 'hg tag <tagname> <revision>
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1561
diff changeset
    87
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    88
  $ hg tag -l 'xx
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    89
  > newline'
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    90
  abort: '\n' cannot be used in a tag name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    91
  $ hg tag -l 'xx:xx'
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    92
  abort: ':' cannot be used in a tag name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    93
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    94
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
    95
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    96
  $ cd ..
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    97
  $ hg -R test log -r0:5
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    98
  changeset:   0:0acdaf898367
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    99
  tag:         bleah
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   100
  tag:         bleah0
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   101
  tag:         foobar
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   102
  user:        test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   103
  date:        Mon Jan 12 13:46:40 1970 +0000
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   104
  summary:     test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   105
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   106
  changeset:   1:3ecf002a1c57
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   107
  tag:         bleah1
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   108
  user:        test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   109
  date:        Mon Jan 12 13:46:40 1970 +0000
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   110
  summary:     Added tag bleah for changeset 0acdaf898367
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   111
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   112
  changeset:   2:868cc8fbb43b
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   113
  tag:         gawk
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   114
  user:        test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   115
  date:        Mon Jan 12 13:46:40 1970 +0000
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   116
  summary:     Added tag bleah0 for changeset 0acdaf898367
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   117
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   118
  changeset:   3:3807bcf62c56
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   119
  user:        test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   120
  date:        Mon Jan 12 13:46:40 1970 +0000
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   121
  summary:     Added tag gack, gawk, gorp for changeset 868cc8fbb43b
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   122
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   123
  changeset:   4:140c6e8597b4
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   124
  user:        test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   125
  date:        Mon Jan 12 13:46:40 1970 +0000
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   126
  summary:     Added tag gack for changeset 3807bcf62c56
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   127
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   128
  changeset:   5:470a65fa7cc9
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   129
  user:        test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   130
  date:        Mon Jan 12 13:46:40 1970 +0000
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   131
  summary:     Removed tag gack, gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   132
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   133
  $ hg clone -q -rbleah1 test test1
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   134
  $ hg -R test1 parents --style=compact
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   135
  1[tip]   3ecf002a1c57   1970-01-12 13:46 +0000   test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   136
    Added tag bleah for changeset 0acdaf898367
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   137
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   138
  $ hg clone -q -r5 test#bleah1 test2
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   139
  $ hg -R test2 parents --style=compact
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   140
  5[tip]   470a65fa7cc9   1970-01-12 13:46 +0000   test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   141
    Removed tag gack, gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   142
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   143
  $ hg clone -q -U test#bleah1 test3
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   144
  $ 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
   145
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   146
  $ cd test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   147
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   148
issue 601
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   149
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   150
  $ python << EOF
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   151
  > 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
   152
  > 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
   153
  > EOF
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   154
  $ cat .hg/localtags; echo
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   155
  3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   156
  $ hg tag -l localnewline
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   157
  $ cat .hg/localtags; echo
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   158
  3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   159
  f68b039e72eacbb2e68b0543e1f6e50990aa2bb5 localnewline
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   160
  
11063
eb23c876c111 tag: warn users about tag/branch possible name conflicts
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8417
diff changeset
   161
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   162
  $ python << EOF
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   163
  > 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
   164
  > f = file('.hgtags', 'w'); f.write(last); f.close()
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   165
  > EOF
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   166
  $ hg ci -d '1000000 0' -m'broken manual edit of .hgtags'
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   167
  $ cat .hgtags; echo
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   168
  0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   169
  $ hg tag -d '1000000 0' newline
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   170
  $ cat .hgtags; echo
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   171
  0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   172
  6ae703d793c8b1f097116869275ecd97b2977a2b newline
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   173
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   174
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   175
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
   176
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   177
  $ hg branch tag-and-branch-same-name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   178
  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
   179
  $ hg ci -m"discouraged"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   180
  $ hg tag tag-and-branch-same-name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   181
  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
   182
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   183
test custom commit messages
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   184
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   185
  $ cat > $HGTMP/editor <<'__EOF__'
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   186
  > #!/bin/sh
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   187
  > echo "custom tag message" > "$1"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   188
  > echo "second line" >> "$1"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   189
  > __EOF__
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   190
  $ chmod +x "$HGTMP"/editor
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   191
  $ HGEDITOR="'$HGTMP'"/editor hg tag custom-tag -e
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   192
  $ hg log -l1 --template "{desc}\n"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   193
  custom tag message
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   194
  second line