##// END OF EJS Templates
merge default into stable for 5.5rc0
merge default into stable for 5.5rc0

File last commit:

r45227:c6d31e65 default
r45741:28163c5d merge 5.5rc0 stable
Show More
test-tag.t
806 lines | 25.3 KiB | text/troff | Tads3Lexer
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 $ cat >> $HGRCPATH << EOF
> [experimental]
> hook-track-tags=1
> [hooks]
Matt Harbison
test-tag: make hook runnable on Windows...
r32019 > txnclose.track-tag=sh ${TESTTMP}/taghook.sh
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 > EOF
$ cat << EOF > taghook.sh
> #!/bin/sh
> # escape the "$" otherwise the test runner interpret it when writting the
> # file...
> if [ -n "\$HG_TAG_MOVED" ]; then
> echo 'hook: tag changes detected'
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 > sed 's/^/hook: /' .hg/changes/tags.changes
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 > fi
> EOF
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg init test
$ cd test
$ echo a > a
$ hg add a
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "test"
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg history
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-tag
r11788 summary: test
$ hg tag ' '
abort: tag names cannot consist entirely of whitespace
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-tag
r11788
FUJIWARA Katsunori
tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"...
r21418 (this tests also that editor is not invoked, if '--edit' is not
specified)
$ HGEDITOR=cat hg tag "bleah"
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg history
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:d4f0d2909abc
Nicolas Dumazet
tests: unify test-tag
r11788 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah for changeset acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788 tag: bleah
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-tag
r11788 summary: test
$ echo foo >> .hgtags
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg tag "bleah2"
Matt Mackall
tag: use an abort hint
r22680 abort: working copy of .hgtags is changed
(please commit .hgtags manually)
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Nicolas Dumazet
tests: unify test-tag
r11788
$ hg revert .hgtags
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg tag -r 0 x y z y y z
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag names must be unique
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Kevin Bullock
test-tag: test that all reserved names are rejected
r17813 $ hg tag tap nada dot tip
Nicolas Dumazet
tests: unify test-tag
r11788 abort: the name 'tip' is reserved
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Kevin Bullock
test-tag: test that all reserved names are rejected
r17813 $ hg tag .
abort: the name '.' is reserved
[255]
$ hg tag null
abort: the name 'null' is reserved
[255]
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg tag "bleah"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag 'bleah' already exists (use -f to force)
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
$ hg tag "blecch" "bleah"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag 'bleah' already exists (use -f to force)
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Nicolas Dumazet
tests: unify test-tag
r11788
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg tag --remove "blecch"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag 'blecch' does not exist
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
$ hg tag --remove "bleah" "blecch" "blough"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag 'blecch' does not exist
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag -r 0 "bleah0"
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag -l -r 1 "bleah1"
$ hg tag gack gawk gorp
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gack
hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gawk
hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gorp
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag -f gack
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -M 336fccc858a4eb69609a291105009e484a6b6b8d gack
hook: +M 799667b6f2d9b957f73fa644a918c2df22bab58f gack
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag --remove gack gorp
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -R 799667b6f2d9b957f73fa644a918c2df22bab58f gack
hook: -R 336fccc858a4eb69609a291105009e484a6b6b8d gorp
Nicolas Dumazet
tests: unify test-tag
r11788
Afuna
tag: add tests for tags with whitespace (issue2174)
r13399 $ hg tag "bleah "
abort: tag 'bleah' already exists (use -f to force)
[255]
$ hg tag " bleah"
abort: tag 'bleah' already exists (use -f to force)
[255]
$ hg tag " bleah"
abort: tag 'bleah' already exists (use -f to force)
[255]
$ hg tag -r 0 " bleahbleah "
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
Afuna
tag: add tests for tags with whitespace (issue2174)
r13399 $ hg tag -r 0 " bleah bleah "
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
Afuna
tag: add tests for tags with whitespace (issue2174)
r13399
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hgtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
336fccc858a4eb69609a291105009e484a6b6b8d gack
336fccc858a4eb69609a291105009e484a6b6b8d gawk
336fccc858a4eb69609a291105009e484a6b6b8d gorp
336fccc858a4eb69609a291105009e484a6b6b8d gack
799667b6f2d9b957f73fa644a918c2df22bab58f gack
799667b6f2d9b957f73fa644a918c2df22bab58f gack
Nicolas Dumazet
tests: unify test-tag
r11788 0000000000000000000000000000000000000000 gack
Martin Geisler
tests: remove unneeded -d flags...
r12156 336fccc858a4eb69609a291105009e484a6b6b8d gorp
Nicolas Dumazet
tests: unify test-tag
r11788 0000000000000000000000000000000000000000 gorp
Afuna
tag: add tests for tags with whitespace (issue2174)
r13399 acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hg/localtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
Nicolas Dumazet
tests: unify test-tag
r11788
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 tagging on a non-head revision
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg update 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 $ hg tag -l localblah
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag "foobar"
Nathan Goldbaum
tag: clarify warning about making a tag on a branch head...
r30247 abort: working directory is not at a branch head (use -f to force)
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 [255]
$ hg tag -f "foobar"
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hgtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hg/localtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
Nicolas Dumazet
tests: unify test-tag
r11788
$ hg tag -l 'xx
> newline'
Wagner Bruna
scmutil: generalize message to make it more i18n-friendly
r17850 abort: '\n' cannot be used in a name
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg tag -l 'xx:xx'
Wagner Bruna
scmutil: generalize message to make it more i18n-friendly
r17850 abort: ':' cannot be used in a name
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-tag
r11788
cloning local tags
$ cd ..
$ hg -R test log -r0:5
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788 tag: bleah
Afuna
tag: add tests for tags with whitespace (issue2174)
r13399 tag: bleah bleah
Nicolas Dumazet
tests: unify test-tag
r11788 tag: bleah0
Afuna
tag: add tests for tags with whitespace (issue2174)
r13399 tag: bleahbleah
Nicolas Dumazet
tests: unify test-tag
r11788 tag: foobar
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 tag: localblah
Nicolas Dumazet
tests: unify test-tag
r11788 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-tag
r11788 summary: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:d4f0d2909abc
Nicolas Dumazet
tests: unify test-tag
r11788 tag: bleah1
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah for changeset acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 2:336fccc858a4
Nicolas Dumazet
tests: unify test-tag
r11788 tag: gawk
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah0 for changeset acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 3:799667b6f2d9
Nicolas Dumazet
tests: unify test-tag
r11788 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag gack, gawk, gorp for changeset 336fccc858a4
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 4:154eeb7c0138
Nicolas Dumazet
tests: unify test-tag
r11788 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag gack for changeset 799667b6f2d9
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 5:b4bb47aaff09
Nicolas Dumazet
tests: unify test-tag
r11788 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-tag
r11788 summary: Removed tag gack, gorp
$ hg clone -q -rbleah1 test test1
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg -R test1 parents --style=compact
Martin Geisler
tests: remove unneeded -d flags...
r12156 1[tip] d4f0d2909abc 1970-01-01 00:00 +0000 test
Added tag bleah for changeset acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788
$ hg clone -q -r5 test#bleah1 test2
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gawk
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg -R test2 parents --style=compact
Martin Geisler
tests: remove unneeded -d flags...
r12156 5[tip] b4bb47aaff09 1970-01-01 00:00 +0000 test
Nicolas Dumazet
tests: unify test-tag
r11788 Removed tag gack, gorp
$ hg clone -q -U test#bleah1 test3
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg -R test3 parents --style=compact
$ cd test
Martin Geisler
tests: added a short description to issue numbers...
r12399 Issue601: hg tag doesn't do the right thing if .hgtags or localtags
doesn't end with EOL
Nicolas Dumazet
tests: unify test-tag
r11788
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" << EOF
Pulkit Goyal
py3: replace file() with open() in test-tag.t...
r36034 > f = open('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close()
> f = open('.hg/localtags', 'w'); f.write(last); f.close()
Nicolas Dumazet
tests: unify test-tag
r11788 > EOF
$ cat .hg/localtags; echo
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg tag -l localnewline
$ cat .hg/localtags; echo
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
Martin Geisler
tests: remove unneeded -d flags...
r12156 c2899151f4e76890c602a2597a650a72666681bf localnewline
Nicolas Dumazet
tests: unify test-tag
r11788
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" << EOF
Pulkit Goyal
py3: replace file() with open() in test-tag.t...
r36034 > f = open('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
> f = open('.hgtags', 'w'); f.write(last); f.close()
Nicolas Dumazet
tests: unify test-tag
r11788 > EOF
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg ci -m'broken manual edit of .hgtags'
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hgtags; echo
Martin Geisler
tests: remove unneeded -d flags...
r12156 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
$ hg tag newline
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A a0eea09de1eeec777b46f2085260a373b2fbc293 newline
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hgtags; echo
Martin Geisler
tests: remove unneeded -d flags...
r12156 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
a0eea09de1eeec777b46f2085260a373b2fbc293 newline
Nicolas Dumazet
tests: unify test-tag
r11788
tag and branch using same name
$ hg branch tag-and-branch-same-name
marked working directory as branch tag-and-branch-same-name
Matt Mackall
branch: warn on branching
r15615 (branches are permanent and global, did you want a bookmark?)
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg ci -m"discouraged"
$ hg tag tag-and-branch-same-name
warning: tag tag-and-branch-same-name conflicts with existing branch name
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A fc93d2ea1cd78e91216c6cfbbf26747c10ce11ae tag-and-branch-same-name
Nicolas Dumazet
tests: unify test-tag
r11788
test custom commit messages
Mads Kiilerich
tests: consistently use a HGEDITOR pattern that works with msys on windows...
r16901 $ cat > editor.sh << '__EOF__'
FUJIWARA Katsunori
tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"...
r21418 > echo "==== before editing"
> cat "$1"
> echo "===="
Nicolas Dumazet
tests: unify test-tag
r11788 > echo "custom tag message" > "$1"
> echo "second line" >> "$1"
> __EOF__
FUJIWARA Katsunori
tag: save manually edited commit message into ".hg/last-message.txt"...
r20767
at first, test saving last-message.txt
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237 (test that editor is not invoked before transaction starting)
FUJIWARA Katsunori
tag: save manually edited commit message into ".hg/last-message.txt"...
r20767 $ cat > .hg/hgrc << '__EOF__'
> [hooks]
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237 > # this failure occurs before editor invocation
FUJIWARA Katsunori
tag: save manually edited commit message into ".hg/last-message.txt"...
r20767 > pretag.test-saving-lastmessage = false
> __EOF__
$ rm -f .hg/last-message.txt
$ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
abort: pretag.test-saving-lastmessage hook exited with status 1
[255]
Danek Duvall
tests: cat error messages are different on Solaris
r21930 $ test -f .hg/last-message.txt
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237 [1]
(test that editor is invoked and commit message is saved into
"last-message.txt")
$ cat >> .hg/hgrc << '__EOF__'
> [hooks]
> pretag.test-saving-lastmessage =
> # this failure occurs after editor invocation
> pretxncommit.unexpectedabort = false
> __EOF__
FUJIWARA Katsunori
tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"...
r21418 (this tests also that editor is invoked, if '--edit' is specified,
regardless of '--message')
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237 $ rm -f .hg/last-message.txt
FUJIWARA Katsunori
tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"...
r21418 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e -m "foo bar"
==== before editing
foo bar
HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: test
HG: branch 'tag-and-branch-same-name'
HG: changed .hgtags
====
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237 transaction abort!
rollback completed
Martin von Zweigbergk
localrepo: use context manager for transaction in commit()...
r41398 note: commit message saved in .hg/last-message.txt
Martin von Zweigbergk
commit: tell user what to do with .hg/last-message.txt...
r45227 note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237 abort: pretxncommit.unexpectedabort hook exited with status 1
[255]
$ cat .hg/last-message.txt
FUJIWARA Katsunori
tag: save manually edited commit message into ".hg/last-message.txt"...
r20767 custom tag message
second line
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237
$ cat >> .hg/hgrc << '__EOF__'
FUJIWARA Katsunori
tag: save manually edited commit message into ".hg/last-message.txt"...
r20767 > [hooks]
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237 > pretxncommit.unexpectedabort =
FUJIWARA Katsunori
tag: save manually edited commit message into ".hg/last-message.txt"...
r20767 > __EOF__
FUJIWARA Katsunori
localrepo: add "editor" argument to "tag()"...
r21237 $ hg status .hgtags
M .hgtags
$ hg revert --no-backup -q .hgtags
FUJIWARA Katsunori
tag: save manually edited commit message into ".hg/last-message.txt"...
r20767
then, test custom commit message itself
Mads Kiilerich
tests: consistently use a HGEDITOR pattern that works with msys on windows...
r16901 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
FUJIWARA Katsunori
tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"...
r21418 ==== before editing
Added tag custom-tag for changeset 75a534207be6
HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: test
HG: branch 'tag-and-branch-same-name'
HG: changed .hgtags
====
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 75a534207be6b03576e0c7a4fa5708d045f1c876 custom-tag
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg log -l1 --template "{desc}\n"
custom tag message
second line
Kevin Bullock
tag: don't check .hgtags status if --local passed...
r13133
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135
Kevin Bullock
tag: don't check .hgtags status if --local passed...
r13133 local tag with .hgtags modified
$ hg tag hgtags-modified
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 0f26aaea6f74c3ed6c4aad8844403c9ba128d23a hgtags-modified
Kevin Bullock
tag: don't check .hgtags status if --local passed...
r13133 $ hg rollback
Gilles Moris
rollback: clarifies the message about the reverted state (issue2628)...
r13446 repository tip rolled back to revision 13 (undo commit)
working directory now based on revision 13
Kevin Bullock
tag: don't check .hgtags status if --local passed...
r13133 $ hg st
M .hgtags
? .hgtags.orig
Mads Kiilerich
tests: consistently use a HGEDITOR pattern that works with msys on windows...
r16901 ? editor.sh
Kevin Bullock
tag: don't check .hgtags status if --local passed...
r13133 $ hg tag --local baz
$ hg revert --no-backup .hgtags
Kevin Bullock
tag: fix uncommitted merge check and error message (issue2542)...
r13134
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135
tagging when at named-branch-head that's not a topo-head
$ hg up default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg merge -t internal:local
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m 'merge named branch'
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
hook: -R 336fccc858a4eb69609a291105009e484a6b6b8d gawk
Afuna
tag: add tests for tags with whitespace (issue2174)
r13399 $ hg up 13
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg tag new-topo-head
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 0f26aaea6f74c3ed6c4aad8844403c9ba128d23a new-topo-head
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135
tagging on null rev
$ hg up null
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg tag nullrev
Nathan Goldbaum
tag: clarify warning about making a tag on a branch head...
r30247 abort: working directory is not at a branch head (use -f to force)
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135 [255]
$ hg init empty
$ hg tag -R empty nullrev
Mads Kiilerich
tag: clarify cryptic error message when tagging null revision
r18906 abort: cannot tag null revision
Brad Hall
tag: don't allow tagging the null revision (issue1915)...
r17260 [255]
$ hg tag -R empty -r 00000000000 -f nulltag
Mads Kiilerich
tag: clarify cryptic error message when tagging null revision
r18906 abort: cannot tag null revision
Brad Hall
tag: don't allow tagging the null revision (issue1915)...
r17260 [255]
Kevin Bullock
tag: abort if not at a branch head (issue2552)...
r13135
Denis Laxalde
tag: use filtered repo when creating new tags (issue5539)...
r34017 issue5539: pruned tags do not appear in .hgtags
$ cat >> $HGRCPATH << EOF
> [experimental]
Boris Feld
config: use 'experimental.evolution.exchange'...
r34869 > evolution.exchange = True
Boris Feld
config: use 'experimental.evolution.create-markers'...
r34867 > evolution.createmarkers=True
Denis Laxalde
tag: use filtered repo when creating new tags (issue5539)...
r34017 > EOF
$ hg up e4d483960b9b --quiet
$ echo aaa >>a
$ hg ci -maaa
$ hg log -r . -T "{node}\n"
743b3afd5aa69f130c246806e48ad2e699f490d2
$ hg tag issue5539
hook: tag changes detected
hook: +A 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
$ cat .hgtags
acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
a0eea09de1eeec777b46f2085260a373b2fbc293 newline
743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
$ hg log -r . -T "{node}\n"
abeb261f0508ecebcd345ce21e7a25112df417aa
(mimic 'hg prune' command by obsoleting current changeset and then moving to its parent)
$ hg debugobsolete abeb261f0508ecebcd345ce21e7a25112df417aa --record-parents
debugobsolete: also issue the "new obsmarkers" messsage...
r43163 1 new obsolescence markers
Denis Laxalde
tag: use filtered repo when creating new tags (issue5539)...
r34017 obsoleted 1 changesets
$ hg up ".^" --quiet
$ cat .hgtags
acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
a0eea09de1eeec777b46f2085260a373b2fbc293 newline
$ echo bbb >>a
$ hg ci -mbbb
$ hg log -r . -T "{node}\n"
089dd20da58cae34165c37b064539c6ac0c6a0dd
$ hg tag issue5539
hook: tag changes detected
hook: -M 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
hook: +M 089dd20da58cae34165c37b064539c6ac0c6a0dd issue5539
$ hg id
0accf560a709 tip
$ cat .hgtags
acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
a0eea09de1eeec777b46f2085260a373b2fbc293 newline
089dd20da58cae34165c37b064539c6ac0c6a0dd issue5539
$ hg tags
tip 19:0accf560a709
issue5539 18:089dd20da58c
new-topo-head 13:0f26aaea6f74
baz 13:0f26aaea6f74
custom-tag 12:75a534207be6
tag-and-branch-same-name 11:fc93d2ea1cd7
newline 9:a0eea09de1ee
localnewline 8:c2899151f4e7
localblah 0:acb14030fe0a
foobar 0:acb14030fe0a
Kevin Bullock
tag: fix uncommitted merge check and error message (issue2542)...
r13134 $ cd ..
tagging on an uncommitted merge (issue2542)
$ hg init repo-tag-uncommitted-merge
$ cd repo-tag-uncommitted-merge
$ echo c1 > f1
$ hg ci -Am0
adding f1
Matt Mackall
tests: eliminate fast-forward merge in test-tag
r13159 $ echo c2 > f2
$ hg ci -Am1
adding f2
$ hg co -q 0
Kevin Bullock
tag: fix uncommitted merge check and error message (issue2542)...
r13134 $ hg branch b1
marked working directory as branch b1
Matt Mackall
branch: warn on branching
r15615 (branches are permanent and global, did you want a bookmark?)
Matt Mackall
tests: eliminate fast-forward merge in test-tag
r13159 $ hg ci -m2
Kevin Bullock
tag: fix uncommitted merge check and error message (issue2542)...
r13134 $ hg up default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg merge b1
Matt Mackall
tests: eliminate fast-forward merge in test-tag
r13159 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Kevin Bullock
tag: fix uncommitted merge check and error message (issue2542)...
r13134 (branch merge, don't forget to commit)
$ hg tag t1
abort: uncommitted merge
[255]
$ hg status
$ hg tag --rev 1 t2
abort: uncommitted merge
[255]
$ hg tag --rev 1 --local t3
$ hg tags -v
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 tip 2:2a156e8887cc
Matt Mackall
tests: eliminate fast-forward merge in test-tag
r13159 t3 1:c3adabd1a5f4 local
Kevin Bullock
tag: fix uncommitted merge check and error message (issue2542)...
r13134
$ cd ..
Mads Kiilerich
tag: run commit hook when lock is released (issue3344)
r16680
commit hook on tag used to be run without write lock - issue3344
$ hg init repo-tag
Brad Hall
tag: don't allow tagging the null revision (issue1915)...
r17260 $ touch repo-tag/test
$ hg -R repo-tag commit -A -m "test"
adding test
Mads Kiilerich
tag: run commit hook when lock is released (issue3344)
r16680 $ hg init repo-tag-target
FUJIWARA Katsunori
tests: invoke hg command indirectly from shell script to run on Windows...
r23951 $ cat > "$TESTTMP/issue3344.sh" <<EOF
> hg push "$TESTTMP/repo-tag-target"
> EOF
$ hg -R repo-tag --config hooks.commit="sh ../issue3344.sh" tag tag
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A be090ea6625635128e90f7d89df8beeb2bcc1653 tag
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 pushing to $TESTTMP/repo-tag-target
Mads Kiilerich
tag: run commit hook when lock is released (issue3344)
r16680 searching for changes
adding changesets
adding manifests
adding file changes
Brad Hall
tag: don't allow tagging the null revision (issue1915)...
r17260 added 2 changesets with 2 changes to 2 files
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A be090ea6625635128e90f7d89df8beeb2bcc1653 tag
Mads Kiilerich
tag: run commit hook when lock is released (issue3344)
r16680
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 automatically merge resolvable tag conflicts (i.e. tags that differ in rank)
create two clones with some different tags as well as some common tags
check that we can merge tags that differ in rank
$ hg init repo-automatic-tag-merge
$ cd repo-automatic-tag-merge
$ echo c0 > f0
$ hg ci -A -m0
adding f0
$ hg tag tbase
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
Matt Harbison
workingctx: don't report the tags for its parents...
r25688 $ hg up -qr '.^'
$ hg log -r 'wdir()' -T "{latesttagdistance}\n"
1
$ hg up -q
$ hg log -r 'wdir()' -T "{latesttagdistance}\n"
2
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ cd ..
$ hg clone repo-automatic-tag-merge repo-automatic-tag-merge-clone
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd repo-automatic-tag-merge-clone
$ echo c1 > f1
$ hg ci -A -m1
adding f1
$ hg tag t1 t2 t3
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg tag --remove t2
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -R 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg tag t5
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 875517b4806a848f942811a315a5bce30804ae85 t5
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ echo c2 > f2
$ hg ci -A -m2
adding f2
$ hg tag -f t3
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -M 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
hook: +M 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922
$ cd ../repo-automatic-tag-merge
$ echo c3 > f3
$ hg ci -A -m3
adding f3
$ hg tag -f t4 t5 t6
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
Matt Harbison
templatekw: introduce the changessincelatesttag keyword...
r25724
$ hg up -q '.^'
$ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
1 changes since t4:t5:t6
$ hg log -r '.' -T "{changessincelatesttag} changes since {latesttag}\n"
0 changes since t4:t5:t6
$ echo c5 > f3
$ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
1 changes since t4:t5:t6
$ hg up -qC
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg tag --remove t5
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -R 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ echo c4 > f4
Matt Harbison
templatekw: introduce the changessincelatesttag keyword...
r25724 $ hg log -r '.' -T "{changessincelatesttag} changes since {latesttag}\n"
2 changes since t4:t6
Matt Harbison
templatekw: make {latesttag} a hybrid list...
r25727 $ hg log -r '.' -T "{latesttag % '{latesttag}\n'}"
t4
t6
Matt Harbison
templater: introduce {latesttag()} function to match a pattern (issue4184)...
r26485 $ hg log -r '.' -T "{latesttag('t4') % 'T: {tag}, C: {changes}, D: {distance}\n'}"
T: t4, C: 2, D: 2
$ hg log -r '.' -T "{latesttag('re:\d') % 'T: {tag}, C: {changes}, D: {distance}\n'}"
T: t4, C: 2, D: 2
T: t6, C: 2, D: 2
$ hg log -r . -T '{join(latesttag(), "*")}\n'
t4*t6
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg ci -A -m4
adding f4
Matt Harbison
templatekw: introduce the changessincelatesttag keyword...
r25724 $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
4 changes since t4:t6
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg tag t2
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 929bca7b18d067cbf3844c3896319a940059d748 t2
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg tag -f t6
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -M 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
hook: +M 09af2ce14077a94effef208b49a718f4836d4338 t6
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922
$ cd ../repo-automatic-tag-merge-clone
$ hg pull
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 pulling from $TESTTMP/repo-automatic-tag-merge
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 searching for changes
adding changesets
adding manifests
adding file changes
added 6 changesets with 6 changes to 3 files (+1 heads)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets 9aa4e1292a27:b325cc5b642c
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A 929bca7b18d067cbf3844c3896319a940059d748 t2
hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
hook: -R 875517b4806a848f942811a315a5bce30804ae85 t5
hook: +A 09af2ce14077a94effef208b49a718f4836d4338 t6
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 (run 'hg heads' to see heads, 'hg merge' to merge)
$ hg merge --tool internal:tagmerge
merging .hgtags
2 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status
M .hgtags
M f3
M f4
$ hg resolve -l
R .hgtags
$ cat .hgtags
9aa4e1292a27a248f8d07339bed9931d54907be7 t4
9aa4e1292a27a248f8d07339bed9931d54907be7 t6
9aa4e1292a27a248f8d07339bed9931d54907be7 t6
09af2ce14077a94effef208b49a718f4836d4338 t6
6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
929bca7b18d067cbf3844c3896319a940059d748 t2
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
0000000000000000000000000000000000000000 t2
875517b4806a848f942811a315a5bce30804ae85 t5
9aa4e1292a27a248f8d07339bed9931d54907be7 t5
9aa4e1292a27a248f8d07339bed9931d54907be7 t5
0000000000000000000000000000000000000000 t5
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
79505d5360b07e3e79d1052e347e73c02b8afa5b t3
Mads Kiilerich
spelling: fixes from proofreading of spell checker issues
r23139 check that the merge tried to minimize the diff with the first merge parent
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922
$ hg diff --git -r 'p1()' .hgtags
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -1,9 +1,17 @@
+9aa4e1292a27a248f8d07339bed9931d54907be7 t4
+9aa4e1292a27a248f8d07339bed9931d54907be7 t6
+9aa4e1292a27a248f8d07339bed9931d54907be7 t6
+09af2ce14077a94effef208b49a718f4836d4338 t6
6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
+929bca7b18d067cbf3844c3896319a940059d748 t2
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
0000000000000000000000000000000000000000 t2
875517b4806a848f942811a315a5bce30804ae85 t5
+9aa4e1292a27a248f8d07339bed9931d54907be7 t5
+9aa4e1292a27a248f8d07339bed9931d54907be7 t5
+0000000000000000000000000000000000000000 t5
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
79505d5360b07e3e79d1052e347e73c02b8afa5b t3
detect merge tag conflicts
$ hg update -C -r tip
3 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg tag t7
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: +A b325cc5b642c5b465bdbe8c09627cb372de3d47d t7
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg update -C -r 'first(sort(head()))'
3 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ printf "%s %s\n" `hg log -r . --template "{node} t7"` >> .hgtags
$ hg commit -m "manually add conflicting t7 tag"
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -R 929bca7b18d067cbf3844c3896319a940059d748 t2
hook: +A 875517b4806a848f942811a315a5bce30804ae85 t5
hook: -M b325cc5b642c5b465bdbe8c09627cb372de3d47d t7
hook: +M ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg merge --tool internal:tagmerge
merging .hgtags
automatic .hgtags merge failed
the following 1 tags are in conflict: t7
Mads Kiilerich
filemerge: switch the default name for internal tools from internal:x to :x
r22707 automatic tag merging of .hgtags failed! (use 'hg resolve --tool :merge' or another merge tool of your choice)
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
Pulkit Goyal
merge: add `--abort` flag which can abort the merge...
r35722 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 [1]
$ hg resolve -l
U .hgtags
$ cat .hgtags
6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
0000000000000000000000000000000000000000 t2
875517b4806a848f942811a315a5bce30804ae85 t5
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
79505d5360b07e3e79d1052e347e73c02b8afa5b t3
ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
$ cd ..
handle the loss of tags
$ hg clone repo-automatic-tag-merge-clone repo-merge-lost-tags
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd repo-merge-lost-tags
$ echo c5 > f5
$ hg ci -A -m5
adding f5
$ hg tag -f t7
Pierre-Yves David
track-tags: introduce first bits of tags tracking during transaction...
r31994 hook: tag changes detected
Pierre-Yves David
track-tags: write all tag changes to a file...
r31996 hook: -M ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
hook: +M fd3a9e394ce3afb354a496323bf68ac1755a30de t7
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg update -r 'p1(t7)'
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ printf '' > .hgtags
$ hg commit -m 'delete all tags'
created new head
Pierre-Yves David
addset: use the ascending argument in _iterordered...
r22791 $ hg log -r 'max(t7::)'
changeset: 17:ffe462b50880
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag t7 for changeset fd3a9e394ce3
Angel Ezquerra
filemerge: add internal:tagmerge merge tool...
r21922 $ hg update -r 'max(t7::)'
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg merge -r tip --tool internal:tagmerge
merging .hgtags
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg resolve -l
R .hgtags
$ cat .hgtags
6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
0000000000000000000000000000000000000000 tbase
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
0000000000000000000000000000000000000000 t1
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
0000000000000000000000000000000000000000 t2
875517b4806a848f942811a315a5bce30804ae85 t5
0000000000000000000000000000000000000000 t5
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
79505d5360b07e3e79d1052e347e73c02b8afa5b t3
0000000000000000000000000000000000000000 t3
ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
0000000000000000000000000000000000000000 t7
ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
fd3a9e394ce3afb354a496323bf68ac1755a30de t7
also check that we minimize the diff with the 1st merge parent
$ hg diff --git -r 'p1()' .hgtags
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -1,12 +1,17 @@
6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
+0000000000000000000000000000000000000000 tbase
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
+0000000000000000000000000000000000000000 t1
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
0000000000000000000000000000000000000000 t2
875517b4806a848f942811a315a5bce30804ae85 t5
+0000000000000000000000000000000000000000 t5
4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
79505d5360b07e3e79d1052e347e73c02b8afa5b t3
+0000000000000000000000000000000000000000 t3
ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
+0000000000000000000000000000000000000000 t7
ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
fd3a9e394ce3afb354a496323bf68ac1755a30de t7