tests/test-tag.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Thu, 05 May 2022 15:38:29 +0100
changeset 49174 3f86ee422095
parent 46417 768056549737
child 50087 4fc6b423fa97
permissions -rw-r--r--
censor: make rhg fall back to python when encountering a censored node This is to make it support censor.policy=ignore without having to duplicate that logic. Also, change the censor test in such a way that it uses rhg now, because extensions are disabled except when we call [hg censor]. Differential Revision: https://phab.mercurial-scm.org/D12607
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
     1
  $ cat >> $HGRCPATH << EOF
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
     2
  > [experimental]
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
     3
  > hook-track-tags=1
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
     4
  > [hooks]
32019
bca8ad5c1256 test-tag: make hook runnable on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31996
diff changeset
     5
  > txnclose.track-tag=sh ${TESTTMP}/taghook.sh
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
     6
  > EOF
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
     7
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
     8
  $ cat << EOF > taghook.sh
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
     9
  > #!/bin/sh
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    10
  > # escape the "$" otherwise the test runner interpret it when writting the
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    11
  > # file...
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    12
  > if [ -n "\$HG_TAG_MOVED" ]; then
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    13
  >     echo 'hook: tag changes detected'
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
    14
  >     sed 's/^/hook: /' .hg/changes/tags.changes
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    15
  > fi
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    16
  > EOF
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    17
  $ hg init test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    18
  $ cd test
401
af4848f83e68 From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
mpm@selenic.com
parents:
diff changeset
    19
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    20
  $ echo a > a
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    21
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    22
  $ hg commit -m "test"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    23
  $ hg history
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    24
  changeset:   0:acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    25
  tag:         tip
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    26
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    27
  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
    28
  summary:     test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    29
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    30
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    31
  $ hg tag ' '
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    32
  abort: tag names cannot consist entirely of whitespace
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
    33
  [10]
8417
39cf453da958 clone: try updating to the actual changeset specified in options
Brett Carter <brett@rdnzl.net>
parents: 6321
diff changeset
    34
21418
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
    35
(this tests also that editor is not invoked, if '--edit' is not
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
    36
specified)
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
    37
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
    38
  $ HGEDITOR=cat hg tag "bleah"
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    39
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
    40
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    41
  $ hg history
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    42
  changeset:   1:d4f0d2909abc
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    43
  tag:         tip
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    44
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    45
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    46
  summary:     Added tag bleah for changeset acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    47
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    48
  changeset:   0:acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    49
  tag:         bleah
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    50
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    51
  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
    52
  summary:     test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    53
  
11692
52e4ac3e63f7 tag: do not allow tag names to consist solely of whitespace (issue2307)
Benjamin Pollack <benjamin@bitquabit.com>
parents: 11185
diff changeset
    54
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    55
  $ echo foo >> .hgtags
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    56
  $ hg tag "bleah2"
22680
8c65cc0f3c6b tag: use an abort hint
Matt Mackall <mpm@selenic.com>
parents: 21930
diff changeset
    57
  abort: working copy of .hgtags is changed
8c65cc0f3c6b tag: use an abort hint
Matt Mackall <mpm@selenic.com>
parents: 21930
diff changeset
    58
  (please commit .hgtags manually)
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    59
  [255]
401
af4848f83e68 From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
mpm@selenic.com
parents:
diff changeset
    60
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    61
  $ hg revert .hgtags
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    62
  $ hg tag -r 0 x y z y y z
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    63
  abort: tag names must be unique
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
    64
  [10]
17813
813db1dccc05 test-tag: test that all reserved names are rejected
Kevin Bullock <kbullock@ringworld.org>
parents: 17260
diff changeset
    65
  $ hg tag tap nada dot tip
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    66
  abort: the name 'tip' is reserved
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
    67
  [10]
17813
813db1dccc05 test-tag: test that all reserved names are rejected
Kevin Bullock <kbullock@ringworld.org>
parents: 17260
diff changeset
    68
  $ hg tag .
813db1dccc05 test-tag: test that all reserved names are rejected
Kevin Bullock <kbullock@ringworld.org>
parents: 17260
diff changeset
    69
  abort: the name '.' is reserved
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
    70
  [10]
17813
813db1dccc05 test-tag: test that all reserved names are rejected
Kevin Bullock <kbullock@ringworld.org>
parents: 17260
diff changeset
    71
  $ hg tag null
813db1dccc05 test-tag: test that all reserved names are rejected
Kevin Bullock <kbullock@ringworld.org>
parents: 17260
diff changeset
    72
  abort: the name 'null' is reserved
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
    73
  [10]
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    74
  $ hg tag "bleah"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    75
  abort: tag 'bleah' already exists (use -f to force)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
    76
  [10]
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    77
  $ hg tag "blecch" "bleah"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    78
  abort: tag 'bleah' already exists (use -f to force)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
    79
  [10]
6321
55ba3bc5b8fd tag: allow multiple tags to be added or removed
John Coomes <john.coomes@sun.com>
parents: 4933
diff changeset
    80
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    81
  $ hg tag --remove "blecch"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    82
  abort: tag 'blecch' does not exist
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
    83
  [10]
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    84
  $ hg tag --remove "bleah" "blecch" "blough"
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    85
  abort: tag 'blecch' does not exist
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
    86
  [10]
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
    87
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    88
  $ hg tag -r 0 "bleah0"
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    89
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
    90
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    91
  $ hg tag -l -r 1 "bleah1"
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    92
  $ hg tag gack gawk gorp
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    93
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
    94
  hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gack
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
    95
  hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gawk
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
    96
  hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gorp
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
    97
  $ hg tag -f gack
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
    98
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
    99
  hook: -M 336fccc858a4eb69609a291105009e484a6b6b8d gack
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   100
  hook: +M 799667b6f2d9b957f73fa644a918c2df22bab58f gack
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   101
  $ hg tag --remove gack gorp
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   102
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   103
  hook: -R 799667b6f2d9b957f73fa644a918c2df22bab58f gack
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   104
  hook: -R 336fccc858a4eb69609a291105009e484a6b6b8d gorp
6321
55ba3bc5b8fd tag: allow multiple tags to be added or removed
John Coomes <john.coomes@sun.com>
parents: 4933
diff changeset
   105
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   106
  $ hg tag "bleah "
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   107
  abort: tag 'bleah' already exists (use -f to force)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
   108
  [10]
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   109
  $ hg tag " bleah"
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   110
  abort: tag 'bleah' already exists (use -f to force)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
   111
  [10]
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   112
  $ hg tag " bleah"
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   113
  abort: tag 'bleah' already exists (use -f to force)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
   114
  [10]
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   115
  $ hg tag -r 0 "  bleahbleah  "
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   116
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   117
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   118
  $ hg tag -r 0 " bleah bleah "
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   119
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   120
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   121
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   122
  $ cat .hgtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   123
  acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   124
  acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   125
  336fccc858a4eb69609a291105009e484a6b6b8d gack
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   126
  336fccc858a4eb69609a291105009e484a6b6b8d gawk
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   127
  336fccc858a4eb69609a291105009e484a6b6b8d gorp
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   128
  336fccc858a4eb69609a291105009e484a6b6b8d gack
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   129
  799667b6f2d9b957f73fa644a918c2df22bab58f gack
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   130
  799667b6f2d9b957f73fa644a918c2df22bab58f gack
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   131
  0000000000000000000000000000000000000000 gack
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   132
  336fccc858a4eb69609a291105009e484a6b6b8d gorp
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   133
  0000000000000000000000000000000000000000 gorp
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   134
  acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   135
  acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   136
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   137
  $ cat .hg/localtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   138
  d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
1596
41366b7d6709 fix 'hg tag <tagname> <revision>
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1561
diff changeset
   139
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   140
tagging on a non-head revision
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   141
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   142
  $ hg update 0
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   143
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   144
  $ hg tag -l localblah
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   145
  $ hg tag "foobar"
30247
27addd7e8eca tag: clarify warning about making a tag on a branch head
Nathan Goldbaum <ngoldbau@illinois.edu>
parents: 26998
diff changeset
   146
  abort: working directory is not at a branch head (use -f to force)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
   147
  [10]
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   148
  $ hg tag -f "foobar"
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   149
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   150
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   151
  $ cat .hgtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   152
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   153
  $ cat .hg/localtags
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   154
  d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   155
  acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
1596
41366b7d6709 fix 'hg tag <tagname> <revision>
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1561
diff changeset
   156
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   157
  $ hg tag -l 'xx
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   158
  > newline'
17850
71c1513fd560 scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents: 17813
diff changeset
   159
  abort: '\n' cannot be used in a name
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
   160
  [10]
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   161
  $ hg tag -l 'xx:xx'
17850
71c1513fd560 scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents: 17813
diff changeset
   162
  abort: ':' cannot be used in a name
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
   163
  [10]
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   164
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   165
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
   166
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   167
  $ cd ..
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   168
  $ hg -R test log -r0:5
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   169
  changeset:   0:acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   170
  tag:         bleah
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   171
  tag:         bleah bleah
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   172
  tag:         bleah0
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   173
  tag:         bleahbleah
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   174
  tag:         foobar
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   175
  tag:         localblah
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   176
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   177
  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
   178
  summary:     test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   179
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   180
  changeset:   1:d4f0d2909abc
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   181
  tag:         bleah1
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   182
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   183
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   184
  summary:     Added tag bleah for changeset acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   185
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   186
  changeset:   2:336fccc858a4
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   187
  tag:         gawk
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   188
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   189
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   190
  summary:     Added tag bleah0 for changeset acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   191
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   192
  changeset:   3:799667b6f2d9
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   193
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   194
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   195
  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
   196
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   197
  changeset:   4:154eeb7c0138
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   198
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   199
  date:        Thu Jan 01 00:00:00 1970 +0000
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   200
  summary:     Added tag gack for changeset 799667b6f2d9
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   201
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   202
  changeset:   5:b4bb47aaff09
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   203
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   204
  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
   205
  summary:     Removed tag gack, gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   206
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   207
  $ hg clone -q -rbleah1 test test1
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   208
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   209
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   210
  $ hg -R test1 parents --style=compact
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   211
  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
   212
    Added tag bleah for changeset acb14030fe0a
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   213
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   214
  $ hg clone -q -r5 test#bleah1 test2
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   215
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   216
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   217
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   218
  hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gawk
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   219
  $ hg -R test2 parents --style=compact
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   220
  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
   221
    Removed tag gack, gorp
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   222
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   223
  $ hg clone -q -U test#bleah1 test3
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   224
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   225
  hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   226
  $ 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
   227
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   228
  $ cd test
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   229
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12365
diff changeset
   230
Issue601: hg tag doesn't do the right thing if .hgtags or localtags
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12365
diff changeset
   231
doesn't end with EOL
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   232
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36017
diff changeset
   233
  $ "$PYTHON" << EOF
36017
eed40f0f4c6f py3: replace file() with open() in test-tag.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35704
diff changeset
   234
  > f = open('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close()
eed40f0f4c6f py3: replace file() with open() in test-tag.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35704
diff changeset
   235
  > f = open('.hg/localtags', 'w'); f.write(last); f.close()
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   236
  > EOF
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   237
  $ cat .hg/localtags; echo
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   238
  acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   239
  $ hg tag -l localnewline
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   240
  $ cat .hg/localtags; echo
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   241
  acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   242
  c2899151f4e76890c602a2597a650a72666681bf localnewline
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   243
  
11063
eb23c876c111 tag: warn users about tag/branch possible name conflicts
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8417
diff changeset
   244
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36017
diff changeset
   245
  $ "$PYTHON" << EOF
36017
eed40f0f4c6f py3: replace file() with open() in test-tag.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35704
diff changeset
   246
  > f = open('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
eed40f0f4c6f py3: replace file() with open() in test-tag.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35704
diff changeset
   247
  > f = open('.hgtags', 'w'); f.write(last); f.close()
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   248
  > EOF
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   249
  $ hg ci -m'broken manual edit of .hgtags'
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   250
  $ cat .hgtags; echo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   251
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   252
  $ hg tag newline
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   253
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   254
  hook: +A a0eea09de1eeec777b46f2085260a373b2fbc293 newline
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   255
  $ cat .hgtags; echo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   256
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11788
diff changeset
   257
  a0eea09de1eeec777b46f2085260a373b2fbc293 newline
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   258
  
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   259
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   260
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
   261
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   262
  $ hg branch tag-and-branch-same-name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   263
  marked working directory as branch tag-and-branch-same-name
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
   264
  (branches are permanent and global, did you want a bookmark?)
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   265
  $ hg ci -m"discouraged"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   266
  $ hg tag tag-and-branch-same-name
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   267
  warning: tag tag-and-branch-same-name conflicts with existing branch name
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   268
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   269
  hook: +A fc93d2ea1cd78e91216c6cfbbf26747c10ce11ae tag-and-branch-same-name
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   270
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   271
test custom commit messages
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   272
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16680
diff changeset
   273
  $ cat > editor.sh << '__EOF__'
21418
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   274
  > echo "==== before editing"
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   275
  > cat "$1"
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   276
  > echo "===="
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   277
  > echo "custom tag message" > "$1"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   278
  > echo "second line" >> "$1"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   279
  > __EOF__
20767
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   280
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   281
at first, test saving last-message.txt
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   282
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   283
(test that editor is not invoked before transaction starting)
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   284
20767
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   285
  $ cat > .hg/hgrc << '__EOF__'
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   286
  > [hooks]
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   287
  > # this failure occurs before editor invocation
20767
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   288
  > pretag.test-saving-lastmessage = false
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   289
  > __EOF__
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   290
  $ rm -f .hg/last-message.txt
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   291
  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   292
  abort: pretag.test-saving-lastmessage hook exited with status 1
46417
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 45845
diff changeset
   293
  [40]
21930
a5168eb9b2bc tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents: 21922
diff changeset
   294
  $ test -f .hg/last-message.txt
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   295
  [1]
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   296
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   297
(test that editor is invoked and commit message is saved into
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   298
"last-message.txt")
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   299
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   300
  $ cat >> .hg/hgrc << '__EOF__'
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   301
  > [hooks]
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   302
  > pretag.test-saving-lastmessage =
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   303
  > # this failure occurs after editor invocation
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   304
  > pretxncommit.unexpectedabort = false
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   305
  > __EOF__
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   306
21418
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   307
(this tests also that editor is invoked, if '--edit' is specified,
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   308
regardless of '--message')
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   309
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   310
  $ rm -f .hg/last-message.txt
21418
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   311
  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e -m "foo bar"
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   312
  ==== before editing
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   313
  foo bar
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   314
  
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   315
  
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   316
  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   317
  HG: Leave message empty to abort commit.
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   318
  HG: --
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   319
  HG: user: test
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   320
  HG: branch 'tag-and-branch-same-name'
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   321
  HG: changed .hgtags
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   322
  ====
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   323
  transaction abort!
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   324
  rollback completed
41362
57c462db87fd localrepo: use context manager for transaction in commit()
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
   325
  note: commit message saved in .hg/last-message.txt
44733
c6d31e659a28 commit: tell user what to do with .hg/last-message.txt
Martin von Zweigbergk <martinvonz@google.com>
parents: 42893
diff changeset
   326
  note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   327
  abort: pretxncommit.unexpectedabort hook exited with status 1
46417
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 45845
diff changeset
   328
  [40]
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   329
  $ cat .hg/last-message.txt
20767
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   330
  custom tag message
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   331
  second line
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   332
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   333
  $ cat >> .hg/hgrc << '__EOF__'
20767
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   334
  > [hooks]
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   335
  > pretxncommit.unexpectedabort =
20767
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   336
  > __EOF__
21237
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   337
  $ hg status .hgtags
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   338
  M .hgtags
0054a77f49df localrepo: add "editor" argument to "tag()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20767
diff changeset
   339
  $ hg revert --no-backup -q .hgtags
20767
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   340
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   341
then, test custom commit message itself
bcfc4f625e57 tag: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19123
diff changeset
   342
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16680
diff changeset
   343
  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
21418
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   344
  ==== before editing
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   345
  Added tag custom-tag for changeset 75a534207be6
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   346
  
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   347
  
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   348
  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   349
  HG: Leave message empty to abort commit.
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   350
  HG: --
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   351
  HG: user: test
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   352
  HG: branch 'tag-and-branch-same-name'
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   353
  HG: changed .hgtags
d4b8fc753455 tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21237
diff changeset
   354
  ====
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   355
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   356
  hook: +A 75a534207be6b03576e0c7a4fa5708d045f1c876 custom-tag
11788
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   357
  $ hg log -l1 --template "{desc}\n"
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   358
  custom tag message
b3de1438028d tests: unify test-tag
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11692
diff changeset
   359
  second line
13133
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   360
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   361
13133
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   362
local tag with .hgtags modified
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   363
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   364
  $ hg tag hgtags-modified
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   365
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   366
  hook: +A 0f26aaea6f74c3ed6c4aad8844403c9ba128d23a hgtags-modified
13133
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   367
  $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13399
diff changeset
   368
  repository tip rolled back to revision 13 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13399
diff changeset
   369
  working directory now based on revision 13
13133
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   370
  $ hg st
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   371
  M .hgtags
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   372
  ? .hgtags.orig
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16680
diff changeset
   373
  ? editor.sh
13133
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   374
  $ hg tag --local baz
c1492615cdee tag: don't check .hgtags status if --local passed
Kevin Bullock <kbullock@ringworld.org>
parents: 12642
diff changeset
   375
  $ hg revert --no-backup .hgtags
13134
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   376
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   377
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   378
tagging when at named-branch-head that's not a topo-head
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   379
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   380
  $ hg up default
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   381
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   382
  $ hg merge -t internal:local
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   383
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   384
  (branch merge, don't forget to commit)
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   385
  $ hg ci -m 'merge named branch'
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   386
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   387
  hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   388
  hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   389
  hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   390
  hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   391
  hook: -R 336fccc858a4eb69609a291105009e484a6b6b8d gawk
13399
eff102facb15 tag: add tests for tags with whitespace (issue2174)
Afuna
parents: 13159
diff changeset
   392
  $ hg up 13
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   393
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   394
  $ hg tag new-topo-head
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   395
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   396
  hook: +A 0f26aaea6f74c3ed6c4aad8844403c9ba128d23a new-topo-head
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   397
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   398
tagging on null rev
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   399
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   400
  $ hg up null
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   401
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   402
  $ hg tag nullrev
30247
27addd7e8eca tag: clarify warning about making a tag on a branch head
Nathan Goldbaum <ngoldbau@illinois.edu>
parents: 26998
diff changeset
   403
  abort: working directory is not at a branch head (use -f to force)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
   404
  [10]
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   405
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   406
  $ hg init empty
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   407
  $ hg tag -R empty nullrev
18906
ef7068173a22 tag: clarify cryptic error message when tagging null revision
Mads Kiilerich <madski@unity3d.com>
parents: 17850
diff changeset
   408
  abort: cannot tag null revision
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
   409
  [10]
17260
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 16901
diff changeset
   410
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 16901
diff changeset
   411
  $ hg tag -R empty -r 00000000000 -f nulltag
18906
ef7068173a22 tag: clarify cryptic error message when tagging null revision
Mads Kiilerich <madski@unity3d.com>
parents: 17850
diff changeset
   412
  abort: cannot tag null revision
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44733
diff changeset
   413
  [10]
13135
1c1ca9d393f4 tag: abort if not at a branch head (issue2552)
Kevin Bullock <kbullock@ringworld.org>
parents: 13134
diff changeset
   414
34015
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   415
issue5539: pruned tags do not appear in .hgtags
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   416
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   417
  $ cat >> $HGRCPATH << EOF
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   418
  > [experimental]
34868
44797aedfb35 config: use 'experimental.evolution.exchange'
Boris Feld <boris.feld@octobus.net>
parents: 34866
diff changeset
   419
  > evolution.exchange = True
34866
1644623ab096 config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   420
  > evolution.createmarkers=True
34015
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   421
  > EOF
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   422
  $ hg up e4d483960b9b --quiet
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   423
  $ echo aaa >>a
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   424
  $ hg ci -maaa
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   425
  $ hg log -r . -T "{node}\n"
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   426
  743b3afd5aa69f130c246806e48ad2e699f490d2
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   427
  $ hg tag issue5539
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   428
  hook: tag changes detected
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   429
  hook: +A 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   430
  $ cat .hgtags
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   431
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   432
  a0eea09de1eeec777b46f2085260a373b2fbc293 newline
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   433
  743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   434
  $ hg log -r . -T "{node}\n"
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   435
  abeb261f0508ecebcd345ce21e7a25112df417aa
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   436
(mimic 'hg prune' command by obsoleting current changeset and then moving to its parent)
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   437
  $ hg debugobsolete abeb261f0508ecebcd345ce21e7a25112df417aa --record-parents
42893
34a46d48d24e debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 41362
diff changeset
   438
  1 new obsolescence markers
34015
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   439
  obsoleted 1 changesets
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   440
  $ hg up ".^" --quiet
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   441
  $ cat .hgtags
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   442
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   443
  a0eea09de1eeec777b46f2085260a373b2fbc293 newline
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   444
  $ echo bbb >>a
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   445
  $ hg ci -mbbb
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   446
  $ hg log -r . -T "{node}\n"
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   447
  089dd20da58cae34165c37b064539c6ac0c6a0dd
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   448
  $ hg tag issue5539
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   449
  hook: tag changes detected
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   450
  hook: -M 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   451
  hook: +M 089dd20da58cae34165c37b064539c6ac0c6a0dd issue5539
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   452
  $ hg id
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   453
  0accf560a709 tip
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   454
  $ cat .hgtags
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   455
  acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   456
  a0eea09de1eeec777b46f2085260a373b2fbc293 newline
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   457
  089dd20da58cae34165c37b064539c6ac0c6a0dd issue5539
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   458
  $ hg tags
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   459
  tip                               19:0accf560a709
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   460
  issue5539                         18:089dd20da58c
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   461
  new-topo-head                     13:0f26aaea6f74
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   462
  baz                               13:0f26aaea6f74
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   463
  custom-tag                        12:75a534207be6
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   464
  tag-and-branch-same-name          11:fc93d2ea1cd7
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   465
  newline                            9:a0eea09de1ee
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   466
  localnewline                       8:c2899151f4e7
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   467
  localblah                          0:acb14030fe0a
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   468
  foobar                             0:acb14030fe0a
2d80e078724a tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org>
parents: 33262
diff changeset
   469
13134
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   470
  $ cd ..
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   471
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   472
tagging on an uncommitted merge (issue2542)
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   473
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   474
  $ hg init repo-tag-uncommitted-merge
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   475
  $ cd repo-tag-uncommitted-merge
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   476
  $ echo c1 > f1
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   477
  $ hg ci -Am0
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   478
  adding f1
13159
3172da69ff37 tests: eliminate fast-forward merge in test-tag
Matt Mackall <mpm@selenic.com>
parents: 13135
diff changeset
   479
  $ echo c2 > f2
3172da69ff37 tests: eliminate fast-forward merge in test-tag
Matt Mackall <mpm@selenic.com>
parents: 13135
diff changeset
   480
  $ hg ci -Am1
3172da69ff37 tests: eliminate fast-forward merge in test-tag
Matt Mackall <mpm@selenic.com>
parents: 13135
diff changeset
   481
  adding f2
3172da69ff37 tests: eliminate fast-forward merge in test-tag
Matt Mackall <mpm@selenic.com>
parents: 13135
diff changeset
   482
  $ hg co -q 0
13134
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   483
  $ hg branch b1
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   484
  marked working directory as branch b1
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
   485
  (branches are permanent and global, did you want a bookmark?)
13159
3172da69ff37 tests: eliminate fast-forward merge in test-tag
Matt Mackall <mpm@selenic.com>
parents: 13135
diff changeset
   486
  $ hg ci -m2
13134
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   487
  $ hg up default
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   488
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   489
  $ hg merge b1
13159
3172da69ff37 tests: eliminate fast-forward merge in test-tag
Matt Mackall <mpm@selenic.com>
parents: 13135
diff changeset
   490
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
13134
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   491
  (branch merge, don't forget to commit)
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   492
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   493
  $ hg tag t1
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   494
  abort: uncommitted merge
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   495
  [20]
13134
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   496
  $ hg status
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   497
  $ hg tag --rev 1 t2
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   498
  abort: uncommitted merge
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   499
  [20]
13134
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   500
  $ hg tag --rev 1 --local t3
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   501
  $ hg tags -v
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13446
diff changeset
   502
  tip                                2:2a156e8887cc
13159
3172da69ff37 tests: eliminate fast-forward merge in test-tag
Matt Mackall <mpm@selenic.com>
parents: 13135
diff changeset
   503
  t3                                 1:c3adabd1a5f4 local
13134
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   504
ea3c93b53fdb tag: fix uncommitted merge check and error message (issue2542)
Kevin Bullock <kbullock@ringworld.org>
parents: 13133
diff changeset
   505
  $ cd ..
16680
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   506
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   507
commit hook on tag used to be run without write lock - issue3344
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   508
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   509
  $ hg init repo-tag
17260
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 16901
diff changeset
   510
  $ touch repo-tag/test
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 16901
diff changeset
   511
  $ hg -R repo-tag commit -A -m "test"
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 16901
diff changeset
   512
  adding test
16680
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   513
  $ hg init repo-tag-target
23951
42f3042cc17f tests: invoke hg command indirectly from shell script to run on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23139
diff changeset
   514
  $ cat > "$TESTTMP/issue3344.sh" <<EOF
42f3042cc17f tests: invoke hg command indirectly from shell script to run on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23139
diff changeset
   515
  > hg push "$TESTTMP/repo-tag-target"
42f3042cc17f tests: invoke hg command indirectly from shell script to run on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23139
diff changeset
   516
  > EOF
42f3042cc17f tests: invoke hg command indirectly from shell script to run on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23139
diff changeset
   517
  $ hg -R repo-tag --config hooks.commit="sh ../issue3344.sh" tag tag
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   518
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   519
  hook: +A be090ea6625635128e90f7d89df8beeb2bcc1653 tag
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34868
diff changeset
   520
  pushing to $TESTTMP/repo-tag-target
16680
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   521
  searching for changes
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   522
  adding changesets
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   523
  adding manifests
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   524
  adding file changes
17260
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 16901
diff changeset
   525
  added 2 changesets with 2 changes to 2 files
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   526
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   527
  hook: +A be090ea6625635128e90f7d89df8beeb2bcc1653 tag
16680
d0e419b0f7de tag: run commit hook when lock is released (issue3344)
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   528
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   529
automatically merge resolvable tag conflicts (i.e. tags that differ in rank)
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   530
create two clones with some different tags as well as some common tags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   531
check that we can merge tags that differ in rank
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   532
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   533
  $ hg init repo-automatic-tag-merge
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   534
  $ cd repo-automatic-tag-merge
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   535
  $ echo c0 > f0
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   536
  $ hg ci -A -m0
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   537
  adding f0
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   538
  $ hg tag tbase
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   539
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   540
  hook: +A 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
25688
24cda1dd45ff workingctx: don't report the tags for its parents
Matt Harbison <matt_harbison@yahoo.com>
parents: 23951
diff changeset
   541
  $ hg up -qr '.^'
24cda1dd45ff workingctx: don't report the tags for its parents
Matt Harbison <matt_harbison@yahoo.com>
parents: 23951
diff changeset
   542
  $ hg log -r 'wdir()' -T "{latesttagdistance}\n"
24cda1dd45ff workingctx: don't report the tags for its parents
Matt Harbison <matt_harbison@yahoo.com>
parents: 23951
diff changeset
   543
  1
24cda1dd45ff workingctx: don't report the tags for its parents
Matt Harbison <matt_harbison@yahoo.com>
parents: 23951
diff changeset
   544
  $ hg up -q
24cda1dd45ff workingctx: don't report the tags for its parents
Matt Harbison <matt_harbison@yahoo.com>
parents: 23951
diff changeset
   545
  $ hg log -r 'wdir()' -T "{latesttagdistance}\n"
24cda1dd45ff workingctx: don't report the tags for its parents
Matt Harbison <matt_harbison@yahoo.com>
parents: 23951
diff changeset
   546
  2
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   547
  $ cd ..
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   548
  $ hg clone repo-automatic-tag-merge repo-automatic-tag-merge-clone
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   549
  updating to branch default
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   550
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   551
  $ cd repo-automatic-tag-merge-clone
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   552
  $ echo c1 > f1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   553
  $ hg ci -A -m1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   554
  adding f1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   555
  $ hg tag t1 t2 t3
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   556
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   557
  hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   558
  hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   559
  hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   560
  $ hg tag --remove t2
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   561
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   562
  hook: -R 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   563
  $ hg tag t5
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   564
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   565
  hook: +A 875517b4806a848f942811a315a5bce30804ae85 t5
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   566
  $ echo c2 > f2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   567
  $ hg ci -A -m2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   568
  adding f2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   569
  $ hg tag -f t3
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   570
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   571
  hook: -M 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   572
  hook: +M 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   573
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   574
  $ cd ../repo-automatic-tag-merge
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   575
  $ echo c3 > f3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   576
  $ hg ci -A -m3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   577
  adding f3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   578
  $ hg tag -f t4 t5 t6
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   579
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   580
  hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   581
  hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   582
  hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
25724
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   583
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   584
  $ hg up -q '.^'
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   585
  $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   586
  1 changes since t4:t5:t6
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   587
  $ hg log -r '.' -T "{changessincelatesttag} changes since {latesttag}\n"
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   588
  0 changes since t4:t5:t6
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   589
  $ echo c5 > f3
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   590
  $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   591
  1 changes since t4:t5:t6
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   592
  $ hg up -qC
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   593
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   594
  $ hg tag --remove t5
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   595
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   596
  hook: -R 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   597
  $ echo c4 > f4
25724
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   598
  $ hg log -r '.' -T "{changessincelatesttag} changes since {latesttag}\n"
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   599
  2 changes since t4:t6
25727
b8245386ab40 templatekw: make {latesttag} a hybrid list
Matt Harbison <matt_harbison@yahoo.com>
parents: 25724
diff changeset
   600
  $ hg log -r '.' -T "{latesttag % '{latesttag}\n'}"
b8245386ab40 templatekw: make {latesttag} a hybrid list
Matt Harbison <matt_harbison@yahoo.com>
parents: 25724
diff changeset
   601
  t4
b8245386ab40 templatekw: make {latesttag} a hybrid list
Matt Harbison <matt_harbison@yahoo.com>
parents: 25724
diff changeset
   602
  t6
26485
43bf9471fae9 templater: introduce {latesttag()} function to match a pattern (issue4184)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25727
diff changeset
   603
  $ hg log -r '.' -T "{latesttag('t4') % 'T: {tag}, C: {changes}, D: {distance}\n'}"
43bf9471fae9 templater: introduce {latesttag()} function to match a pattern (issue4184)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25727
diff changeset
   604
  T: t4, C: 2, D: 2
43bf9471fae9 templater: introduce {latesttag()} function to match a pattern (issue4184)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25727
diff changeset
   605
  $ hg log -r '.' -T "{latesttag('re:\d') % 'T: {tag}, C: {changes}, D: {distance}\n'}"
43bf9471fae9 templater: introduce {latesttag()} function to match a pattern (issue4184)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25727
diff changeset
   606
  T: t4, C: 2, D: 2
43bf9471fae9 templater: introduce {latesttag()} function to match a pattern (issue4184)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25727
diff changeset
   607
  T: t6, C: 2, D: 2
43bf9471fae9 templater: introduce {latesttag()} function to match a pattern (issue4184)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25727
diff changeset
   608
  $ hg log -r . -T '{join(latesttag(), "*")}\n'
43bf9471fae9 templater: introduce {latesttag()} function to match a pattern (issue4184)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25727
diff changeset
   609
  t4*t6
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   610
  $ hg ci -A -m4
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   611
  adding f4
25724
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   612
  $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
4474a750413f templatekw: introduce the changessincelatesttag keyword
Matt Harbison <matt_harbison@yahoo.com>
parents: 25700
diff changeset
   613
  4 changes since t4:t6
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   614
  $ hg tag t2
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   615
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   616
  hook: +A 929bca7b18d067cbf3844c3896319a940059d748 t2
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   617
  $ hg tag -f t6
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   618
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   619
  hook: -M 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   620
  hook: +M 09af2ce14077a94effef208b49a718f4836d4338 t6
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   621
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   622
  $ cd ../repo-automatic-tag-merge-clone
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   623
  $ hg pull
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34868
diff changeset
   624
  pulling from $TESTTMP/repo-automatic-tag-merge
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   625
  searching for changes
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   626
  adding changesets
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   627
  adding manifests
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   628
  adding file changes
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   629
  added 6 changesets with 6 changes to 3 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34015
diff changeset
   630
  new changesets 9aa4e1292a27:b325cc5b642c
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   631
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   632
  hook: +A 929bca7b18d067cbf3844c3896319a940059d748 t2
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   633
  hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   634
  hook: -R 875517b4806a848f942811a315a5bce30804ae85 t5
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   635
  hook: +A 09af2ce14077a94effef208b49a718f4836d4338 t6
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   636
  (run 'hg heads' to see heads, 'hg merge' to merge)
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   637
  $ hg merge --tool internal:tagmerge
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   638
  merging .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   639
  2 files updated, 1 files merged, 0 files removed, 0 files unresolved
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   640
  (branch merge, don't forget to commit)
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   641
  $ hg status
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   642
  M .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   643
  M f3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   644
  M f4
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   645
  $ hg resolve -l
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   646
  R .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   647
  $ cat .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   648
  9aa4e1292a27a248f8d07339bed9931d54907be7 t4
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   649
  9aa4e1292a27a248f8d07339bed9931d54907be7 t6
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   650
  9aa4e1292a27a248f8d07339bed9931d54907be7 t6
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   651
  09af2ce14077a94effef208b49a718f4836d4338 t6
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   652
  6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   653
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   654
  929bca7b18d067cbf3844c3896319a940059d748 t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   655
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   656
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   657
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   658
  0000000000000000000000000000000000000000 t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   659
  875517b4806a848f942811a315a5bce30804ae85 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   660
  9aa4e1292a27a248f8d07339bed9931d54907be7 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   661
  9aa4e1292a27a248f8d07339bed9931d54907be7 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   662
  0000000000000000000000000000000000000000 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   663
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   664
  79505d5360b07e3e79d1052e347e73c02b8afa5b t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   665
23139
e53f6b72a0e4 spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents: 22791
diff changeset
   666
check that the merge tried to minimize the diff with the first merge parent
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   667
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   668
  $ hg diff --git -r 'p1()' .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   669
  diff --git a/.hgtags b/.hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   670
  --- a/.hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   671
  +++ b/.hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   672
  @@ -1,9 +1,17 @@
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   673
  +9aa4e1292a27a248f8d07339bed9931d54907be7 t4
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   674
  +9aa4e1292a27a248f8d07339bed9931d54907be7 t6
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   675
  +9aa4e1292a27a248f8d07339bed9931d54907be7 t6
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   676
  +09af2ce14077a94effef208b49a718f4836d4338 t6
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   677
   6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   678
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   679
  +929bca7b18d067cbf3844c3896319a940059d748 t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   680
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   681
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   682
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   683
   0000000000000000000000000000000000000000 t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   684
   875517b4806a848f942811a315a5bce30804ae85 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   685
  +9aa4e1292a27a248f8d07339bed9931d54907be7 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   686
  +9aa4e1292a27a248f8d07339bed9931d54907be7 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   687
  +0000000000000000000000000000000000000000 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   688
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   689
   79505d5360b07e3e79d1052e347e73c02b8afa5b t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   690
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   691
detect merge tag conflicts
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   692
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   693
  $ hg update -C -r tip
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   694
  3 files updated, 0 files merged, 2 files removed, 0 files unresolved
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   695
  $ hg tag t7
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   696
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   697
  hook: +A b325cc5b642c5b465bdbe8c09627cb372de3d47d t7
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   698
  $ hg update -C -r 'first(sort(head()))'
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   699
  3 files updated, 0 files merged, 2 files removed, 0 files unresolved
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   700
  $ printf "%s %s\n" `hg log -r . --template "{node} t7"` >> .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   701
  $ hg commit -m "manually add conflicting t7 tag"
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   702
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   703
  hook: -R 929bca7b18d067cbf3844c3896319a940059d748 t2
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   704
  hook: +A 875517b4806a848f942811a315a5bce30804ae85 t5
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   705
  hook: -M b325cc5b642c5b465bdbe8c09627cb372de3d47d t7
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   706
  hook: +M ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   707
  $ hg merge --tool internal:tagmerge
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   708
  merging .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   709
  automatic .hgtags merge failed
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   710
  the following 1 tags are in conflict: t7
22707
38e0363dcbe0 filemerge: switch the default name for internal tools from internal:x to :x
Mads Kiilerich <madski@unity3d.com>
parents: 22680
diff changeset
   711
  automatic tag merging of .hgtags failed! (use 'hg resolve --tool :merge' or another merge tool of your choice)
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   712
  2 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35393
diff changeset
   713
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   714
  [1]
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   715
  $ hg resolve -l
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   716
  U .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   717
  $ cat .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   718
  6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   719
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   720
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   721
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   722
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   723
  0000000000000000000000000000000000000000 t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   724
  875517b4806a848f942811a315a5bce30804ae85 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   725
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   726
  79505d5360b07e3e79d1052e347e73c02b8afa5b t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   727
  ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   728
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   729
  $ cd ..
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   730
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   731
handle the loss of tags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   732
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   733
  $ hg clone repo-automatic-tag-merge-clone repo-merge-lost-tags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   734
  updating to branch default
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   735
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   736
  $ cd repo-merge-lost-tags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   737
  $ echo c5 > f5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   738
  $ hg ci -A -m5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   739
  adding f5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   740
  $ hg tag -f t7
31994
b36318e6d2ef track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30247
diff changeset
   741
  hook: tag changes detected
31996
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   742
  hook: -M ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
e6e1884df298 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31995
diff changeset
   743
  hook: +M fd3a9e394ce3afb354a496323bf68ac1755a30de t7
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   744
  $ hg update -r 'p1(t7)'
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   745
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   746
  $ printf '' > .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   747
  $ hg commit -m 'delete all tags'
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   748
  created new head
22791
a074421fa4e1 addset: use the ascending argument in _iterordered
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22707
diff changeset
   749
  $ hg log -r 'max(t7::)'
a074421fa4e1 addset: use the ascending argument in _iterordered
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22707
diff changeset
   750
  changeset:   17:ffe462b50880
a074421fa4e1 addset: use the ascending argument in _iterordered
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22707
diff changeset
   751
  user:        test
a074421fa4e1 addset: use the ascending argument in _iterordered
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22707
diff changeset
   752
  date:        Thu Jan 01 00:00:00 1970 +0000
a074421fa4e1 addset: use the ascending argument in _iterordered
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22707
diff changeset
   753
  summary:     Added tag t7 for changeset fd3a9e394ce3
a074421fa4e1 addset: use the ascending argument in _iterordered
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22707
diff changeset
   754
  
21922
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   755
  $ hg update -r 'max(t7::)'
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   756
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   757
  $ hg merge -r tip --tool internal:tagmerge
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   758
  merging .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   759
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   760
  (branch merge, don't forget to commit)
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   761
  $ hg resolve -l
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   762
  R .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   763
  $ cat .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   764
  6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   765
  0000000000000000000000000000000000000000 tbase
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   766
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   767
  0000000000000000000000000000000000000000 t1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   768
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   769
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   770
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   771
  0000000000000000000000000000000000000000 t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   772
  875517b4806a848f942811a315a5bce30804ae85 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   773
  0000000000000000000000000000000000000000 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   774
  4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   775
  79505d5360b07e3e79d1052e347e73c02b8afa5b t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   776
  0000000000000000000000000000000000000000 t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   777
  ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   778
  0000000000000000000000000000000000000000 t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   779
  ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   780
  fd3a9e394ce3afb354a496323bf68ac1755a30de t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   781
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   782
also check that we minimize the diff with the 1st merge parent
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   783
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   784
  $ hg diff --git -r 'p1()' .hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   785
  diff --git a/.hgtags b/.hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   786
  --- a/.hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   787
  +++ b/.hgtags
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   788
  @@ -1,12 +1,17 @@
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   789
   6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   790
  +0000000000000000000000000000000000000000 tbase
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   791
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   792
  +0000000000000000000000000000000000000000 t1
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   793
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   794
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   795
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   796
   0000000000000000000000000000000000000000 t2
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   797
   875517b4806a848f942811a315a5bce30804ae85 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   798
  +0000000000000000000000000000000000000000 t5
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   799
   4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   800
   79505d5360b07e3e79d1052e347e73c02b8afa5b t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   801
  +0000000000000000000000000000000000000000 t3
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   802
   ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   803
  +0000000000000000000000000000000000000000 t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   804
   ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   805
   fd3a9e394ce3afb354a496323bf68ac1755a30de t7
50e20154cb68 filemerge: add internal:tagmerge merge tool
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21418
diff changeset
   806