tests: remove unneeded -d flags

Many tests fixed the commit date of their changesets at '1000000 0' or
similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not
better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is
the default run-tests.py installs.

Removing the unnecessary flag removes some clutter and will hopefully
make it clearer what the tests are really trying to test. Some tests
did not even change their output when the dates were changed, in which
case the -d flag was truly irrelevant.

Dates used in sequence (such as '0 0', '1 0', etc...) were left alone
since they may make the test easier to understand.
This commit is contained in:
Martin Geisler 2010-09-02 23:22:51 +02:00
parent e8c36ac440
commit cc612c476f
80 changed files with 969 additions and 971 deletions

View File

@ -5,19 +5,19 @@
$ hg -v addremove $ hg -v addremove
adding dir/bar adding dir/bar
adding foo adding foo
$ hg -v commit -m "add 1" -d "1000000 0" $ hg -v commit -m "add 1"
dir/bar dir/bar
foo foo
committed changeset 0:d44511117907 committed changeset 0:6f7f953567a2
$ cd dir/ $ cd dir/
$ touch ../foo_2 bar_2 $ touch ../foo_2 bar_2
$ hg -v addremove $ hg -v addremove
adding dir/bar_2 adding dir/bar_2
adding foo_2 adding foo_2
$ hg -v commit -m "add 2" -d "1000000 0" $ hg -v commit -m "add 2"
dir/bar_2 dir/bar_2
foo_2 foo_2
committed changeset 1:a85812e0561a committed changeset 1:e65414bf35c5
$ cd .. $ cd ..
$ hg init sim $ hg init sim

View File

@ -1,12 +1,12 @@
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ ls $ ls
a a
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ hg co 0 $ hg co 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 1 files removed, 0 files unresolved

View File

@ -8,15 +8,15 @@ Make a changeset:
$ echo a > a $ echo a > a
$ hg add a $ hg add a
$ hg commit -m test -d "1000000 0" $ hg commit -m test
This command is ancient: This command is ancient:
$ hg history $ hg history
changeset: 0:0acdaf898367 changeset: 0:acb14030fe0a
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: test summary: test

View File

@ -13,7 +13,7 @@ add file
commit first revision commit first revision
$ hg ci -m 1 -u user -d "1 0" $ hg ci -m 1
set bookmark set bookmark
@ -23,7 +23,7 @@ set bookmark
commit second revision commit second revision
$ hg ci -m 2 -u usr -d "1 0" $ hg ci -m 2
set bookmark set bookmark
@ -38,14 +38,14 @@ update to -2
commit new head commit new head
$ hg ci -m 3 -u user -d "1 0" $ hg ci -m 3
created new head created new head
bookmarks updated? bookmarks updated?
$ hg book $ hg book
test 1:16b24da7e457 test 1:25e1ee7a0081
test2 1:16b24da7e457 test2 1:25e1ee7a0081
strip to revision 1 strip to revision 1
@ -55,6 +55,6 @@ strip to revision 1
list bookmarks list bookmarks
$ hg book $ hg book
* test 1:9f1b7e78eff8 * test 1:8cf31af87a2b
* test2 1:9f1b7e78eff8 * test2 1:8cf31af87a2b

View File

@ -2,30 +2,30 @@
$ cd test $ cd test
$ echo "0" >> afile $ echo "0" >> afile
$ hg add afile $ hg add afile
$ hg commit -m "0.0" -d "1000000 0" $ hg commit -m "0.0"
$ echo "1" >> afile $ echo "1" >> afile
$ hg commit -m "0.1" -d "1000000 0" $ hg commit -m "0.1"
$ echo "2" >> afile $ echo "2" >> afile
$ hg commit -m "0.2" -d "1000000 0" $ hg commit -m "0.2"
$ echo "3" >> afile $ echo "3" >> afile
$ hg commit -m "0.3" -d "1000000 0" $ hg commit -m "0.3"
$ hg update -C 0 $ hg update -C 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo "1" >> afile $ echo "1" >> afile
$ hg commit -m "1.1" -d "1000000 0" $ hg commit -m "1.1"
created new head created new head
$ echo "2" >> afile $ echo "2" >> afile
$ hg commit -m "1.2" -d "1000000 0" $ hg commit -m "1.2"
$ echo "a line" > fred $ echo "a line" > fred
$ echo "3" >> afile $ echo "3" >> afile
$ hg add fred $ hg add fred
$ hg commit -m "1.3" -d "1000000 0" $ hg commit -m "1.3"
$ hg mv afile adifferentfile $ hg mv afile adifferentfile
$ hg commit -m "1.3m" -d "1000000 0" $ hg commit -m "1.3m"
$ hg update -C 3 $ hg update -C 3
1 files updated, 0 files merged, 2 files removed, 0 files unresolved 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg mv afile anotherfile $ hg mv afile anotherfile
$ hg commit -m "0.3m" -d "1000000 0" $ hg commit -m "0.3m"
$ hg debugindex .hg/store/data/afile.i $ hg debugindex .hg/store/data/afile.i
rev offset length base linkrev nodeid p1 p2 rev offset length base linkrev nodeid p1 p2
0 0 3 0 0 362fef284ce2 000000000000 000000000000 0 0 3 0 0 362fef284ce2 000000000000 000000000000
@ -79,7 +79,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
1 files, 1 changesets, 1 total revisions 1 files, 1 changesets, 1 total revisions
0:5649c9d34dd8 0:f9ee2f85a263
searching for changes searching for changes
2 changesets found 2 changesets found
adding changesets adding changesets
@ -92,7 +92,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
1 files, 2 changesets, 2 total revisions 1 files, 2 changesets, 2 total revisions
1:10b2180f755b 1:34c2bf6b0626
searching for changes searching for changes
3 changesets found 3 changesets found
adding changesets adding changesets
@ -105,7 +105,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
1 files, 3 changesets, 3 total revisions 1 files, 3 changesets, 3 total revisions
2:d62976ca1e50 2:e38ba6f5b7e0
searching for changes searching for changes
4 changesets found 4 changesets found
adding changesets adding changesets
@ -118,7 +118,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
1 files, 4 changesets, 4 total revisions 1 files, 4 changesets, 4 total revisions
3:ac69c658229d 3:eebf5a27f8ca
searching for changes searching for changes
2 changesets found 2 changesets found
adding changesets adding changesets
@ -131,7 +131,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
1 files, 2 changesets, 2 total revisions 1 files, 2 changesets, 2 total revisions
1:5f4f3ceb285e 1:095197eb4973
searching for changes searching for changes
3 changesets found 3 changesets found
adding changesets adding changesets
@ -144,7 +144,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
1 files, 3 changesets, 3 total revisions 1 files, 3 changesets, 3 total revisions
2:024e4e7df376 2:1bb50a9436a7
searching for changes searching for changes
4 changesets found 4 changesets found
adding changesets adding changesets
@ -157,7 +157,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
2 files, 4 changesets, 5 total revisions 2 files, 4 changesets, 5 total revisions
3:1e3f6b843bd6 3:7373c1169842
searching for changes searching for changes
5 changesets found 5 changesets found
adding changesets adding changesets
@ -170,7 +170,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
3 files, 5 changesets, 6 total revisions 3 files, 5 changesets, 6 total revisions
4:27f57c869697 4:a6a34bfa0076
searching for changes searching for changes
5 changesets found 5 changesets found
adding changesets adding changesets
@ -183,7 +183,7 @@
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
2 files, 5 changesets, 5 total revisions 2 files, 5 changesets, 5 total revisions
4:088ff9d6e1e1 4:aa35859c02ea
$ cd test-8 $ cd test-8
$ hg pull ../test-7 $ hg pull ../test-7
pulling from ../test-7 pulling from ../test-7
@ -242,17 +242,17 @@ issue1910
revision 2 revision 2
$ hg tip -q $ hg tip -q
2:d62976ca1e50 2:e38ba6f5b7e0
$ hg unbundle ../test-bundle-should-fail.hg $ hg unbundle ../test-bundle-should-fail.hg
adding changesets adding changesets
transaction abort! transaction abort!
rollback completed rollback completed
abort: 00changelog.i@ac69c658229d: unknown parent! abort: 00changelog.i@eebf5a27f8ca: unknown parent!
revision 2 revision 2
$ hg tip -q $ hg tip -q
2:d62976ca1e50 2:e38ba6f5b7e0
$ hg unbundle ../test-bundle-all.hg $ hg unbundle ../test-bundle-all.hg
adding changesets adding changesets
adding manifests adding manifests
@ -263,7 +263,7 @@ revision 2
revision 8 revision 8
$ hg tip -q $ hg tip -q
8:088ff9d6e1e1 8:aa35859c02ea
$ hg verify $ hg verify
checking changesets checking changesets
checking manifests checking manifests
@ -276,7 +276,7 @@ revision 8
revision 2 revision 2
$ hg tip -q $ hg tip -q
2:d62976ca1e50 2:e38ba6f5b7e0
$ hg unbundle ../test-bundle-branch1.hg $ hg unbundle ../test-bundle-branch1.hg
adding changesets adding changesets
adding manifests adding manifests
@ -287,7 +287,7 @@ revision 2
revision 4 revision 4
$ hg tip -q $ hg tip -q
4:088ff9d6e1e1 4:aa35859c02ea
$ hg verify $ hg verify
checking changesets checking changesets
checking manifests checking manifests
@ -306,7 +306,7 @@ revision 4
revision 6 revision 6
$ hg tip -q $ hg tip -q
6:27f57c869697 6:a6a34bfa0076
$ hg verify $ hg verify
checking changesets checking changesets
checking manifests checking manifests
@ -325,7 +325,7 @@ revision 6
revision 4 revision 4
$ hg tip -q $ hg tip -q
4:088ff9d6e1e1 4:aa35859c02ea
$ hg verify $ hg verify
checking changesets checking changesets
checking manifests checking manifests
@ -340,7 +340,7 @@ revision 4
adifferentfile adifferentfile
2 files updated, 0 files merged, 0 files removed, 0 files unresolved 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg ci -m merge -d "1000000 0" $ hg ci -m merge
$ cd .. $ cd ..
$ hg -R test bundle --base 2 test-bundle-head.hg $ hg -R test bundle --base 2 test-bundle-head.hg
7 changesets found 7 changesets found
@ -358,7 +358,7 @@ revision 4
revision 9 revision 9
$ hg tip -q $ hg tip -q
9:e3061ea42e4c 9:905597b0d5d4
$ hg verify $ hg verify
checking changesets checking changesets
checking manifests checking manifests

View File

@ -6,30 +6,30 @@ Setting up test
$ cd test $ cd test
$ echo 0 > afile $ echo 0 > afile
$ hg add afile $ hg add afile
$ hg commit -m "0.0" -d "1000000 0" $ hg commit -m "0.0"
$ echo 1 >> afile $ echo 1 >> afile
$ hg commit -m "0.1" -d "1000000 0" $ hg commit -m "0.1"
$ echo 2 >> afile $ echo 2 >> afile
$ hg commit -m "0.2" -d "1000000 0" $ hg commit -m "0.2"
$ echo 3 >> afile $ echo 3 >> afile
$ hg commit -m "0.3" -d "1000000 0" $ hg commit -m "0.3"
$ hg update -C 0 $ hg update -C 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo 1 >> afile $ echo 1 >> afile
$ hg commit -m "1.1" -d "1000000 0" $ hg commit -m "1.1"
created new head created new head
$ echo 2 >> afile $ echo 2 >> afile
$ hg commit -m "1.2" -d "1000000 0" $ hg commit -m "1.2"
$ echo "a line" > fred $ echo "a line" > fred
$ echo 3 >> afile $ echo 3 >> afile
$ hg add fred $ hg add fred
$ hg commit -m "1.3" -d "1000000 0" $ hg commit -m "1.3"
$ hg mv afile adifferentfile $ hg mv afile adifferentfile
$ hg commit -m "1.3m" -d "1000000 0" $ hg commit -m "1.3m"
$ hg update -C 3 $ hg update -C 3
1 files updated, 0 files merged, 2 files removed, 0 files unresolved 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg mv afile anotherfile $ hg mv afile anotherfile
$ hg commit -m "0.3m" -d "1000000 0" $ hg commit -m "0.3m"
$ hg verify $ hg verify
checking changesets checking changesets
checking manifests checking manifests
@ -139,52 +139,52 @@ Log -R full.hg in fresh empty
$ hg init empty $ hg init empty
$ cd empty $ cd empty
$ hg -R bundle://../full.hg log $ hg -R bundle://../full.hg log
changeset: 8:088ff9d6e1e1 changeset: 8:aa35859c02ea
tag: tip tag: tip
parent: 3:ac69c658229d parent: 3:eebf5a27f8ca
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.3m summary: 0.3m
changeset: 7:27f57c869697 changeset: 7:a6a34bfa0076
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3m summary: 1.3m
changeset: 6:1e3f6b843bd6 changeset: 6:7373c1169842
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3 summary: 1.3
changeset: 5:024e4e7df376 changeset: 5:1bb50a9436a7
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.2 summary: 1.2
changeset: 4:5f4f3ceb285e changeset: 4:095197eb4973
parent: 0:5649c9d34dd8 parent: 0:f9ee2f85a263
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.1 summary: 1.1
changeset: 3:ac69c658229d changeset: 3:eebf5a27f8ca
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.3 summary: 0.3
changeset: 2:d62976ca1e50 changeset: 2:e38ba6f5b7e0
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.2 summary: 0.2
changeset: 1:10b2180f755b changeset: 1:34c2bf6b0626
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.1 summary: 0.1
changeset: 0:5649c9d34dd8 changeset: 0:f9ee2f85a263
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.0 summary: 0.0
@ -198,7 +198,7 @@ doesn't work (yet ?)
hg -R bundle://../full.hg verify hg -R bundle://../full.hg verify
$ hg pull bundle://../full.hg $ hg pull bundle://../full.hg
changegroup hook: HG_NODE=5649c9d34dd87d0ecb5fd39672128376e83b22e1 HG_SOURCE=pull HG_URL=bundle:../full.hg changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:../full.hg
pulling from bundle://../full.hg pulling from bundle://../full.hg
requesting all changes requesting all changes
adding changesets adding changesets
@ -221,7 +221,7 @@ Log -R bundle:empty+full.hg
Pull full.hg into empty again (using -R; with hook) Pull full.hg into empty again (using -R; with hook)
$ hg -R empty pull full.hg $ hg -R empty pull full.hg
changegroup hook: HG_NODE=5649c9d34dd87d0ecb5fd39672128376e83b22e1 HG_SOURCE=pull HG_URL=bundle:empty+full.hg changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:empty+full.hg
pulling from full.hg pulling from full.hg
requesting all changes requesting all changes
adding changesets adding changesets
@ -250,52 +250,52 @@ Create partial clones
Log -R full.hg in partial Log -R full.hg in partial
$ hg -R bundle://../full.hg log $ hg -R bundle://../full.hg log
changeset: 8:088ff9d6e1e1 changeset: 8:aa35859c02ea
tag: tip tag: tip
parent: 3:ac69c658229d parent: 3:eebf5a27f8ca
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.3m summary: 0.3m
changeset: 7:27f57c869697 changeset: 7:a6a34bfa0076
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3m summary: 1.3m
changeset: 6:1e3f6b843bd6 changeset: 6:7373c1169842
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3 summary: 1.3
changeset: 5:024e4e7df376 changeset: 5:1bb50a9436a7
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.2 summary: 1.2
changeset: 4:5f4f3ceb285e changeset: 4:095197eb4973
parent: 0:5649c9d34dd8 parent: 0:f9ee2f85a263
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.1 summary: 1.1
changeset: 3:ac69c658229d changeset: 3:eebf5a27f8ca
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.3 summary: 0.3
changeset: 2:d62976ca1e50 changeset: 2:e38ba6f5b7e0
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.2 summary: 0.2
changeset: 1:10b2180f755b changeset: 1:34c2bf6b0626
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.1 summary: 0.1
changeset: 0:5649c9d34dd8 changeset: 0:f9ee2f85a263
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.0 summary: 0.0
@ -304,32 +304,32 @@ Incoming full.hg in partial
$ hg incoming bundle://../full.hg $ hg incoming bundle://../full.hg
comparing with bundle://../full.hg comparing with bundle://../full.hg
searching for changes searching for changes
changeset: 4:5f4f3ceb285e changeset: 4:095197eb4973
parent: 0:5649c9d34dd8 parent: 0:f9ee2f85a263
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.1 summary: 1.1
changeset: 5:024e4e7df376 changeset: 5:1bb50a9436a7
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.2 summary: 1.2
changeset: 6:1e3f6b843bd6 changeset: 6:7373c1169842
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3 summary: 1.3
changeset: 7:27f57c869697 changeset: 7:a6a34bfa0076
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3m summary: 1.3m
changeset: 8:088ff9d6e1e1 changeset: 8:aa35859c02ea
tag: tip tag: tip
parent: 3:ac69c658229d parent: 3:eebf5a27f8ca
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.3m summary: 0.3m
@ -338,32 +338,32 @@ Outgoing -R full.hg vs partial2 in partial
$ hg -R bundle://../full.hg outgoing ../partial2 $ hg -R bundle://../full.hg outgoing ../partial2
comparing with ../partial2 comparing with ../partial2
searching for changes searching for changes
changeset: 4:5f4f3ceb285e changeset: 4:095197eb4973
parent: 0:5649c9d34dd8 parent: 0:f9ee2f85a263
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.1 summary: 1.1
changeset: 5:024e4e7df376 changeset: 5:1bb50a9436a7
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.2 summary: 1.2
changeset: 6:1e3f6b843bd6 changeset: 6:7373c1169842
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3 summary: 1.3
changeset: 7:27f57c869697 changeset: 7:a6a34bfa0076
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3m summary: 1.3m
changeset: 8:088ff9d6e1e1 changeset: 8:aa35859c02ea
tag: tip tag: tip
parent: 3:ac69c658229d parent: 3:eebf5a27f8ca
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.3m summary: 0.3m
@ -384,16 +384,16 @@ Direct clone from bundle (all-history)
updating to branch default updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R full-clone heads $ hg -R full-clone heads
changeset: 8:088ff9d6e1e1 changeset: 8:aa35859c02ea
tag: tip tag: tip
parent: 3:ac69c658229d parent: 3:eebf5a27f8ca
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0.3m summary: 0.3m
changeset: 7:27f57c869697 changeset: 7:a6a34bfa0076
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1.3m summary: 1.3m
$ rm -r full-clone $ rm -r full-clone
@ -482,8 +482,8 @@ diff against bundle
$ hg init b $ hg init b
$ cd b $ cd b
$ hg -R ../all.hg diff -r tip $ hg -R ../all.hg diff -r tip
diff -r 088ff9d6e1e1 anotherfile diff -r aa35859c02ea anotherfile
--- a/anotherfile Mon Jan 12 13:46:40 1970 +0000 --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
-0 -0

View File

@ -1,9 +1,7 @@
$ mkdir t
$ cd t
$ hg init $ hg init
$ echo 0 > a $ echo 0 > a
$ echo 0 > b $ echo 0 > b
$ hg ci -A -m m -d "1000000 0" $ hg ci -A -m m
adding a adding a
adding b adding b
$ hg rm a $ hg rm a
@ -12,13 +10,13 @@
$ hg cat --decode a # more tests in test-encode $ hg cat --decode a # more tests in test-encode
0 0
$ echo 1 > b $ echo 1 > b
$ hg ci -m m -d "1000000 0" $ hg ci -m m
$ echo 2 > b $ echo 2 > b
$ hg cat -r 0 a $ hg cat -r 0 a
0 0
$ hg cat -r 0 b $ hg cat -r 0 b
0 0
$ hg cat -r 1 a $ hg cat -r 1 a
a: no such file in rev 03f6b0774996 a: no such file in rev 7040230c159c
$ hg cat -r 1 b $ hg cat -r 1 b
1 1

View File

@ -23,9 +23,9 @@ commit added file that has been deleted
$ echo bar > bar $ echo bar > bar
$ hg add bar $ hg add bar
$ rm bar $ rm bar
$ hg commit -d "1000000 0" -m commit-8 $ hg commit -m commit-8
nothing changed nothing changed
$ hg commit -d "1000000 0" -m commit-8-2 bar $ hg commit -m commit-8-2 bar
abort: bar: file not found! abort: bar: file not found!
$ hg -q revert -a --no-backup $ hg -q revert -a --no-backup
@ -89,15 +89,15 @@ partial subdir commit test
$ hg add $ hg add
adding bar/bar adding bar/bar
adding foo/foo adding foo/foo
$ hg ci -d '1000000 0' -m commit-subdir-1 foo $ hg ci -m commit-subdir-1 foo
$ hg ci -d '1000001 0' -m commit-subdir-2 bar $ hg ci -m commit-subdir-2 bar
subdir log 1 subdir log 1
$ hg log -v foo $ hg log -v foo
changeset: 0:6ef3cb06bb80 changeset: 0:f97e73a25882
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: foo/foo files: foo/foo
description: description:
commit-subdir-1 commit-subdir-1
@ -107,10 +107,10 @@ subdir log 1
subdir log 2 subdir log 2
$ hg log -v bar $ hg log -v bar
changeset: 1:f2e51572cf5a changeset: 1:aa809156d50d
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:41 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: bar/bar files: bar/bar
description: description:
commit-subdir-2 commit-subdir-2
@ -120,18 +120,18 @@ subdir log 2
full log full log
$ hg log -v $ hg log -v
changeset: 1:f2e51572cf5a changeset: 1:aa809156d50d
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:41 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: bar/bar files: bar/bar
description: description:
commit-subdir-2 commit-subdir-2
changeset: 0:6ef3cb06bb80 changeset: 0:f97e73a25882
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: foo/foo files: foo/foo
description: description:
commit-subdir-1 commit-subdir-1
@ -147,25 +147,25 @@ dot and subdir commit test
$ mkdir foo $ mkdir foo
$ echo foo content > foo/plain-file $ echo foo content > foo/plain-file
$ hg add foo/plain-file $ hg add foo/plain-file
$ hg ci -d '1000000 0' -m commit-foo-subdir foo $ hg ci -m commit-foo-subdir foo
$ echo modified foo content > foo/plain-file $ echo modified foo content > foo/plain-file
$ hg ci -d '2000000 0' -m commit-foo-dot . $ hg ci -m commit-foo-dot .
full log full log
$ hg log -v $ hg log -v
changeset: 1:d9180e04fa8a changeset: 1:95b38e3a5b2e
tag: tip tag: tip
user: test user: test
date: Sat Jan 24 03:33:20 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: foo/plain-file files: foo/plain-file
description: description:
commit-foo-dot commit-foo-dot
changeset: 0:80b572aaf098 changeset: 0:65d4e9386227
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: foo/plain-file files: foo/plain-file
description: description:
commit-foo-subdir commit-foo-subdir
@ -176,15 +176,15 @@ subdir log
$ cd foo $ cd foo
$ hg log . $ hg log .
changeset: 1:d9180e04fa8a changeset: 1:95b38e3a5b2e
tag: tip tag: tip
user: test user: test
date: Sat Jan 24 03:33:20 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: commit-foo-dot summary: commit-foo-dot
changeset: 0:80b572aaf098 changeset: 0:65d4e9386227
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: commit-foo-subdir summary: commit-foo-subdir
$ cd .. $ cd ..

View File

@ -6,56 +6,56 @@
$ cd test $ cd test
$ touch asdf $ touch asdf
$ hg add asdf $ hg add asdf
$ hg commit -d '1000000 0' -m commit-1 $ hg commit -m commit-1
$ hg tip $ hg tip
changeset: 0:9426b370c206 changeset: 0:53f268a58230
tag: tip tag: tip
user: My Name <myname@example.com> user: My Name <myname@example.com>
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: commit-1 summary: commit-1
$ unset EMAIL $ unset EMAIL
$ echo 1234 > asdf $ echo 1234 > asdf
$ hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 $ hg commit -u "foo@bar.com" -m commit-1
$ hg tip $ hg tip
changeset: 1:4997f15a1b24 changeset: 1:3871b2a9e9bf
tag: tip tag: tip
user: foo@bar.com user: foo@bar.com
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: commit-1 summary: commit-1
$ echo "[ui]" >> .hg/hgrc $ echo "[ui]" >> .hg/hgrc
$ echo "username = foobar <foo@bar.com>" >> .hg/hgrc $ echo "username = foobar <foo@bar.com>" >> .hg/hgrc
$ echo 12 > asdf $ echo 12 > asdf
$ hg commit -d '1000000 0' -m commit-1 $ hg commit -m commit-1
$ hg tip $ hg tip
changeset: 2:72b8012b424e changeset: 2:8eeac6695c1c
tag: tip tag: tip
user: foobar <foo@bar.com> user: foobar <foo@bar.com>
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: commit-1 summary: commit-1
$ echo 1 > asdf $ echo 1 > asdf
$ hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 $ hg commit -u "foo@bar.com" -m commit-1
$ hg tip $ hg tip
changeset: 3:35ff3067bedd changeset: 3:957606a725e4
tag: tip tag: tip
user: foo@bar.com user: foo@bar.com
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: commit-1 summary: commit-1
$ echo 123 > asdf $ echo 123 > asdf
$ echo "[ui]" > .hg/hgrc $ echo "[ui]" > .hg/hgrc
$ echo "username = " >> .hg/hgrc $ echo "username = " >> .hg/hgrc
$ hg commit -d '1000000 0' -m commit-1 $ hg commit -m commit-1
abort: no username supplied (see "hg help config") abort: no username supplied (see "hg help config")
$ rm .hg/hgrc $ rm .hg/hgrc
$ hg commit -d '1000000 0' -m commit-1 2>&1 $ hg commit -m commit-1 2>&1
No username found, using '[^']*' instead No username found, using '[^']*' instead
$ echo space > asdf $ echo space > asdf
$ hg commit -d '1000000 0' -u ' ' -m commit-1 $ hg commit -u ' ' -m commit-1
transaction abort! transaction abort!
rollback completed rollback completed
abort: empty username! abort: empty username!

View File

@ -1,13 +1,13 @@
$ hg init $ hg init
$ echo "nothing" > a $ echo "nothing" > a
$ hg add a $ hg add a
$ hg commit -m ancestor -d "1000000 0" $ hg commit -m ancestor
$ echo "something" > a $ echo "something" > a
$ hg commit -m branch1 -d "1000000 0" $ hg commit -m branch1
$ hg co 0 $ hg co 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo "something else" > a $ echo "something else" > a
$ hg commit -m branch2 -d "1000000 0" $ hg commit -m branch2
created new head created new head
$ hg merge 1 $ hg merge 1
@ -18,7 +18,7 @@
use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
$ hg id $ hg id
e7fe8eb3e180+0d24b7662d3e+ tip 32e80765d7fe+75234512624c+ tip
$ cat a $ cat a
<<<<<<< local <<<<<<< local

View File

@ -3,7 +3,7 @@
hg init hg init
echo foo > a echo foo > a
hg add a hg add a
hg commit -m "1" -d "1000000 0" hg commit -m "1"
echo bar > b echo bar > b
hg add b hg add b
@ -22,11 +22,11 @@ rm b
hg co -C 0 hg co -C 0
echo foo-a > a echo foo-a > a
hg commit -m "2a" -d "1000000 0" hg commit -m "2a"
hg co -C 0 hg co -C 0
echo foo-b > a echo foo-b > a
hg commit -m "2b" -d "1000000 0" hg commit -m "2b"
HGMERGE=true hg merge 1 HGMERGE=true hg merge 1

View File

@ -3,14 +3,14 @@
$ hg init $ hg init
$ echo 1 > a $ echo 1 > a
$ hg ci -qAm "first" -d "1000000 0" $ hg ci -qAm "first"
$ hg cp a b $ hg cp a b
$ hg mv a c $ hg mv a c
$ echo 2 >> b $ echo 2 >> b
$ echo 2 >> c $ echo 2 >> c
$ hg ci -qAm "second" -d "1000000 0" $ hg ci -qAm "second"
$ hg co -C 0 $ hg co -C 0
1 files updated, 0 files merged, 2 files removed, 0 files unresolved 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
@ -18,7 +18,7 @@
$ echo 0 > a $ echo 0 > a
$ echo 1 >> a $ echo 1 >> a
$ hg ci -qAm "other" -d "1000000 0" $ hg ci -qAm "other"
$ hg merge --debug $ hg merge --debug
searching for copies back to rev 1 searching for copies back to rev 1
@ -31,7 +31,7 @@
checking for directory renames checking for directory renames
resolving manifests resolving manifests
overwrite None partial False overwrite None partial False
ancestor 583c7b748052 local fb3948d97f07+ remote 7f1309517659 ancestor b8bf91eeebbc local add3f11052fa+ remote 17c05bb7fcb6
a: remote moved to c -> m a: remote moved to c -> m
a: remote moved to b -> m a: remote moved to b -> m
preserving a for resolve of b preserving a for resolve of b
@ -40,12 +40,12 @@
updating: a 1/2 files (50.00%) updating: a 1/2 files (50.00%)
picked tool 'internal:merge' for b (binary False symlink False) picked tool 'internal:merge' for b (binary False symlink False)
merging a and b to b merging a and b to b
my b@fb3948d97f07+ other b@7f1309517659 ancestor a@583c7b748052 my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc
premerge successful premerge successful
updating: a 2/2 files (100.00%) updating: a 2/2 files (100.00%)
picked tool 'internal:merge' for c (binary False symlink False) picked tool 'internal:merge' for c (binary False symlink False)
merging a and c to c merging a and c to c
my c@fb3948d97f07+ other c@7f1309517659 ancestor a@583c7b748052 my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc
premerge successful premerge successful
0 files updated, 2 files merged, 0 files removed, 0 files unresolved 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)

View File

@ -1,37 +1,37 @@
$ hg init $ hg init
$ echo a > a $ echo a > a
$ hg add a $ hg add a
$ hg commit -m "1" -d "1000000 0" $ hg commit -m "1"
$ hg status $ hg status
$ hg copy a b $ hg copy a b
$ hg status $ hg status
A b A b
$ hg sum $ hg sum
parent: 0:33aaa84a386b tip parent: 0:c19d34741b0a tip
1 1
branch: default branch: default
commit: 1 copied commit: 1 copied
update: (current) update: (current)
$ hg --debug commit -m "2" -d "1000000 0" $ hg --debug commit -m "2"
b b
b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
committed changeset 1:76973b01f66a012648546c979ea4c41de9e7d8cd committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4
we should see two history entries we should see two history entries
$ hg history -v $ hg history -v
changeset: 1:76973b01f66a changeset: 1:93580a2c28a5
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: b files: b
description: description:
2 2
changeset: 0:33aaa84a386b changeset: 0:c19d34741b0a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: a files: a
description: description:
1 1
@ -41,9 +41,9 @@ we should see two history entries
we should see one log entry for a we should see one log entry for a
$ hg log a $ hg log a
changeset: 0:33aaa84a386b changeset: 0:c19d34741b0a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
@ -56,10 +56,10 @@ this should show a revision linked to changeset 0
we should see one log entry for b we should see one log entry for b
$ hg log b $ hg log b
changeset: 1:76973b01f66a changeset: 1:93580a2c28a5
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2

View File

@ -7,38 +7,38 @@
$ echo bar > foo $ echo bar > foo
$ hg add foo $ hg add foo
$ hg ci -m 'add foo' -d '1000000 0' $ hg ci -m 'add foo'
$ echo foobar > foo $ echo foobar > foo
$ hg ci -m 'change foo' -d '1000001 0' $ hg ci -m 'change foo'
$ hg --quiet diff -r 0 -r 1 $ hg --quiet diff -r 0 -r 1
--- a/foo Mon Jan 12 13:46:40 1970 +0000 --- a/foo Thu Jan 01 00:00:00 1970 +0000
+++ b/foo Mon Jan 12 13:46:41 1970 +0000 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@
-bar -bar
+foobar +foobar
$ hg diff -r 0 -r 1 $ hg diff -r 0 -r 1
diff -r 74de3f1392e2 -r b8b5f023a6ad foo diff -r a99fb63adac3 -r 9b8568d3af2f foo
--- a/foo Mon Jan 12 13:46:40 1970 +0000 --- a/foo Thu Jan 01 00:00:00 1970 +0000
+++ b/foo Mon Jan 12 13:46:41 1970 +0000 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@
-bar -bar
+foobar +foobar
$ hg --verbose diff -r 0 -r 1 $ hg --verbose diff -r 0 -r 1
diff -r 74de3f1392e2 -r b8b5f023a6ad foo diff -r a99fb63adac3 -r 9b8568d3af2f foo
--- a/foo Mon Jan 12 13:46:40 1970 +0000 --- a/foo Thu Jan 01 00:00:00 1970 +0000
+++ b/foo Mon Jan 12 13:46:41 1970 +0000 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@
-bar -bar
+foobar +foobar
$ hg --debug diff -r 0 -r 1 $ hg --debug diff -r 0 -r 1
diff -r 74de3f1392e2d67856fb155963441f2610494e1a -r b8b5f023a6ad77fc378bd95cf3fa00cd1414d107 foo diff -r a99fb63adac3f31816a22f665bc3b7a7655b30f4 -r 9b8568d3af2f1749445eef03aede868a6f39f210 foo
--- a/foo Mon Jan 12 13:46:40 1970 +0000 --- a/foo Thu Jan 01 00:00:00 1970 +0000
+++ b/foo Mon Jan 12 13:46:41 1970 +0000 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@
-bar -bar
+foobar +foobar

View File

@ -1,19 +1,19 @@
$ hg init $ hg init
$ touch a $ touch a
$ hg add a $ hg add a
$ hg ci -m "a" -d "1000000 0" $ hg ci -m "a"
$ echo 123 > b $ echo 123 > b
$ hg add b $ hg add b
$ hg diff --nodates $ hg diff --nodates
diff -r acd8075edac9 b diff -r 3903775176ed b
--- /dev/null --- /dev/null
+++ b/b +++ b/b
@@ -0,0 +1,1 @@ @@ -0,0 +1,1 @@
+123 +123
$ hg diff --nodates -r tip $ hg diff --nodates -r tip
diff -r acd8075edac9 b diff -r 3903775176ed b
--- /dev/null --- /dev/null
+++ b/b +++ b/b
@@ -0,0 +1,1 @@ @@ -0,0 +1,1 @@
@ -21,12 +21,12 @@
$ echo foo > a $ echo foo > a
$ hg diff --nodates $ hg diff --nodates
diff -r acd8075edac9 a diff -r 3903775176ed a
--- a/a --- a/a
+++ b/a +++ b/a
@@ -0,0 +1,1 @@ @@ -0,0 +1,1 @@
+foo +foo
diff -r acd8075edac9 b diff -r 3903775176ed b
--- /dev/null --- /dev/null
+++ b/b +++ b/b
@@ -0,0 +1,1 @@ @@ -0,0 +1,1 @@

View File

@ -2,27 +2,27 @@
$ cd repo $ cd repo
$ echo line 1 > foo $ echo line 1 > foo
$ hg ci -qAm 'add foo' -d "1000000 0" $ hg ci -qAm 'add foo'
copy foo to bar and change both files copy foo to bar and change both files
$ hg cp foo bar $ hg cp foo bar
$ echo line 2-1 >> foo $ echo line 2-1 >> foo
$ echo line 2-2 >> bar $ echo line 2-2 >> bar
$ hg ci -m 'cp foo bar; change both' -d "1000000 0" $ hg ci -m 'cp foo bar; change both'
in another branch, change foo in a way that doesn't conflict with in another branch, change foo in a way that doesn't conflict with
the other changes the other changes
$ hg up -qC 0 $ hg up -qC 0
$ echo line 0 > foo $ echo line 0 > foo
$ hg cat foo >> foo $ hg cat foo >> foo
$ hg ci -m 'change foo' -d "1000000 0" $ hg ci -m 'change foo'
created new head created new head
we get conflicts that shouldn't be there we get conflicts that shouldn't be there
$ hg merge -P $ hg merge -P
changeset: 1:d9da848d0adf changeset: 1:484bf6903104
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: cp foo bar; change both summary: cp foo bar; change both
$ hg merge --debug $ hg merge --debug
@ -34,7 +34,7 @@ we get conflicts that shouldn't be there
checking for directory renames checking for directory renames
resolving manifests resolving manifests
overwrite None partial False overwrite None partial False
ancestor 310fd17130da local 2092631ce82b+ remote d9da848d0adf ancestor e6dc8efe11cc local 6a0df1dad128+ remote 484bf6903104
foo: versions differ -> m foo: versions differ -> m
foo: remote copied to bar -> m foo: remote copied to bar -> m
preserving foo for resolve of bar preserving foo for resolve of bar
@ -42,12 +42,12 @@ we get conflicts that shouldn't be there
updating: foo 1/2 files (50.00%) updating: foo 1/2 files (50.00%)
picked tool 'internal:merge' for bar (binary False symlink False) picked tool 'internal:merge' for bar (binary False symlink False)
merging foo and bar to bar merging foo and bar to bar
my bar@2092631ce82b+ other bar@d9da848d0adf ancestor foo@310fd17130da my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc
premerge successful premerge successful
updating: foo 2/2 files (100.00%) updating: foo 2/2 files (100.00%)
picked tool 'internal:merge' for foo (binary False symlink False) picked tool 'internal:merge' for foo (binary False symlink False)
merging foo merging foo
my foo@2092631ce82b+ other foo@d9da848d0adf ancestor foo@310fd17130da my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc
premerge successful premerge successful
0 files updated, 2 files merged, 0 files removed, 0 files unresolved 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)

View File

@ -3,11 +3,11 @@
hg init hg init
echo 123 > a echo 123 > a
hg add a hg add a
hg commit -m "first" -d "1000000 0" a hg commit -m "first" a
mkdir sub mkdir sub
echo 321 > sub/b echo 321 > sub/b
hg add sub/b hg add sub/b
hg commit -m "second" -d "1000000 0" sub/b hg commit -m "second" sub/b
cat sub/b cat sub/b
hg co 0 hg co 0
cat sub/b 2>/dev/null || echo "sub/b not present" cat sub/b 2>/dev/null || echo "sub/b not present"

View File

@ -4,16 +4,16 @@ hg init a
cd a cd a
touch empty1 touch empty1
hg add empty1 hg add empty1
hg commit -m 'add empty1' -d '1000000 0' hg commit -m 'add empty1'
touch empty2 touch empty2
hg add empty2 hg add empty2
hg commit -m 'add empty2' -d '1000000 0' hg commit -m 'add empty2'
hg up -C 0 hg up -C 0
touch empty3 touch empty3
hg add empty3 hg add empty3
hg commit -m 'add empty3' -d '1000000 0' hg commit -m 'add empty3'
hg heads hg heads
@ -21,5 +21,5 @@ hg merge 1
# before changeset 05257fd28591, we didn't notice the # before changeset 05257fd28591, we didn't notice the
# empty file that came from rev 1. # empty file that came from rev 1.
hg status hg status
hg commit -m merge -d '1000000 0' hg commit -m merge
hg manifest --debug tip hg manifest --debug tip

View File

@ -1,15 +1,15 @@
0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
created new head created new head
changeset: 2:62ec0e86d1e5 changeset: 2:a1cb177e0d44
tag: tip tag: tip
parent: 0:567dde5e6e98 parent: 0:1e1d9c4e5b64
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: add empty3 summary: add empty3
changeset: 1:41ab7b321727 changeset: 1:097d2b0e17f6
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: add empty2 summary: add empty2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved

View File

@ -21,19 +21,19 @@
hg init a hg init a
cd a cd a
touch init touch init
hg ci -A -m 0 -d "1000000 0" hg ci -A -m 0
touch x y touch x y
hg ci -A -m 1 -d "1000000 0" hg ci -A -m 1
hg update 0 hg update 0
touch x y touch x y
hg ci -A -m 2 -d "1000000 0" hg ci -A -m 2
hg merge 1 hg merge 1
hg ci -A -m m1 -d "1000000 0" hg ci -A -m m1
#hg log #hg log
#hg debugindex .hg/store/00manifest.i #hg debugindex .hg/store/00manifest.i
hg update -C 1 hg update -C 1
hg merge 2 hg merge 2
hg ci -A -m m2 -d "1000000 0" hg ci -A -m m2
#hg log #hg log
#hg debugindex .hg/store/00manifest.i #hg debugindex .hg/store/00manifest.i

View File

@ -27,41 +27,41 @@ updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
comparing with b comparing with b
searching for changes searching for changes
changeset: 4:fdb3c546e859 changeset: 4:119caaef4ed1
tag: tip tag: tip
parent: 1:1f703b3fcbc6 parent: 1:79f9e10cd04e
parent: 2:de997049e034 parent: 2:8e1bb01c1a24
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: m2 summary: m2
comparing with c comparing with c
searching for changes searching for changes
changeset: 3:f40f830c0024 changeset: 3:cbb48b367d1b
parent: 2:de997049e034 parent: 2:8e1bb01c1a24
parent: 1:1f703b3fcbc6 parent: 1:79f9e10cd04e
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: m1 summary: m1
comparing with c comparing with c
searching for changes searching for changes
changeset: 3:f40f830c0024 changeset: 3:cbb48b367d1b
tag: tip tag: tip
parent: 2:de997049e034 parent: 2:8e1bb01c1a24
parent: 1:1f703b3fcbc6 parent: 1:79f9e10cd04e
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: m1 summary: m1
comparing with b comparing with b
searching for changes searching for changes
changeset: 3:fdb3c546e859 changeset: 3:119caaef4ed1
tag: tip tag: tip
parent: 1:1f703b3fcbc6 parent: 1:79f9e10cd04e
parent: 2:de997049e034 parent: 2:8e1bb01c1a24
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: m2 summary: m2
pulling from a pulling from a

View File

@ -16,7 +16,7 @@ EOF
echo "this is a test" | gzip > a.gz echo "this is a test" | gzip > a.gz
echo "this is a test" > not.gz echo "this is a test" > not.gz
hg add * hg add *
hg ci -m "test" -d "1000000 0" hg ci -m "test"
echo %% no changes echo %% no changes
hg status hg status
touch * touch *

View File

@ -16,17 +16,17 @@ EOF
echo % should fail with encoding error echo % should fail with encoding error
echo "plain old ascii" > a echo "plain old ascii" > a
hg st hg st
HGENCODING=ascii hg ci -l latin-1 -d "1000000 0" HGENCODING=ascii hg ci -l latin-1
echo % these should work echo % these should work
echo "latin-1" > a echo "latin-1" > a
HGENCODING=latin-1 hg ci -l latin-1 -d "1000000 0" HGENCODING=latin-1 hg ci -l latin-1
echo "utf-8" > a echo "utf-8" > a
HGENCODING=utf-8 hg ci -l utf-8 -d "1000000 0" HGENCODING=utf-8 hg ci -l utf-8
HGENCODING=latin-1 hg tag -d "1000000 0" `cat latin-1-tag` HGENCODING=latin-1 hg tag `cat latin-1-tag`
HGENCODING=latin-1 hg branch `cat latin-1-tag` HGENCODING=latin-1 hg branch `cat latin-1-tag`
HGENCODING=latin-1 hg ci -d "1000000 0" -m 'latin1 branch' HGENCODING=latin-1 hg ci -m 'latin1 branch'
rm .hg/branch rm .hg/branch
echo "% hg log (ascii)" echo "% hg log (ascii)"
@ -58,5 +58,5 @@ HGENCODING=dolphin hg log
HGENCODING=ascii hg branch `cat latin-1-tag` HGENCODING=ascii hg branch `cat latin-1-tag`
cp latin-1-tag .hg/branch cp latin-1-tag .hg/branch
HGENCODING=latin-1 hg ci -d "1000000 0" -m 'should fail' HGENCODING=latin-1 hg ci -m 'should fail'
exit 0 exit 0

View File

@ -78,21 +78,21 @@ hg add $L
echo 'first line(1)' >> s; cp s $S echo 'first line(1)' >> s; cp s $S
echo 'first line(2)' >> m; cp m $M echo 'first line(2)' >> m; cp m $M
echo 'first line(3)' >> l; cp l $L echo 'first line(3)' >> l; cp l $L
hg commit -m 'first commit' -u $S -d "1000000 0" hg commit -m 'first commit' -u $S
#### commit(2) #### commit(2)
echo 'second line(1)' >> s; cp s $S echo 'second line(1)' >> s; cp s $S
echo 'second line(2)' >> m; cp m $M echo 'second line(2)' >> m; cp m $M
echo 'second line(3)' >> l; cp l $L echo 'second line(3)' >> l; cp l $L
hg commit -m 'second commit' -u $M -d "1000000 0" hg commit -m 'second commit' -u $M
#### commit(3) #### commit(3)
echo 'third line(1)' >> s; cp s $S echo 'third line(1)' >> s; cp s $S
echo 'third line(2)' >> m; cp m $M echo 'third line(2)' >> m; cp m $M
echo 'third line(3)' >> l; cp l $L echo 'third line(3)' >> l; cp l $L
hg commit -m 'third commit' -u $L -d "1000000 0" hg commit -m 'third commit' -u $L
#### check #### check
@ -109,11 +109,11 @@ hg diff -c tip --stat
#### add branches/tags #### add branches/tags
hg branch $S hg branch $S
hg tag -d "1000000 0" $S hg tag $S
hg branch $M hg branch $M
hg tag -d "1000000 0" $M hg tag $M
hg branch $L hg branch $L
hg tag -d "1000000 0" $L hg tag $L
#### check #### check

View File

@ -23,12 +23,12 @@ marked working directory as branch 短名
marked working directory as branch MIDDLE_ marked working directory as branch MIDDLE_
marked working directory as branch 長い長い名前 marked working directory as branch 長い長い名前
% check alignment of branches % check alignment of branches
tip 5:afc60d8eed19 tip 5:d745ff46155b
長い長い名前 4:19fe74d09ba0 長い長い名前 4:9259be597f19
MIDDLE_ 3:8a20997d2281 MIDDLE_ 3:b06c5b6def9e
短名 2:0cc06ffa3461 短名 2:64a70663cee8
% check alignment of tags % check alignment of tags
tip 5:afc60d8eed19 tip 5:d745ff46155b
長い長い名前 4:19fe74d09ba0 長い長い名前 4:9259be597f19
MIDDLE_ 3:8a20997d2281 MIDDLE_ 3:b06c5b6def9e
短名 2:0cc06ffa3461 短名 2:64a70663cee8

View File

@ -15,27 +15,27 @@ abort: decoding near ' encoded:
% these should work % these should work
marked working directory as branch é marked working directory as branch é
% hg log (ascii) % hg log (ascii)
changeset: 5:db5520b4645f changeset: 5:093c6077d1c8
branch: ? branch: ?
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: latin1 branch summary: latin1 branch
changeset: 4:9cff3c980b58 changeset: 4:94db611b4196
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag ? for changeset 770b9b11621d summary: Added tag ? for changeset ca661e7520de
changeset: 3:770b9b11621d changeset: 3:ca661e7520de
tag: ? tag: ?
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: utf-8 e' encoded: ? summary: utf-8 e' encoded: ?
changeset: 2:0572af48b948 changeset: 2:650c6f3d55dd
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: latin-1 e' encoded: ? summary: latin-1 e' encoded: ?
changeset: 1:0e5b7e3f9c4a changeset: 1:0e5b7e3f9c4a
@ -49,27 +49,27 @@ date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': ? = u'\xe9' summary: latin-1 e': ? = u'\xe9'
% hg log (latin-1) % hg log (latin-1)
changeset: 5:db5520b4645f changeset: 5:093c6077d1c8
branch: é branch: é
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: latin1 branch summary: latin1 branch
changeset: 4:9cff3c980b58 changeset: 4:94db611b4196
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag é for changeset 770b9b11621d summary: Added tag é for changeset ca661e7520de
changeset: 3:770b9b11621d changeset: 3:ca661e7520de
tag: é tag: é
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: utf-8 e' encoded: é summary: utf-8 e' encoded: é
changeset: 2:0572af48b948 changeset: 2:650c6f3d55dd
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: latin-1 e' encoded: é summary: latin-1 e' encoded: é
changeset: 1:0e5b7e3f9c4a changeset: 1:0e5b7e3f9c4a
@ -83,27 +83,27 @@ date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': é = u'\xe9' summary: latin-1 e': é = u'\xe9'
% hg log (utf-8) % hg log (utf-8)
changeset: 5:db5520b4645f changeset: 5:093c6077d1c8
branch: é branch: é
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: latin1 branch summary: latin1 branch
changeset: 4:9cff3c980b58 changeset: 4:94db611b4196
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag é for changeset 770b9b11621d summary: Added tag é for changeset ca661e7520de
changeset: 3:770b9b11621d changeset: 3:ca661e7520de
tag: é tag: é
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: utf-8 e' encoded: é summary: utf-8 e' encoded: é
changeset: 2:0572af48b948 changeset: 2:650c6f3d55dd
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: latin-1 e' encoded: é summary: latin-1 e' encoded: é
changeset: 1:0e5b7e3f9c4a changeset: 1:0e5b7e3f9c4a
@ -117,45 +117,45 @@ date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': é = u'\xe9' summary: latin-1 e': é = u'\xe9'
% hg tags (ascii) % hg tags (ascii)
tip 5:db5520b4645f tip 5:093c6077d1c8
? 3:770b9b11621d ? 3:ca661e7520de
% hg tags (latin-1) % hg tags (latin-1)
tip 5:db5520b4645f tip 5:093c6077d1c8
é 3:770b9b11621d é 3:ca661e7520de
% hg tags (utf-8) % hg tags (utf-8)
tip 5:db5520b4645f tip 5:093c6077d1c8
é 3:770b9b11621d é 3:ca661e7520de
% hg branches (ascii) % hg branches (ascii)
? 5:db5520b4645f ? 5:093c6077d1c8
default 4:9cff3c980b58 (inactive) default 4:94db611b4196 (inactive)
% hg branches (latin-1) % hg branches (latin-1)
é 5:db5520b4645f é 5:093c6077d1c8
default 4:9cff3c980b58 (inactive) default 4:94db611b4196 (inactive)
% hg branches (utf-8) % hg branches (utf-8)
é 5:db5520b4645f é 5:093c6077d1c8
default 4:9cff3c980b58 (inactive) default 4:94db611b4196 (inactive)
% hg log (utf-8) % hg log (utf-8)
changeset: 5:db5520b4645f changeset: 5:093c6077d1c8
branch: é branch: é
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: latin1 branch summary: latin1 branch
changeset: 4:9cff3c980b58 changeset: 4:94db611b4196
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag é for changeset 770b9b11621d summary: Added tag é for changeset ca661e7520de
changeset: 3:770b9b11621d changeset: 3:ca661e7520de
tag: é tag: é
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: utf-8 e' encoded: é summary: utf-8 e' encoded: é
changeset: 2:0572af48b948 changeset: 2:650c6f3d55dd
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: latin-1 e' encoded: é summary: latin-1 e' encoded: é
changeset: 1:0e5b7e3f9c4a changeset: 1:0e5b7e3f9c4a

View File

@ -4,72 +4,72 @@
$ echo foo > b $ echo foo > b
$ hg add a b $ hg add a b
$ hg ci -m "test" -d "1000000 0" $ hg ci -m "test"
$ echo blah > a $ echo blah > a
$ hg ci -m "branch a" -d "1000000 0" $ hg ci -m "branch a"
$ hg co 0 $ hg co 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo blah > b $ echo blah > b
$ hg ci -m "branch b" -d "1000000 0" $ hg ci -m "branch b"
created new head created new head
$ HGMERGE=true hg merge 1 $ HGMERGE=true hg merge 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg ci -m "merge b/a -> blah" -d "1000000 0" $ hg ci -m "merge b/a -> blah"
$ hg co 1 $ hg co 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ HGMERGE=true hg merge 2 $ HGMERGE=true hg merge 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg ci -m "merge a/b -> blah" -d "1000000 0" $ hg ci -m "merge a/b -> blah"
created new head created new head
$ hg log $ hg log
changeset: 4:f6c172c6198c changeset: 4:2ee31f665a86
tag: tip tag: tip
parent: 1:448a8c5e42f1 parent: 1:96155394af80
parent: 2:7c5dc2e857f2 parent: 2:92cc4c306b19
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: merge a/b -> blah summary: merge a/b -> blah
changeset: 3:13d875a22764 changeset: 3:e16a66a37edd
parent: 2:7c5dc2e857f2 parent: 2:92cc4c306b19
parent: 1:448a8c5e42f1 parent: 1:96155394af80
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: merge b/a -> blah summary: merge b/a -> blah
changeset: 2:7c5dc2e857f2 changeset: 2:92cc4c306b19
parent: 0:dc1751ec2e9d parent: 0:5e0375449e74
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: branch b summary: branch b
changeset: 1:448a8c5e42f1 changeset: 1:96155394af80
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: branch a summary: branch a
changeset: 0:dc1751ec2e9d changeset: 0:5e0375449e74
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: test summary: test
$ hg debugindex .hg/store/00changelog.i $ hg debugindex .hg/store/00changelog.i
rev offset length base linkrev nodeid p1 p2 rev offset length base linkrev nodeid p1 p2
0 0 64 0 0 dc1751ec2e9d 000000000000 000000000000 0 0 60 0 0 5e0375449e74 000000000000 000000000000
1 64 68 1 1 448a8c5e42f1 dc1751ec2e9d 000000000000 1 60 62 1 1 96155394af80 5e0375449e74 000000000000
2 132 68 2 2 7c5dc2e857f2 dc1751ec2e9d 000000000000 2 122 62 2 2 92cc4c306b19 5e0375449e74 000000000000
3 200 75 3 3 13d875a22764 7c5dc2e857f2 448a8c5e42f1 3 184 69 3 3 e16a66a37edd 92cc4c306b19 96155394af80
4 275 29 3 4 f6c172c6198c 448a8c5e42f1 7c5dc2e857f2 4 253 29 3 4 2ee31f665a86 96155394af80 92cc4c306b19
revision 1 revision 1
$ hg manifest --debug 1 $ hg manifest --debug 1

View File

@ -17,7 +17,7 @@ echo 1 > bar
echo 1 > baz echo 1 > baz
echo 1 > quux echo 1 > quux
hg add foo bar baz quux hg add foo bar baz quux
hg commit -m "base" -d "1000000 0" hg commit -m "base"
cd .. cd ..
hg clone a b hg clone a b
@ -26,7 +26,7 @@ echo creating branch a
cd a cd a
echo 2a > foo echo 2a > foo
echo 2a > bar echo 2a > bar
hg commit -m "branch a" -d "1000000 0" hg commit -m "branch a"
echo creating branch b echo creating branch b
@ -34,7 +34,7 @@ cd ..
cd b cd b
echo 2b > foo echo 2b > foo
echo 2b > baz echo 2b > baz
hg commit -m "branch b" -d "1000000 0" hg commit -m "branch b"
echo "we shouldn't have anything but n state here" echo "we shouldn't have anything but n state here"
hg debugstate --nodates | grep -v "^n" hg debugstate --nodates | grep -v "^n"
@ -50,7 +50,7 @@ echo new > quux
echo "we shouldn't have anything but foo in merge state here" echo "we shouldn't have anything but foo in merge state here"
hg debugstate --nodates | grep "^m" hg debugstate --nodates | grep "^m"
hg ci -m "merge" -d "1000000 0" hg ci -m "merge"
echo "main: we should have a merge here" echo "main: we should have a merge here"
hg debugindex .hg/store/00changelog.i hg debugindex .hg/store/00changelog.i

View File

@ -22,17 +22,17 @@ we shouldn't have anything but foo in merge state here
m 644 3 foo m 644 3 foo
main: we should have a merge here main: we should have a merge here
rev offset length base linkrev nodeid p1 p2 rev offset length base linkrev nodeid p1 p2
0 0 77 0 0 c36078bec30d 000000000000 000000000000 0 0 73 0 0 cdca01651b96 000000000000 000000000000
1 77 73 1 1 182b283965f1 c36078bec30d 000000000000 1 73 68 1 1 f6718a9cb7f3 cdca01651b96 000000000000
2 150 71 2 2 a6aef98656b7 c36078bec30d 000000000000 2 141 68 2 2 bdd988058d16 cdca01651b96 000000000000
3 221 72 3 3 0c2cc6fc80e2 182b283965f1 a6aef98656b7 3 209 66 3 3 d8a521142a3c f6718a9cb7f3 bdd988058d16
log should show foo and quux changed log should show foo and quux changed
changeset: 3:0c2cc6fc80e2 changeset: 3:d8a521142a3c
tag: tip tag: tip
parent: 1:182b283965f1 parent: 1:f6718a9cb7f3
parent: 2:a6aef98656b7 parent: 2:bdd988058d16
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: foo quux files: foo quux
description: description:
merge merge

View File

@ -5,7 +5,7 @@
$ hg init $ hg init
$ touch a b $ touch a b
$ hg add a b $ hg add a b
$ hg ci -m "added a b" -d "1000000 0" $ hg ci -m "added a b"
$ cd .. $ cd ..
$ hg clone test1 test3 $ hg clone test1 test3
@ -26,7 +26,7 @@
$ hg co $ hg co
2 files updated, 0 files merged, 0 files removed, 0 files unresolved 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ chmod +x a $ chmod +x a
$ hg ci -m "chmod +x a" -d "1000000 0" $ hg ci -m "chmod +x a"
the changelog should mention file a: the changelog should mention file a:
@ -35,7 +35,7 @@ the changelog should mention file a:
$ cd ../test1 $ cd ../test1
$ echo 123 >>a $ echo 123 >>a
$ hg ci -m "a updated" -d "1000000 0" $ hg ci -m "a updated"
$ hg pull ../test2 $ hg pull ../test2
pulling from ../test2 pulling from ../test2
@ -46,34 +46,34 @@ the changelog should mention file a:
added 1 changesets with 0 changes to 0 files (+1 heads) added 1 changesets with 0 changes to 0 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge) (run 'hg heads' to see heads, 'hg merge' to merge)
$ hg heads $ hg heads
changeset: 2:37dccb76c058 changeset: 2:7f4313b42a34
tag: tip tag: tip
parent: 0:4536b1c2ca69 parent: 0:22a449e20da5
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: chmod +x a summary: chmod +x a
changeset: 1:a187cb361a5a changeset: 1:c6ecefc45368
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: a updated summary: a updated
$ hg history $ hg history
changeset: 2:37dccb76c058 changeset: 2:7f4313b42a34
tag: tip tag: tip
parent: 0:4536b1c2ca69 parent: 0:22a449e20da5
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: chmod +x a summary: chmod +x a
changeset: 1:a187cb361a5a changeset: 1:c6ecefc45368
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: a updated summary: a updated
changeset: 0:4536b1c2ca69 changeset: 0:22a449e20da5
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: added a b summary: added a b
@ -84,7 +84,7 @@ the changelog should mention file a:
$ cd ../test3 $ cd ../test3
$ echo 123 >>b $ echo 123 >>b
$ hg ci -m "b updated" -d "1000000 0" $ hg ci -m "b updated"
$ hg pull ../test2 $ hg pull ../test2
pulling from ../test2 pulling from ../test2
@ -95,34 +95,34 @@ the changelog should mention file a:
added 1 changesets with 0 changes to 0 files (+1 heads) added 1 changesets with 0 changes to 0 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge) (run 'hg heads' to see heads, 'hg merge' to merge)
$ hg heads $ hg heads
changeset: 2:37dccb76c058 changeset: 2:7f4313b42a34
tag: tip tag: tip
parent: 0:4536b1c2ca69 parent: 0:22a449e20da5
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: chmod +x a summary: chmod +x a
changeset: 1:d54568174d8e changeset: 1:dc57ead75f79
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: b updated summary: b updated
$ hg history $ hg history
changeset: 2:37dccb76c058 changeset: 2:7f4313b42a34
tag: tip tag: tip
parent: 0:4536b1c2ca69 parent: 0:22a449e20da5
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: chmod +x a summary: chmod +x a
changeset: 1:d54568174d8e changeset: 1:dc57ead75f79
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: b updated summary: b updated
changeset: 0:4536b1c2ca69 changeset: 0:22a449e20da5
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: added a b summary: added a b

View File

@ -15,12 +15,12 @@
$ echo 'post-cat = python ../printenv.py post-cat' >> .hg/hgrc $ echo 'post-cat = python ../printenv.py post-cat' >> .hg/hgrc
$ echo a > a $ echo a > a
$ hg add a $ hg add a
$ hg commit -m a -d "1000000 0" $ hg commit -m a
precommit hook: HG_PARENT1=0000000000000000000000000000000000000000 precommit hook: HG_PARENT1=0000000000000000000000000000000000000000
pretxncommit hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$HGTMP/test-hook.t/a pretxncommit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$HGTMP/test-hook.t/a
0:29b62aeb769f 0:cb9a9f314b8b
commit hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 commit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
commit.b hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 commit.b hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
$ hg clone . ../b $ hg clone . ../b
updating to branch default updating to branch default
@ -39,31 +39,31 @@
$ cd ../a $ cd ../a
$ echo b >> a $ echo b >> a
$ hg commit -m a1 -d "1 0" $ hg commit -m a1 -d "1 0"
precommit hook: HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
pretxncommit hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PENDING=$HGTMP/test-hook.t/a pretxncommit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$HGTMP/test-hook.t/a
1:b702efe96888 1:ab228980c14d
commit hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b commit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
commit.b hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b commit.b hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
$ hg update -C 0 $ hg update -C 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b > b $ echo b > b
$ hg add b $ hg add b
$ hg commit -m b -d '1 0' $ hg commit -m b -d '1 0'
precommit hook: HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
pretxncommit hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PENDING=$HGTMP/test-hook.t/a pretxncommit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$HGTMP/test-hook.t/a
2:1324a5531bac 2:ee9deb46ab31
commit hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b commit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
commit.b hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b commit.b hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
created new head created new head
$ hg merge 1 $ hg merge 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg commit -m merge -d '2 0' $ hg commit -m merge -d '2 0'
precommit hook: HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 precommit hook: HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
pretxncommit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PENDING=$HGTMP/test-hook.t/a pretxncommit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$HGTMP/test-hook.t/a
3:4c52fb2e4022 3:07f3376c1e65
commit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
commit.b hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
# test generic hooks # test generic hooks
@ -78,10 +78,10 @@
$ cd ../b $ cd ../b
$ hg pull ../a $ hg pull ../a
prechangegroup hook: HG_SOURCE=pull HG_URL=file: prechangegroup hook: HG_SOURCE=pull HG_URL=file:
changegroup hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_SOURCE=pull HG_URL=file: changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:
incoming hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_SOURCE=pull HG_URL=file: incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:
incoming hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_SOURCE=pull HG_URL=file: incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file:
incoming hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_SOURCE=pull HG_URL=file: incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file:
pulling from ../a pulling from ../a
searching for changes searching for changes
adding changesets adding changesets
@ -96,27 +96,27 @@
$ echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc $ echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc
$ echo 'tag = unset HG_PARENT1 HG_PARENT2; python ../printenv.py tag' >> .hg/hgrc $ echo 'tag = unset HG_PARENT1 HG_PARENT2; python ../printenv.py tag' >> .hg/hgrc
$ hg tag -d '3 0' a $ hg tag -d '3 0' a
pretag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a pretag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
precommit hook: HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
pretxncommit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PENDING=$HGTMP/test-hook.t/a pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$HGTMP/test-hook.t/a
4:8ea2ef7ad3e8 4:539e4b31b6dc
commit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
commit.b hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
tag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
$ hg tag -l la $ hg tag -l la
pretag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=la pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
tag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=la tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
# pretag hook can forbid tagging # pretag hook can forbid tagging
$ echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc $ echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc
$ hg tag -d '4 0' fa $ hg tag -d '4 0' fa
pretag hook: HG_LOCAL=0 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fa pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
pretag.forbid hook: HG_LOCAL=0 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fa pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
abort: pretag.forbid hook exited with status 1 abort: pretag.forbid hook exited with status 1
$ hg tag -l fla $ hg tag -l fla
pretag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fla pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
pretag.forbid hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fla pretag.forbid hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
abort: pretag.forbid hook exited with status 1 abort: pretag.forbid hook exited with status 1
# pretxncommit hook can see changeset, can roll back txn, changeset # pretxncommit hook can see changeset, can roll back txn, changeset
@ -127,49 +127,49 @@
$ echo z > z $ echo z > z
$ hg add z $ hg add z
$ hg -q tip $ hg -q tip
4:8ea2ef7ad3e8 4:539e4b31b6dc
$ hg commit -m 'fail' -d '4 0' $ hg commit -m 'fail' -d '4 0'
precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
pretxncommit hook: HG_NODE=fad284daf8c032148abaffcd745dafeceefceb61 HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PENDING=$HGTMP/test-hook.t/a pretxncommit hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/a
5:fad284daf8c0 5:6f611f8018c1
5:fad284daf8c0 5:6f611f8018c1
pretxncommit.forbid hook: HG_NODE=fad284daf8c032148abaffcd745dafeceefceb61 HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PENDING=$HGTMP/test-hook.t/a pretxncommit.forbid hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/a
transaction abort! transaction abort!
rollback completed rollback completed
abort: pretxncommit.forbid1 hook exited with status 1 abort: pretxncommit.forbid1 hook exited with status 1
$ hg -q tip $ hg -q tip
4:8ea2ef7ad3e8 4:539e4b31b6dc
# precommit hook can prevent commit # precommit hook can prevent commit
$ echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc $ echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc
$ hg commit -m 'fail' -d '4 0' $ hg commit -m 'fail' -d '4 0'
precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
precommit.forbid hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
abort: precommit.forbid hook exited with status 1 abort: precommit.forbid hook exited with status 1
$ hg -q tip $ hg -q tip
4:8ea2ef7ad3e8 4:539e4b31b6dc
# preupdate hook can prevent update # preupdate hook can prevent update
$ echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc $ echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc
$ hg update 1 $ hg update 1
preupdate hook: HG_PARENT1=b702efe96888 preupdate hook: HG_PARENT1=ab228980c14d
0 files updated, 0 files merged, 2 files removed, 0 files unresolved 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
# update hook # update hook
$ echo 'update = python ../printenv.py update' >> .hg/hgrc $ echo 'update = python ../printenv.py update' >> .hg/hgrc
$ hg update $ hg update
preupdate hook: HG_PARENT1=8ea2ef7ad3e8 preupdate hook: HG_PARENT1=539e4b31b6dc
update hook: HG_ERROR=0 HG_PARENT1=8ea2ef7ad3e8 update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc
2 files updated, 0 files merged, 0 files removed, 0 files unresolved 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
# prechangegroup hook can prevent incoming changes # prechangegroup hook can prevent incoming changes
$ cd ../b $ cd ../b
$ hg -q tip $ hg -q tip
3:4c52fb2e4022 3:07f3376c1e65
$ echo '[hooks]' > .hg/hgrc $ echo '[hooks]' > .hg/hgrc
$ echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc $ echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc
$ hg pull ../a $ hg pull ../a
@ -185,8 +185,8 @@
$ echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc $ echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc
$ echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc $ echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc
$ hg pull ../a $ hg pull ../a
4:8ea2ef7ad3e8 4:539e4b31b6dc
pretxnchangegroup.forbid hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PENDING=$HGTMP/test-hook.t/b HG_SOURCE=pull HG_URL=file: pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/b HG_SOURCE=pull HG_URL=file:
pulling from ../a pulling from ../a
searching for changes searching for changes
adding changesets adding changesets
@ -197,7 +197,7 @@
rollback completed rollback completed
abort: pretxnchangegroup.forbid1 hook exited with status 1 abort: pretxnchangegroup.forbid1 hook exited with status 1
$ hg -q tip $ hg -q tip
3:4c52fb2e4022 3:07f3376c1e65
# outgoing hooks can see env vars # outgoing hooks can see env vars
@ -207,7 +207,7 @@
$ echo 'outgoing = python ../printenv.py outgoing' >> ../a/.hg/hgrc $ echo 'outgoing = python ../printenv.py outgoing' >> ../a/.hg/hgrc
$ hg pull ../a $ hg pull ../a
preoutgoing hook: HG_SOURCE=pull preoutgoing hook: HG_SOURCE=pull
outgoing hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_SOURCE=pull outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull
pulling from ../a pulling from ../a
searching for changes searching for changes
adding changesets adding changesets
@ -441,7 +441,7 @@
$ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc $ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc
$ echo a >> a $ echo a >> a
$ hg --traceback commit -d '0 0' -ma 2>&1 | egrep '^(exception|Traceback|ImportError)' $ hg --traceback commit -ma 2>&1 | egrep '^(exception|Traceback|ImportError)'
exception from first failed import attempt: exception from first failed import attempt:
Traceback (most recent call last): Traceback (most recent call last):
ImportError: No module named somebogusmodule ImportError: No module named somebogusmodule
@ -456,10 +456,10 @@
$ echo 'commit = hg id' >> .hg/hgrc $ echo 'commit = hg id' >> .hg/hgrc
$ echo 'update = hg id' >> .hg/hgrc $ echo 'update = hg id' >> .hg/hgrc
$ echo bb > a $ echo bb > a
$ hg ci -d '0 0' -ma $ hg ci -ma
8da618c33484 tip 223eafe2750c tip
$ hg up 0 $ hg up 0
29b62aeb769f cb9a9f314b8b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ exit 0 $ exit 0

View File

@ -3,7 +3,7 @@
$ hg init $ hg init
$ for i in 0 1 2 3 4 5 6 7 8; do $ for i in 0 1 2 3 4 5 6 7 8; do
> echo $i >> foo > echo $i >> foo
> hg commit -A -m $i -d "1000000 0" > hg commit -A -m $i
> done > done
adding foo adding foo
$ hg verify $ hg verify
@ -22,78 +22,78 @@ http incoming
$ hg -R new incoming http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," $ hg -R new incoming http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
comparing with http://localhost:$HGPORT/ comparing with http://localhost:$HGPORT/
changeset: 0:9cb21d99fe27 changeset: 0:00a43fa82f62
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0 summary: 0
changeset: 1:d717f5dfad6a changeset: 1:5460a410df01
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
changeset: 2:c0d6b86da426 changeset: 2:d9f42cd1a1ec
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
changeset: 3:dfacbd43b3fe changeset: 3:376476025137
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 3 summary: 3
changeset: 4:1f3a964b6022 changeset: 4:70d7eb252d49
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 4 summary: 4
changeset: 5:c028bcc7a28a changeset: 5:ad284ee3b5ee
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 5 summary: 5
changeset: 6:a0c0095f3389 changeset: 6:e9229f2de384
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 6 summary: 6
changeset: 7:d4be65f4e891 changeset: 7:d152815bb8db
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 7 summary: 7
changeset: 8:92b83e334ef8 changeset: 8:e4feb4ac9035
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 8 summary: 8
$ hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," $ hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
comparing with http://localhost:$HGPORT/ comparing with http://localhost:$HGPORT/
changeset: 0:9cb21d99fe27 changeset: 0:00a43fa82f62
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0 summary: 0
changeset: 1:d717f5dfad6a changeset: 1:5460a410df01
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
changeset: 2:c0d6b86da426 changeset: 2:d9f42cd1a1ec
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
changeset: 3:dfacbd43b3fe changeset: 3:376476025137
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 3 summary: 3
changeset: 4:1f3a964b6022 changeset: 4:70d7eb252d49
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 4 summary: 4
@ -101,77 +101,77 @@ local incoming
$ hg -R new incoming test $ hg -R new incoming test
comparing with test comparing with test
changeset: 0:9cb21d99fe27 changeset: 0:00a43fa82f62
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0 summary: 0
changeset: 1:d717f5dfad6a changeset: 1:5460a410df01
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
changeset: 2:c0d6b86da426 changeset: 2:d9f42cd1a1ec
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
changeset: 3:dfacbd43b3fe changeset: 3:376476025137
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 3 summary: 3
changeset: 4:1f3a964b6022 changeset: 4:70d7eb252d49
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 4 summary: 4
changeset: 5:c028bcc7a28a changeset: 5:ad284ee3b5ee
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 5 summary: 5
changeset: 6:a0c0095f3389 changeset: 6:e9229f2de384
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 6 summary: 6
changeset: 7:d4be65f4e891 changeset: 7:d152815bb8db
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 7 summary: 7
changeset: 8:92b83e334ef8 changeset: 8:e4feb4ac9035
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 8 summary: 8
$ hg -R new incoming -r 4 test $ hg -R new incoming -r 4 test
comparing with test comparing with test
changeset: 0:9cb21d99fe27 changeset: 0:00a43fa82f62
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0 summary: 0
changeset: 1:d717f5dfad6a changeset: 1:5460a410df01
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
changeset: 2:c0d6b86da426 changeset: 2:d9f42cd1a1ec
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
changeset: 3:dfacbd43b3fe changeset: 3:376476025137
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 3 summary: 3
changeset: 4:1f3a964b6022 changeset: 4:70d7eb252d49
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 4 summary: 4
@ -179,14 +179,14 @@ limit to 2 changesets
$ hg -R new incoming -l 2 test $ hg -R new incoming -l 2 test
comparing with test comparing with test
changeset: 0:9cb21d99fe27 changeset: 0:00a43fa82f62
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0 summary: 0
changeset: 1:d717f5dfad6a changeset: 1:5460a410df01
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
@ -194,9 +194,9 @@ limit to 2 changesets, test with -p --git
$ hg -R new incoming -l 2 -p --git test $ hg -R new incoming -l 2 -p --git test
comparing with test comparing with test
changeset: 0:9cb21d99fe27 changeset: 0:00a43fa82f62
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0 summary: 0
diff --git a/foo b/foo diff --git a/foo b/foo
@ -206,9 +206,9 @@ limit to 2 changesets, test with -p --git
@@ -0,0 +1,1 @@ @@ -0,0 +1,1 @@
+0 +0
changeset: 1:d717f5dfad6a changeset: 1:5460a410df01
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
diff --git a/foo b/foo diff --git a/foo b/foo
@ -223,98 +223,98 @@ test with --bundle
$ hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," $ hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
comparing with http://localhost:$HGPORT/ comparing with http://localhost:$HGPORT/
changeset: 0:9cb21d99fe27 changeset: 0:00a43fa82f62
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0 summary: 0
changeset: 1:d717f5dfad6a changeset: 1:5460a410df01
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
changeset: 2:c0d6b86da426 changeset: 2:d9f42cd1a1ec
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
changeset: 3:dfacbd43b3fe changeset: 3:376476025137
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 3 summary: 3
changeset: 4:1f3a964b6022 changeset: 4:70d7eb252d49
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 4 summary: 4
changeset: 5:c028bcc7a28a changeset: 5:ad284ee3b5ee
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 5 summary: 5
changeset: 6:a0c0095f3389 changeset: 6:e9229f2de384
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 6 summary: 6
changeset: 7:d4be65f4e891 changeset: 7:d152815bb8db
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 7 summary: 7
changeset: 8:92b83e334ef8 changeset: 8:e4feb4ac9035
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 8 summary: 8
$ hg -R new incoming --bundle test2.hg test $ hg -R new incoming --bundle test2.hg test
comparing with test comparing with test
changeset: 0:9cb21d99fe27 changeset: 0:00a43fa82f62
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 0 summary: 0
changeset: 1:d717f5dfad6a changeset: 1:5460a410df01
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
changeset: 2:c0d6b86da426 changeset: 2:d9f42cd1a1ec
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
changeset: 3:dfacbd43b3fe changeset: 3:376476025137
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 3 summary: 3
changeset: 4:1f3a964b6022 changeset: 4:70d7eb252d49
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 4 summary: 4
changeset: 5:c028bcc7a28a changeset: 5:ad284ee3b5ee
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 5 summary: 5
changeset: 6:a0c0095f3389 changeset: 6:e9229f2de384
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 6 summary: 6
changeset: 7:d4be65f4e891 changeset: 7:d152815bb8db
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 7 summary: 7
changeset: 8:92b83e334ef8 changeset: 8:e4feb4ac9035
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 8 summary: 8
@ -336,17 +336,17 @@ test the resulting bundles
added 9 changesets with 9 changes to 1 files added 9 changesets with 9 changes to 1 files
(run 'hg update' to get a working copy) (run 'hg update' to get a working copy)
$ hg -R temp tip $ hg -R temp tip
changeset: 8:92b83e334ef8 changeset: 8:e4feb4ac9035
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 8 summary: 8
$ hg -R temp2 tip $ hg -R temp2 tip
changeset: 8:92b83e334ef8 changeset: 8:e4feb4ac9035
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 8 summary: 8
@ -360,7 +360,7 @@ test outgoing
$ cd test-dev $ cd test-dev
$ for i in 9 10 11 12 13; do $ for i in 9 10 11 12 13; do
> echo $i >> foo > echo $i >> foo
> hg commit -A -m $i -d "1000000 0" > hg commit -A -m $i
> done > done
$ hg verify $ hg verify
checking changesets checking changesets
@ -372,30 +372,30 @@ test outgoing
$ hg -R test-dev outgoing test $ hg -R test-dev outgoing test
comparing with test comparing with test
searching for changes searching for changes
changeset: 9:3741c3ad1096 changeset: 9:d89d4abea5bc
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 9 summary: 9
changeset: 10:de4143c8d9a5 changeset: 10:820095aa7158
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 10 summary: 10
changeset: 11:0e1c188b9a7a changeset: 11:09ede2f3a638
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 11 summary: 11
changeset: 12:251354d0fdd3 changeset: 12:e576b1bed305
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 12 summary: 12
changeset: 13:bdaadd969642 changeset: 13:96bbff09a7cc
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 13 summary: 13
@ -404,65 +404,65 @@ limit to 3 changesets
$ hg -R test-dev outgoing -l 3 test $ hg -R test-dev outgoing -l 3 test
comparing with test comparing with test
searching for changes searching for changes
changeset: 9:3741c3ad1096 changeset: 9:d89d4abea5bc
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 9 summary: 9
changeset: 10:de4143c8d9a5 changeset: 10:820095aa7158
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 10 summary: 10
changeset: 11:0e1c188b9a7a changeset: 11:09ede2f3a638
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 11 summary: 11
$ hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," $ hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
comparing with http://localhost:$HGPORT/ comparing with http://localhost:$HGPORT/
searching for changes searching for changes
changeset: 9:3741c3ad1096 changeset: 9:d89d4abea5bc
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 9 summary: 9
changeset: 10:de4143c8d9a5 changeset: 10:820095aa7158
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 10 summary: 10
changeset: 11:0e1c188b9a7a changeset: 11:09ede2f3a638
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 11 summary: 11
changeset: 12:251354d0fdd3 changeset: 12:e576b1bed305
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 12 summary: 12
changeset: 13:bdaadd969642 changeset: 13:96bbff09a7cc
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 13 summary: 13
$ hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," $ hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
comparing with http://localhost:$HGPORT/ comparing with http://localhost:$HGPORT/
searching for changes searching for changes
changeset: 9:3741c3ad1096 changeset: 9:d89d4abea5bc
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 9 summary: 9
changeset: 10:de4143c8d9a5 changeset: 10:820095aa7158
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 10 summary: 10
changeset: 11:0e1c188b9a7a changeset: 11:09ede2f3a638
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 11 summary: 11

View File

@ -43,7 +43,7 @@ creating 'local'
store store
fncache fncache
$ echo this > local/foo $ echo this > local/foo
$ hg ci --cwd local -A -m "init" -d "1000000 0" $ hg ci --cwd local -A -m "init"
adding foo adding foo
creating repo with format.usestore=false creating repo with format.usestore=false
@ -71,10 +71,10 @@ init+push to remote2
$ hg init -e "python ./dummyssh" ssh://user@dummy/remote2 $ hg init -e "python ./dummyssh" ssh://user@dummy/remote2
$ hg incoming -R remote2 local $ hg incoming -R remote2 local
comparing with local comparing with local
changeset: 0:c4e059d443be changeset: 0:08b9e9f63b32
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: init summary: init
@ -121,11 +121,11 @@ output of dummyssh
comparing repositories comparing repositories
$ hg tip -q -R local $ hg tip -q -R local
0:c4e059d443be 0:08b9e9f63b32
$ hg tip -q -R remote1 $ hg tip -q -R remote1
0:c4e059d443be 0:08b9e9f63b32
$ hg tip -q -R remote2 $ hg tip -q -R remote2
0:c4e059d443be 0:08b9e9f63b32
check names for repositories (clashes with URL schemes, special chars) check names for repositories (clashes with URL schemes, special chars)

View File

@ -6,15 +6,15 @@ cd t
hg init hg init
mkdir src mkdir src
echo a > src/a.c echo a > src/a.c
hg ci -Ama -d "10000000 0" hg ci -Ama
hg mv src source hg mv src source
hg ci -Ammove -d "1000000 0" hg ci -Ammove
hg co -C 0 hg co -C 0
echo new > src/a.c echo new > src/a.c
echo compiled > src/a.o echo compiled > src/a.o
hg ci -mupdate -d "1000000 0" hg ci -mupdate
hg st hg st

View File

@ -4,15 +4,15 @@ mkdir t
cd t cd t
hg init hg init
echo a > a echo a > a
hg ci -Ama -d '1000000000 0' hg ci -Ama
echo b > b echo b > b
hg branch b hg branch b
hg ci -Amb -d '1000000000 0' hg ci -Amb
hg co -C 0 hg co -C 0
echo fast-forward echo fast-forward
hg merge b hg merge b
hg ci -Ammerge -d '1000000000 0' hg ci -Ammerge
echo bogus fast-forward should fail echo bogus fast-forward should fail
hg merge b hg merge b

View File

@ -21,13 +21,13 @@ echo 0 > t/b
echo 0 > t/e.h echo 0 > t/e.h
mkdir dir.h mkdir dir.h
echo 0 > dir.h/foo echo 0 > dir.h/foo
hg ci -A -m m -d "1000000 0" hg ci -A -m m
touch nottracked touch nottracked
hglocate a && echo locate succeeded || echo locate failed hglocate a && echo locate succeeded || echo locate failed
hglocate NONEXISTENT && echo locate succeeded || echo locate failed hglocate NONEXISTENT && echo locate succeeded || echo locate failed
hglocate hglocate
hg rm a hg rm a
hg ci -m m -d "1000000 0" hg ci -m m
hglocate a hglocate a
hglocate NONEXISTENT hglocate NONEXISTENT
hglocate relpath:NONEXISTENT hglocate relpath:NONEXISTENT

View File

@ -1,5 +1,5 @@
$ hgcommit() { $ hgcommit() {
> hg commit -u user -d '0 0' "$@" > hg commit -u user "$@"
> } > }
$ hg init clhead $ hg init clhead

View File

@ -11,18 +11,18 @@ echo "# initial file contents"
echo "line 1" > f echo "line 1" > f
echo "line 2" >> f echo "line 2" >> f
echo "line 3" >> f echo "line 3" >> f
hg commit -Am "revision 0" -d "1000000 0" hg commit -Am "revision 0"
cat f cat f
echo "# branch 1: editing line 1" echo "# branch 1: editing line 1"
sed 's/line 1/first line/' f > f.new sed 's/line 1/first line/' f > f.new
mv f.new f mv f.new f
hg commit -Am "edited first line" -d "1000000 0" hg commit -Am "edited first line"
echo "# branch 2: editing line 3" echo "# branch 2: editing line 3"
hg update 0 hg update 0
sed 's/line 3/third line/' f > f.new sed 's/line 3/third line/' f > f.new
mv f.new f mv f.new f
hg commit -Am "edited third line" -d "1000000 0" hg commit -Am "edited third line"
echo "# merge using internal:fail tool" echo "# merge using internal:fail tool"
echo "[merge-patterns]" > .hg/hgrc echo "[merge-patterns]" > .hg/hgrc

View File

@ -11,7 +11,7 @@ for i in 1 2 3 4 5 6 7 8 9; do
echo "merge ok $i" >> zzz1_merge_ok echo "merge ok $i" >> zzz1_merge_ok
done done
echo "merge bad" > zzz2_merge_bad echo "merge bad" > zzz2_merge_bad
hg ci -Am "revision 0" -d "1000000 0" hg ci -Am "revision 0"
echo "# revision 1" echo "# revision 1"
hg rm remove hg rm remove
@ -22,7 +22,7 @@ hg add added
echo "new first line" > zzz1_merge_ok echo "new first line" > zzz1_merge_ok
hg cat zzz1_merge_ok >> zzz1_merge_ok hg cat zzz1_merge_ok >> zzz1_merge_ok
echo "new last line" >> zzz2_merge_bad echo "new last line" >> zzz2_merge_bad
hg ci -m "revision 1" -d "1000000 0" hg ci -m "revision 1"
echo "# local changes to revision 0" echo "# local changes to revision 0"
hg co 0 hg co 0

View File

@ -6,9 +6,9 @@ hg init
echo "added file1" > file1 echo "added file1" > file1
echo "added file2" > file2 echo "added file2" > file2
hg add file1 file2 hg add file1 file2
hg commit -m "added file1 and file2" -d "1000000 0" -u user hg commit -m "added file1 and file2"
echo "changed file1" >> file1 echo "changed file1" >> file1
hg commit -m "changed file1" -d "1000000 0" -u user hg commit -m "changed file1"
hg -q log hg -q log
hg id hg id
hg update -C 0 hg update -C 0

View File

@ -1,23 +1,23 @@
1:016807e6fdaf 1:08a16e8e4408
0:eb43f19ff115 0:d29c767a4b52
016807e6fdaf tip 08a16e8e4408 tip
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
eb43f19ff115 d29c767a4b52
eb43f19ff115+ d29c767a4b52+
reverting file1 reverting file1
? file1.orig ? file1.orig
eb43f19ff115 d29c767a4b52
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
? file1.orig ? file1.orig
016807e6fdaf tip 08a16e8e4408 tip
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
? file1.orig ? file1.orig
016807e6fdaf tip 08a16e8e4408 tip
? file1.orig ? file1.orig
016807e6fdaf tip 08a16e8e4408 tip
? file1.orig ? file1.orig
016807e6fdaf tip 08a16e8e4408 tip
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
? file1.orig ? file1.orig
016807e6fdaf tip 08a16e8e4408 tip

View File

@ -7,9 +7,9 @@ echo "added file1" > file1
echo "another line of text" >> file1 echo "another line of text" >> file1
echo "added file2" > file2 echo "added file2" > file2
hg add file1 file2 hg add file1 file2
hg commit -m "added file1 and file2" -d "1000000 0" -u user hg commit -m "added file1 and file2"
echo "changed file1" >> file1 echo "changed file1" >> file1
hg commit -m "changed file1" -d "1000000 0" -u user hg commit -m "changed file1"
hg -q log hg -q log
hg id hg id
hg update -C 0 hg update -C 0

View File

@ -1,20 +1,20 @@
1:f248da0d4c3e 1:dfab7f3c2efb
0:9eca13a34789 0:c3fa057dd86f
f248da0d4c3e tip dfab7f3c2efb tip
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9eca13a34789 c3fa057dd86f
9eca13a34789+ c3fa057dd86f+
reverting file1 reverting file1
9eca13a34789 c3fa057dd86f
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f248da0d4c3e tip dfab7f3c2efb tip
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
merging file1 merging file1
warning: conflicts during merge. warning: conflicts during merge.
merging file1 failed! merging file1 failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges use 'hg resolve' to retry unresolved file merges
diff -r f248da0d4c3e file1 diff -r dfab7f3c2efb file1
--- a/file1 --- a/file1
+++ b/file1 +++ b/file1
@@ -1,3 +1,7 @@ @@ -1,3 +1,7 @@
@ -27,12 +27,12 @@ diff -r f248da0d4c3e file1
+>>>>>>> other +>>>>>>> other
M file1 M file1
? file1.orig ? file1.orig
f248da0d4c3e+ tip dfab7f3c2efb+ tip
reverting file1 reverting file1
? file1.orig ? file1.orig
f248da0d4c3e tip dfab7f3c2efb tip
? file1.orig ? file1.orig
f248da0d4c3e tip dfab7f3c2efb tip
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
? file1.orig ? file1.orig
f248da0d4c3e tip dfab7f3c2efb tip

View File

@ -9,23 +9,23 @@ hg init
echo "# revision 0" echo "# revision 0"
echo "revision 0" > f echo "revision 0" > f
echo "space" >> f echo "space" >> f
hg commit -Am "revision 0" -d "1000000 0" hg commit -Am "revision 0"
echo "# revision 1" echo "# revision 1"
echo "revision 1" > f echo "revision 1" > f
echo "space" >> f echo "space" >> f
hg commit -Am "revision 1" -d "1000000 0" hg commit -Am "revision 1"
hg update 0 > /dev/null hg update 0 > /dev/null
echo "# revision 2" echo "# revision 2"
echo "revision 2" > f echo "revision 2" > f
echo "space" >> f echo "space" >> f
hg commit -Am "revision 2" -d "1000000 0" hg commit -Am "revision 2"
hg update 0 > /dev/null hg update 0 > /dev/null
echo "# revision 3 - simple to merge" echo "# revision 3 - simple to merge"
echo "revision 3" >> f echo "revision 3" >> f
hg commit -Am "revision 3" -d "1000000 0" hg commit -Am "revision 3"
echo "[merge-tools]" > .hg/hgrc echo "[merge-tools]" > .hg/hgrc

View File

@ -17,30 +17,30 @@
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ hg update 0 $ hg update 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo This is file c1 > c $ echo This is file c1 > c
$ hg add c $ hg add c
$ hg commit -m "commit #2" -d "1000000 0" $ hg commit -m "commit #2"
created new head created new head
$ echo This is file b1 > b $ echo This is file b1 > b
no merges expected no merges expected
$ hg merge -P 1 $ hg merge -P 1
changeset: 1:4ee19afe4659 changeset: 1:b8bb4a988f25
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: commit #1 summary: commit #1
$ hg merge 1 $ hg merge 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg diff --nodates $ hg diff --nodates
diff -r d9e5953b9dec b diff -r 49035e18a8e6 b
--- /dev/null --- /dev/null
+++ b/b +++ b/b
@@ -0,0 +1,1 @@ @@ -0,0 +1,1 @@
@ -54,16 +54,16 @@ no merges expected
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ hg update 0 $ hg update 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo This is file c1 > c $ echo This is file c1 > c
$ hg add c $ hg add c
$ hg commit -m "commit #2" -d "1000000 0" $ hg commit -m "commit #2"
created new head created new head
$ echo This is file b2 > b $ echo This is file b2 > b
merge should fail merge should fail
@ -76,7 +76,7 @@ merge of b expected
0 files updated, 1 files merged, 0 files removed, 0 files unresolved 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg diff --nodates $ hg diff --nodates
diff -r d9e5953b9dec b diff -r 49035e18a8e6 b
--- /dev/null --- /dev/null
+++ b/b +++ b/b
@@ -0,0 +1,1 @@ @@ -0,0 +1,1 @@
@ -90,17 +90,17 @@ merge of b expected
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ echo This is file b22 > b $ echo This is file b22 > b
$ hg commit -m "commit #2" -d "1000000 0" $ hg commit -m "commit #2"
$ hg update 1 $ hg update 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo This is file c1 > c $ echo This is file c1 > c
$ hg add c $ hg add c
$ hg commit -m "commit #3" -d "1000000 0" $ hg commit -m "commit #3"
created new head created new head
Contents of b should be "this is file b1" Contents of b should be "this is file b1"
@ -117,7 +117,7 @@ merge fails
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg diff --nodates $ hg diff --nodates
diff -r c1dd73cbf59f b diff -r 85de557015a8 b
--- a/b --- a/b
+++ b/b +++ b/b
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@
@ -132,17 +132,17 @@ merge fails
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ echo This is file b22 > b $ echo This is file b22 > b
$ hg commit -m "commit #2" -d "1000000 0" $ hg commit -m "commit #2"
$ hg update 1 $ hg update 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo This is file c1 > c $ echo This is file c1 > c
$ hg add c $ hg add c
$ hg commit -m "commit #3" -d "1000000 0" $ hg commit -m "commit #3"
created new head created new head
$ echo This is file b33 > b $ echo This is file b33 > b
merge of b should fail merge of b should fail
@ -155,7 +155,7 @@ merge of b expected
0 files updated, 1 files merged, 0 files removed, 0 files unresolved 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg diff --nodates $ hg diff --nodates
diff -r c1dd73cbf59f b diff -r 85de557015a8 b
--- a/b --- a/b
+++ b/b +++ b/b
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@

View File

@ -7,7 +7,7 @@ but then local changes are added in the same directory)
$ mkdir -p testdir $ mkdir -p testdir
$ echo a > testdir/a $ echo a > testdir/a
$ hg add testdir/a $ hg add testdir/a
$ hg commit -d '1000000 0' -m a $ hg commit -m a
$ cd .. $ cd ..
$ hg clone a b $ hg clone a b
@ -15,17 +15,17 @@ but then local changes are added in the same directory)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd a $ cd a
$ echo alpha > testdir/a $ echo alpha > testdir/a
$ hg commit -d '1000000 0' -m remote-change $ hg commit -m remote-change
$ cd .. $ cd ..
$ cd b $ cd b
$ mkdir testdir/subdir $ mkdir testdir/subdir
$ hg mv testdir/a testdir/subdir/a $ hg mv testdir/a testdir/subdir/a
$ hg commit -d '1000000 0' -m move $ hg commit -m move
$ mkdir newdir $ mkdir newdir
$ echo beta > newdir/beta $ echo beta > newdir/beta
$ hg add newdir/beta $ hg add newdir/beta
$ hg commit -d '1000000 0' -m local-addition $ hg commit -m local-addition
$ hg pull ../a $ hg pull ../a
pulling from ../a pulling from ../a
searching for changes searching for changes
@ -43,7 +43,7 @@ but then local changes are added in the same directory)
$ hg stat $ hg stat
M testdir/subdir/a M testdir/subdir/a
$ hg diff --nodates $ hg diff --nodates
diff -r f7459795031e testdir/subdir/a diff -r bc21c9773bfa testdir/subdir/a
--- a/testdir/subdir/a --- a/testdir/subdir/a
+++ b/testdir/subdir/a +++ b/testdir/subdir/a
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@

View File

@ -3,16 +3,16 @@
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ rm b $ rm b
$ hg update 0 $ hg update 0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo This is file b2 > b $ echo This is file b2 > b
$ hg add b $ hg add b
$ hg commit -m "commit #2" -d "1000000 0" $ hg commit -m "commit #2"
created new head created new head
$ cd ..; rm -r t $ cd ..; rm -r t
@ -21,15 +21,15 @@
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ rm b $ rm b
$ hg update 0 $ hg update 0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo This is file b2 > b $ echo This is file b2 > b
$ hg commit -A -m "commit #2" -d "1000000 0" $ hg commit -A -m "commit #2"
adding b adding b
created new head created new head
$ cd ..; rm -r t $ cd ..; rm -r t
@ -39,15 +39,15 @@
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ rm b $ rm b
$ hg remove b $ hg remove b
$ hg update 0 $ hg update 0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo This is file b2 > b $ echo This is file b2 > b
$ hg commit -A -m "commit #2" -d "1000000 0" $ hg commit -A -m "commit #2"
adding b adding b
created new head created new head

View File

@ -1,20 +1,20 @@
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ echo This is file b1 > b $ echo This is file b1 > b
$ hg add b $ hg add b
$ hg commit -m "commit #1" -d "1000000 0" $ hg commit -m "commit #1"
$ hg update 0 $ hg update 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo This is file c1 > c $ echo This is file c1 > c
$ hg add c $ hg add c
$ hg commit -m "commit #2" -d "1000000 0" $ hg commit -m "commit #2"
created new head created new head
$ hg merge 1 $ hg merge 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ rm b $ rm b
$ echo This is file c22 > c $ echo This is file c22 > c
$ hg commit -m "commit #3" -d "1000000 0" $ hg commit -m "commit #3"

View File

@ -10,7 +10,7 @@
$ echo This is file foo1 > foo $ echo This is file foo1 > foo
$ echo This is file bar1 > bar $ echo This is file bar1 > bar
$ hg add foo bar $ hg add foo bar
$ hg commit -m "commit text" -d "1000000 0" $ hg commit -m "commit text"
$ cd .. $ cd ..
$ hg clone A1 B1 $ hg clone A1 B1
@ -20,11 +20,11 @@
$ cd A1 $ cd A1
$ rm bar $ rm bar
$ hg remove bar $ hg remove bar
$ hg commit -m "commit test" -d "1000000 0" $ hg commit -m "commit test"
$ cd ../B1 $ cd ../B1
$ echo This is file foo22 > foo $ echo This is file foo22 > foo
$ hg commit -m "commit test" -d "1000000 0" $ hg commit -m "commit test"
$ cd .. $ cd ..
$ hg clone A1 A2 $ hg clone A1 A2
@ -46,7 +46,7 @@
$ hg merge $ hg merge
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg commit -m "commit test" -d "1000000 0" $ hg commit -m "commit test"
bar should remain deleted. bar should remain deleted.
$ hg manifest --debug $ hg manifest --debug
f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo
@ -63,7 +63,7 @@ bar should remain deleted.
$ hg merge $ hg merge
0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg commit -m "commit test" -d "1000000 0" $ hg commit -m "commit test"
bar should remain deleted. bar should remain deleted.
$ hg manifest --debug $ hg manifest --debug
f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo

View File

@ -7,7 +7,7 @@ initial
> 3 > 3
> EOF > EOF
$ hg add test.txt $ hg add test.txt
$ hg commit -m "Initial" -d "1000000 0" $ hg commit -m "Initial"
clone clone
$ cd .. $ cd ..
@ -22,7 +22,7 @@ change test-a
> two > two
> three > three
> EOF > EOF
$ hg commit -m "Numbers as words" -d "1000000 0" $ hg commit -m "Numbers as words"
change test-b change test-b
$ cd ../test-b $ cd ../test-b
@ -31,7 +31,7 @@ change test-b
> 2.5 > 2.5
> 3 > 3
> EOF > EOF
$ hg commit -m "2 -> 2.5" -d "1000000 0" $ hg commit -m "2 -> 2.5"
now pull and merge from test-a now pull and merge from test-a
$ hg pull ../test-a $ hg pull ../test-a
@ -56,7 +56,7 @@ resolve conflict
> EOF > EOF
$ rm -f *.orig $ rm -f *.orig
$ hg resolve -m test.txt $ hg resolve -m test.txt
$ hg commit -m "Merge 1" -d "1000000 0" $ hg commit -m "Merge 1"
change test-a again change test-a again
$ cd ../test-a $ cd ../test-a
@ -65,7 +65,7 @@ change test-a again
> two-point-one > two-point-one
> three > three
> EOF > EOF
$ hg commit -m "two -> two-point-one" -d "1000000 0" $ hg commit -m "two -> two-point-one"
pull and merge from test-a again pull and merge from test-a again
$ cd ../test-b $ cd ../test-b
@ -81,13 +81,13 @@ pull and merge from test-a again
searching for copies back to rev 1 searching for copies back to rev 1
resolving manifests resolving manifests
overwrite None partial False overwrite None partial False
ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360 ancestor 96b70246a118 local 50c3a7e29886+ remote 40d11a4173a8
test.txt: versions differ -> m test.txt: versions differ -> m
preserving test.txt for resolve of test.txt preserving test.txt for resolve of test.txt
updating: test.txt 1/1 files (100.00%) updating: test.txt 1/1 files (100.00%)
picked tool 'internal:merge' for test.txt (binary False symlink False) picked tool 'internal:merge' for test.txt (binary False symlink False)
merging test.txt merging test.txt
my test.txt@451c744aabcc+ other test.txt@a070d41e8360 ancestor test.txt@faaea63e63a9 my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118
warning: conflicts during merge. warning: conflicts during merge.
merging test.txt failed! merging test.txt failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
@ -111,33 +111,33 @@ pull and merge from test-a again
4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000
$ hg log $ hg log
changeset: 4:a070d41e8360 changeset: 4:40d11a4173a8
tag: tip tag: tip
parent: 2:faaea63e63a9 parent: 2:96b70246a118
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: two -> two-point-one summary: two -> two-point-one
changeset: 3:451c744aabcc changeset: 3:50c3a7e29886
parent: 1:e409be6afcc0 parent: 1:d1e159716d41
parent: 2:faaea63e63a9 parent: 2:96b70246a118
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Merge 1 summary: Merge 1
changeset: 2:faaea63e63a9 changeset: 2:96b70246a118
parent: 0:095c92b91f1a parent: 0:b1832b9d912a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Numbers as words summary: Numbers as words
changeset: 1:e409be6afcc0 changeset: 1:d1e159716d41
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 -> 2.5 summary: 2 -> 2.5
changeset: 0:095c92b91f1a changeset: 0:b1832b9d912a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Initial summary: Initial

View File

@ -46,17 +46,17 @@ some regular revisions
$ echo foo > foo $ echo foo > foo
$ hg add foo $ hg add foo
$ echo foo > .hg/branch $ echo foo > .hg/branch
$ hg ci -m 'branch foo' -d '1000000 0' $ hg ci -m 'branch foo'
$ echo bar > bar $ echo bar > bar
$ hg add bar $ hg add bar
$ echo bar > .hg/branch $ echo bar > .hg/branch
$ hg ci -m 'branch bar' -d '1000000 0' $ hg ci -m 'branch bar'
$ show_branch_cache $ show_branch_cache
tip: 1 tip: 1
3f910abad313ff802d3a23a7529433872df9b3ae 1 c229711f16da3d7591f89b1b8d963b79bda22714 1
3f910abad313ff802d3a23a7529433872df9b3ae bar c229711f16da3d7591f89b1b8d963b79bda22714 bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo dc25e3827021582e979f600811852e36cbe57341 foo
add some mq patches add some mq patches
@ -65,9 +65,9 @@ add some mq patches
now at: p1 now at: p1
$ show_branch_cache $ show_branch_cache
tip: 2 tip: 2
3f910abad313ff802d3a23a7529433872df9b3ae 1 c229711f16da3d7591f89b1b8d963b79bda22714 1
3f910abad313ff802d3a23a7529433872df9b3ae bar c229711f16da3d7591f89b1b8d963b79bda22714 bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo dc25e3827021582e979f600811852e36cbe57341 foo
$ hg qnew p2 $ hg qnew p2
$ echo foo > .hg/branch $ echo foo > .hg/branch
@ -75,9 +75,9 @@ add some mq patches
$ hg qrefresh -m 'patch 2' $ hg qrefresh -m 'patch 2'
$ show_branch_cache 1 $ show_branch_cache 1
tip: 3 tip: 3
3f910abad313ff802d3a23a7529433872df9b3ae 1 c229711f16da3d7591f89b1b8d963b79bda22714 1
3f910abad313ff802d3a23a7529433872df9b3ae bar c229711f16da3d7591f89b1b8d963b79bda22714 bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo dc25e3827021582e979f600811852e36cbe57341 foo
branch foo: 3 branch foo: 3
branch bar: 2 branch bar: 2
@ -86,9 +86,9 @@ removing the cache
$ rm $branches $ rm $branches
$ show_branch_cache 1 $ show_branch_cache 1
tip: 3 tip: 3
3f910abad313ff802d3a23a7529433872df9b3ae 1 c229711f16da3d7591f89b1b8d963b79bda22714 1
3f910abad313ff802d3a23a7529433872df9b3ae bar c229711f16da3d7591f89b1b8d963b79bda22714 bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo dc25e3827021582e979f600811852e36cbe57341 foo
branch foo: 3 branch foo: 3
branch bar: 2 branch bar: 2
@ -97,9 +97,9 @@ importing rev 1 (the cache now ends in one of the patches)
$ hg qimport -r 1 -n p0 $ hg qimport -r 1 -n p0
$ show_branch_cache 1 $ show_branch_cache 1
tip: 3 tip: 3
3f910abad313ff802d3a23a7529433872df9b3ae 1 c229711f16da3d7591f89b1b8d963b79bda22714 1
3f910abad313ff802d3a23a7529433872df9b3ae bar c229711f16da3d7591f89b1b8d963b79bda22714 bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo dc25e3827021582e979f600811852e36cbe57341 foo
branch foo: 3 branch foo: 3
branch bar: 2 branch bar: 2
$ hg log -r qbase --template 'qbase: {rev}\n' $ hg log -r qbase --template 'qbase: {rev}\n'
@ -119,6 +119,6 @@ detect an invalid cache
now at: p2 now at: p2
$ show_branch_cache $ show_branch_cache
tip: 3 tip: 3
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff 0 dc25e3827021582e979f600811852e36cbe57341 0
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo dc25e3827021582e979f600811852e36cbe57341 foo

View File

@ -8,16 +8,16 @@ hg branches
echo foo > a echo foo > a
hg add a hg add a
hg ci -m "initial" -d "1000000 0" hg ci -m "initial"
hg branch foo hg branch foo
hg branch hg branch
hg ci -m "add branch name" -d "1000000 0" hg ci -m "add branch name"
hg branch bar hg branch bar
hg ci -m "change branch name" -d "1000000 0" hg ci -m "change branch name"
echo % branch shadowing echo % branch shadowing
hg branch default hg branch default
hg branch -f default hg branch -f default
hg ci -m "clear branch name" -d "1000000 0" hg ci -m "clear branch name"
echo % there should be only one default branch head echo % there should be only one default branch head
hg heads . hg heads .
@ -25,11 +25,11 @@ hg heads .
hg co foo hg co foo
hg branch hg branch
echo bleah > a echo bleah > a
hg ci -m "modify a branch" -d "1000000 0" hg ci -m "modify a branch"
hg merge default hg merge default
hg branch hg branch
hg ci -m "merge" -d "1000000 0" hg ci -m "merge"
hg log hg log
hg branches hg branches
@ -68,11 +68,11 @@ hg up
echo % fastforward merge echo % fastforward merge
hg branch ff hg branch ff
echo ff > ff echo ff > ff
hg ci -Am'fast forward' -d '1000000 0' hg ci -Am'fast forward'
hg up foo hg up foo
hg merge ff hg merge ff
hg branch hg branch
hg commit -m'Merge ff into foo' -d '1000000 0' hg commit -m'Merge ff into foo'
hg parents hg parents
hg manifest hg manifest

View File

@ -6,10 +6,10 @@ abort: a branch of the same name already exists (use 'hg update' to switch to it
marked working directory as branch default marked working directory as branch default
created new head created new head
% there should be only one default branch head % there should be only one default branch head
changeset: 3:bf1bc2f45e83 changeset: 3:9d567d0b51f9
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: clear branch name summary: clear branch name
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@ -17,92 +17,92 @@ foo
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
foo foo
changeset: 5:5f8fb06e083e changeset: 5:dc140083783b
branch: foo branch: foo
tag: tip tag: tip
parent: 4:4909a3732169 parent: 4:98d14f698afe
parent: 3:bf1bc2f45e83 parent: 3:9d567d0b51f9
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: merge summary: merge
changeset: 4:4909a3732169 changeset: 4:98d14f698afe
branch: foo branch: foo
parent: 1:b699b1cec9c2 parent: 1:0079f24813e2
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: modify a branch summary: modify a branch
changeset: 3:bf1bc2f45e83 changeset: 3:9d567d0b51f9
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: clear branch name summary: clear branch name
changeset: 2:67ec16bde7f1 changeset: 2:ed2bbf4e0102
branch: bar branch: bar
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: change branch name summary: change branch name
changeset: 1:b699b1cec9c2 changeset: 1:0079f24813e2
branch: foo branch: foo
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: add branch name summary: add branch name
changeset: 0:be8523e69bf8 changeset: 0:db01e8ea3388
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: initial summary: initial
foo 5:5f8fb06e083e foo 5:dc140083783b
default 3:bf1bc2f45e83 (inactive) default 3:9d567d0b51f9 (inactive)
bar 2:67ec16bde7f1 (inactive) bar 2:ed2bbf4e0102 (inactive)
foo foo
default default
bar bar
% test for invalid branch cache % test for invalid branch cache
rolling back to revision 4 (undo commit) rolling back to revision 4 (undo commit)
changeset: 4:4909a3732169 changeset: 4:98d14f698afe
branch: foo branch: foo
tag: tip tag: tip
parent: 1:b699b1cec9c2 parent: 1:0079f24813e2
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: modify a branch summary: modify a branch
invalidating branch cache (tip differs) invalidating branch cache (tip differs)
changeset: 4:4909a3732169c0c20011c4f4b8fdff4e3d89b23f changeset: 4:98d14f698afeaff8cb612dcf215ce95e639effc3
branch: foo branch: foo
tag: tip tag: tip
parent: 1:b699b1cec9c2966b3700de4fef0dc123cd754c31 parent: 1:0079f24813e2b73a891577c243684c5066347bc8
parent: -1:0000000000000000000000000000000000000000 parent: -1:0000000000000000000000000000000000000000
manifest: 4:d01b250baaa05909152f7ae07d7a649deea0df9a manifest: 4:d01b250baaa05909152f7ae07d7a649deea0df9a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: a files: a
extra: branch=foo extra: branch=foo
description: description:
modify a branch modify a branch
4:4909a3732169 4:98d14f698afe
4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 98d14f698afeaff8cb612dcf215ce95e639effc3 4
bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default 9d567d0b51f9e2068b054e1948e1a927f99b5874 default
4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo 98d14f698afeaff8cb612dcf215ce95e639effc3 foo
67ec16bde7f1575d523313b9bca000f6a6f12dca bar ed2bbf4e01029020711be82ca905283e883f0e11 bar
% push should update the branch cache % push should update the branch cache
% pushing just rev 0 % pushing just rev 0
be8523e69bf892e25817fc97187516b3c0804ae4 0 db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 0
be8523e69bf892e25817fc97187516b3c0804ae4 default db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 default
% pushing everything % pushing everything
4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 98d14f698afeaff8cb612dcf215ce95e639effc3 4
bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default 9d567d0b51f9e2068b054e1948e1a927f99b5874 default
4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo 98d14f698afeaff8cb612dcf215ce95e639effc3 foo
67ec16bde7f1575d523313b9bca000f6a6f12dca bar ed2bbf4e01029020711be82ca905283e883f0e11 bar
% update with no arguments: tipmost revision of the current branch % update with no arguments: tipmost revision of the current branch
bf1bc2f45e83 9d567d0b51f9
4909a3732169 (foo) tip 98d14f698afe (foo) tip
marked working directory as branch foobar marked working directory as branch foobar
abort: branch foobar not found abort: branch foobar not found
% fastforward merge % fastforward merge
@ -112,13 +112,13 @@ adding ff
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
foo foo
changeset: 6:f0c74f92a385 changeset: 6:917eb54e1b4b
branch: foo branch: foo
tag: tip tag: tip
parent: 4:4909a3732169 parent: 4:98d14f698afe
parent: 5:c420d2121b71 parent: 5:6683a60370cb
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Merge ff into foo summary: Merge ff into foo
a a

View File

@ -14,10 +14,10 @@ hg init a
cd a cd a
echo abc > foo echo abc > foo
hg add foo hg add foo
hg commit -m 'add foo' -d '1000000 0' hg commit -m 'add foo'
echo >> foo echo >> foo
hg commit -m 'change foo' -d '1000001 0' hg commit -m 'change foo'
hg log -r 0: hg log -r 0:
cat >> test.py << EOF cat >> test.py << EOF

View File

@ -1,14 +1,14 @@
changeset: 0:9c2cf2b35aa7 changeset: 0:7c31755bf9b5
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: add foo summary: add foo
changeset: 1:3756a9556b89 changeset: 1:26333235a41c
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:41 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: change foo summary: change foo
2 revisions: 2 revisions:
9c2cf2b35aa7 7c31755bf9b5
3756a9556b89 26333235a41c

View File

@ -7,7 +7,7 @@ echo foo > a
echo '% hg add a' echo '% hg add a'
hg add a hg add a
echo '% hg commit' echo '% hg commit'
hg commit -m "1" -d "1000000 0" hg commit -m "1"
echo '% hg verify' echo '% hg verify'
hg verify hg verify
chmod -r .hg/store/data/a.i chmod -r .hg/store/data/a.i
@ -19,7 +19,7 @@ hg verify 2>/dev/null || echo verify failed
chmod -w .hg/store/data/a.i chmod -w .hg/store/data/a.i
echo barber > a echo barber > a
echo '% hg commit' echo '% hg commit'
hg commit -m "2" -d "1000000 0" 2>/dev/null || echo commit failed hg commit -m "2" 2>/dev/null || echo commit failed
chmod -w . chmod -w .
echo '% hg diff' echo '% hg diff'
hg diff --nodates hg diff --nodates

View File

@ -22,7 +22,7 @@ checking files
% hg commit % hg commit
commit failed commit failed
% hg diff % hg diff
diff -r c1fab96507ef a diff -r 2a18120dc1c9 a
--- a/a --- a/a
+++ b/a +++ b/a
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@

View File

@ -5,7 +5,7 @@ cd a
hg init hg init
echo foo > b echo foo > b
hg add b hg add b
hg ci -m "b" -d "1000000 0" hg ci -m "b"
chmod -w .hg/store chmod -w .hg/store

View File

@ -8,7 +8,7 @@ cd a
hg init hg init
echo foo > t1 echo foo > t1
hg add t1 hg add t1
hg commit -m "1" -d "1000000 0" hg commit -m "1"
cd .. cd ..
hg clone a b hg clone a b
@ -16,18 +16,18 @@ hg clone a b
cd a cd a
echo foo > t2 echo foo > t2
hg add t2 hg add t2
hg commit -m "2" -d "1000000 0" hg commit -m "2"
cd ../b cd ../b
echo foo > t3 echo foo > t3
hg add t3 hg add t3
hg commit -m "3" -d "1000000 0" hg commit -m "3"
hg push ../a hg push ../a
hg pull ../a hg pull ../a
hg push ../a hg push ../a
hg merge hg merge
hg commit -m "4" -d "1000000 0" hg commit -m "4"
hg push ../a hg push ../a
cd .. cd ..
@ -35,7 +35,7 @@ hg init c
cd c cd c
for i in 0 1 2; do for i in 0 1 2; do
echo $i >> foo echo $i >> foo
hg ci -Am $i -d "1000000 0" hg ci -Am $i
done done
cd .. cd ..
@ -44,11 +44,11 @@ cd d
for i in 0 1; do for i in 0 1; do
hg co -C $i hg co -C $i
echo d-$i >> foo echo d-$i >> foo
hg ci -m d-$i -d "1000000 0" hg ci -m d-$i
done done
HGMERGE=true hg merge 3 HGMERGE=true hg merge 3
hg ci -m c-d -d "1000000 0" hg ci -m c-d
hg push ../c; echo $? hg push ../c; echo $?
hg push -r 2 ../c; echo $? hg push -r 2 ../c; echo $?
@ -70,16 +70,16 @@ hg init f
cd f cd f
hg -q branch a hg -q branch a
echo 0 > foo echo 0 > foo
hg -q ci -d "1000000 0" -Am 0 hg -q ci -Am 0
echo 1 > foo echo 1 > foo
hg -q ci -d "1000000 0" -m 1 hg -q ci -m 1
hg -q up 0 hg -q up 0
echo 2 > foo echo 2 > foo
hg -q ci -d "1000000 0" -m 2 hg -q ci -m 2
hg -q up 0 hg -q up 0
hg -q branch b hg -q branch b
echo 3 > foo echo 3 > foo
hg -q ci -d "1000000 0" -m 3 hg -q ci -m 3
cd .. cd ..
hg -q clone f g hg -q clone f g
@ -88,18 +88,18 @@ cd g
echo % push on existing branch and new branch echo % push on existing branch and new branch
hg -q up 1 hg -q up 1
echo 4 > foo echo 4 > foo
hg -q ci -d "1000000 0" -m 4 hg -q ci -m 4
hg -q up 0 hg -q up 0
echo 5 > foo echo 5 > foo
hg -q branch c hg -q branch c
hg -q ci -d "1000000 0" -m 5 hg -q ci -m 5
hg push ../f; echo $? hg push ../f; echo $?
hg push -r 4 -r 5 ../f; echo $? hg push -r 4 -r 5 ../f; echo $?
echo % multiple new branches echo % multiple new branches
hg -q branch d hg -q branch d
echo 6 > foo echo 6 > foo
hg -q ci -d "1000000 0" -m 6 hg -q ci -m 6
hg push ../f; echo $? hg push ../f; echo $?
hg push -r 4 -r 6 ../f; echo $? hg push -r 4 -r 6 ../f; echo $?
cd ../g cd ../g
@ -107,41 +107,41 @@ cd ../g
echo % fail on multiple head push echo % fail on multiple head push
hg -q up 1 hg -q up 1
echo 7 > foo echo 7 > foo
hg -q ci -d "1000000 0" -m 7 hg -q ci -m 7
hg push -r 4 -r 7 ../f; echo $? hg push -r 4 -r 7 ../f; echo $?
echo % push replacement head on existing branches echo % push replacement head on existing branches
hg -q up 3 hg -q up 3
echo 8 > foo echo 8 > foo
hg -q ci -d "1000000 0" -m 8 hg -q ci -m 8
hg push -r 7 -r 8 ../f; echo $? hg push -r 7 -r 8 ../f; echo $?
echo % merge of branch a to other branch b followed by unrelated push on branch a echo % merge of branch a to other branch b followed by unrelated push on branch a
hg -q up 7 hg -q up 7
HGMERGE=true hg -q merge 8 HGMERGE=true hg -q merge 8
hg -q ci -d "1000000 0" -m 9 hg -q ci -m 9
hg -q up 8 hg -q up 8
echo 10 > foo echo 10 > foo
hg -q ci -d "1000000 0" -m 10 hg -q ci -m 10
hg push -r 9 ../f; echo $? hg push -r 9 ../f; echo $?
hg push -r 10 ../f; echo $? hg push -r 10 ../f; echo $?
echo % cheating the counting algorithm echo % cheating the counting algorithm
hg -q up 9 hg -q up 9
HGMERGE=true hg -q merge 2 HGMERGE=true hg -q merge 2
hg -q ci -d "1000000 0" -m 11 hg -q ci -m 11
hg -q up 1 hg -q up 1
echo 12 > foo echo 12 > foo
hg -q ci -d "1000000 0" -m 12 hg -q ci -m 12
hg push -r 11 -r 12 ../f; echo $? hg push -r 11 -r 12 ../f; echo $?
echo % failed push of new named branch echo % failed push of new named branch
echo 12 > foo echo 12 > foo
hg -q ci -d "1000000 0" -m 12a hg -q ci -m 12a
hg -q up 11 hg -q up 11
echo 13 > foo echo 13 > foo
hg -q branch e hg -q branch e
hg -q ci -d "1000000 0" -m 13d hg -q ci -m 13d
hg push -r 12 -r 13 ../f; echo $? hg push -r 12 -r 13 ../f; echo $?
echo % using --new-branch to push new named branch echo % using --new-branch to push new named branch
@ -187,26 +187,26 @@ cd l
echo a >> foo echo a >> foo
hg -q add foo hg -q add foo
hg -q branch a hg -q branch a
hg -q ci -d '0 0' -ma hg -q ci -ma
hg -q up null hg -q up null
echo a >> foo echo a >> foo
hg -q add foo hg -q add foo
hg -q branch b hg -q branch b
hg -q ci -d '0 0' -mb hg -q ci -mb
cd .. cd ..
hg -q clone l m -u a hg -q clone l m -u a
cd m cd m
hg -q merge b hg -q merge b
hg -q ci -d '0 0' -mmb hg -q ci -mmb
hg -q up 0 hg -q up 0
echo a >> foo echo a >> foo
hg -q ci -ma2 hg -q ci -ma2
hg -q up 2 hg -q up 2
echo a >> foo echo a >> foo
hg -q branch -f b hg -q branch -f b
hg -q ci -d '0 0' -mb2 hg -q ci -mb2
hg -q merge 3 hg -q merge 3
hg -q ci -d '0 0' -mma hg -q ci -mma
hg push ../l -b b hg push ../l -b b
cd .. cd ..

View File

@ -3,11 +3,11 @@ test that 'hg commit' does not crash if the user removes a newly added file
$ hg init $ hg init
$ echo This is file a1 > a $ echo This is file a1 > a
$ hg add a $ hg add a
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ touch b $ touch b
$ hg add b $ hg add b
$ rm b $ rm b
$ hg commit -A -m"comment #1" -d "1000000 0" $ hg commit -A -m"comment #1"
removing b removing b
nothing changed nothing changed
$ exit 0 $ exit 0

View File

@ -6,13 +6,13 @@
$ echo d1/b > d1/b $ echo d1/b > d1/b
$ echo d2/b > d2/b $ echo d2/b > d2/b
$ hg add d1/a d1/b d1/ba d1/d11/a1 d2/b $ hg add d1/a d1/b d1/ba d1/d11/a1 d2/b
$ hg commit -m "1" -d "1000000 0" $ hg commit -m "1"
rename a single file rename a single file
$ hg rename d1/d11/a1 d2/c $ hg rename d1/d11/a1 d2/c
$ hg sum $ hg sum
parent: 0:6f9914c7a010 tip parent: 0:9b4b6e7b2c26 tip
1 1
branch: default branch: default
commit: 1 renamed commit: 1 renamed

View File

@ -3,7 +3,7 @@
$ hg init $ hg init
$ echo a > a $ echo a > a
$ hg add a $ hg add a
$ hg commit -m test -d "1000000 0" $ hg commit -m test
$ rm .hg/requires $ rm .hg/requires
$ hg tip $ hg tip
abort: index 00changelog.i unknown format 2! abort: index 00changelog.i unknown format 2!

View File

@ -3,11 +3,11 @@
$ touch a $ touch a
$ hg add a $ hg add a
$ hg ci -m "1" -d "1000000 0" $ hg ci -m "1"
$ touch b $ touch b
$ hg add b $ hg add b
$ hg ci -m "2" -d "1000000 0" $ hg ci -m "2"
Should show unknown Should show unknown

View File

@ -4,7 +4,7 @@
$ echo 123 > c $ echo 123 > c
$ echo 123 > e $ echo 123 > e
$ hg add a c e $ hg add a c e
$ hg commit -m "first" -d "1000000 0" a c e $ hg commit -m "first" a c e
$ echo 123 > b $ echo 123 > b
should show b unknown should show b unknown
@ -102,11 +102,11 @@ should say file not managed
should say file not found should say file not found
$ hg revert notfound $ hg revert notfound
notfound: no such file in rev 095eacd0c0d7 notfound: no such file in rev 334a9e57682c
$ touch d $ touch d
$ hg add d $ hg add d
$ hg rm a $ hg rm a
$ hg commit -m "second" -d "1000000 0" $ hg commit -m "second"
$ echo z > z $ echo z > z
$ hg add z $ hg add z
$ hg st $ hg st
@ -154,7 +154,7 @@ should print non-executable
non-executable non-executable
$ chmod +x c $ chmod +x c
$ hg commit -d '1000001 0' -m exe $ hg commit -m exe
$ chmod -x c $ chmod -x c
$ hg revert --all $ hg revert --all
@ -195,7 +195,7 @@ should succeed
issue332 issue332
$ hg ci -A -m b -d '1000001 0' $ hg ci -A -m b
adding b/b adding b/b
created new head created new head
$ echo foobar > b/b $ echo foobar > b/b

View File

@ -5,7 +5,7 @@ cd t
hg init hg init
echo a > a echo a > a
hg add a hg add a
hg commit -m "test" -d "1000000 0" hg commit -m "test"
hg verify hg verify
hg parents hg parents
hg status hg status

View File

@ -3,10 +3,10 @@ checking manifests
crosschecking files in changesets and manifests crosschecking files in changesets and manifests
checking files checking files
1 files, 1 changesets, 1 total revisions 1 files, 1 changesets, 1 total revisions
changeset: 0:0acdaf898367 changeset: 0:acb14030fe0a
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: test summary: test
rolling back to revision -1 (undo commit) rolling back to revision -1 (undo commit)

View File

@ -37,7 +37,7 @@ hg init remote
cd remote cd remote
echo this > foo echo this > foo
echo this > fooO echo this > fooO
hg ci -A -m "init" -d "1000000 0" foo fooO hg ci -A -m "init" foo fooO
echo '[server]' > .hg/hgrc echo '[server]' > .hg/hgrc
echo 'uncompressed = True' >> .hg/hgrc echo 'uncompressed = True' >> .hg/hgrc
echo '[hooks]' >> .hg/hgrc echo '[hooks]' >> .hg/hgrc
@ -71,7 +71,7 @@ hg pull -e "python ../dummyssh"
echo "# local change" echo "# local change"
echo bleah > foo echo bleah > foo
hg ci -m "add" -d "1000000 0" hg ci -m "add"
echo "# updating rc" echo "# updating rc"
echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
@ -95,13 +95,13 @@ hg verify
hg cat -r tip foo hg cat -r tip foo
echo z > z echo z > z
hg ci -A -m z -d '1000001 0' z hg ci -A -m z z
# a bad, evil hook that prints to stdout # a bad, evil hook that prints to stdout
echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc
cd ../local cd ../local
echo r > r echo r > r
hg ci -A -m z -d '1000002 0' r hg ci -A -m z r
echo "# push should succeed even though it has an unexpected response" echo "# push should succeed even though it has an unexpected response"
hg push hg push

View File

@ -37,19 +37,19 @@ no changes found
# find outgoing # find outgoing
comparing with ssh://user@dummy/remote comparing with ssh://user@dummy/remote
searching for changes searching for changes
changeset: 1:572896fe480d changeset: 1:a28a9d1a809c
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: add summary: add
# find incoming on the remote side # find incoming on the remote side
comparing with ssh://user@dummy/local comparing with ssh://user@dummy/local
searching for changes searching for changes
changeset: 1:572896fe480d changeset: 1:a28a9d1a809c
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: add summary: add
# push # push
@ -60,10 +60,10 @@ remote: adding manifests
remote: adding file changes remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files remote: added 1 changesets with 1 changes to 1 files
# check remote tip # check remote tip
changeset: 1:572896fe480d changeset: 1:a28a9d1a809c
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: add summary: add
checking changesets checking changesets
@ -82,17 +82,17 @@ remote: adding manifests
remote: adding file changes remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files remote: added 1 changesets with 1 changes to 1 files
remote: KABOOM remote: KABOOM
changeset: 3:ac7448082955 changeset: 3:1383141674ec
tag: tip tag: tip
parent: 1:572896fe480d parent: 1:a28a9d1a809c
user: test user: test
date: Mon Jan 12 13:46:42 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: z summary: z
changeset: 2:187c6caa0d1e changeset: 2:6c0482d977a3
parent: 0:e34318c26897 parent: 0:1160648e36ce
user: test user: test
date: Mon Jan 12 13:46:41 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: z summary: z
Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
@ -102,6 +102,6 @@ Got arguments 1:user@dummy 2:hg -R remote serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio Got arguments 1:user@dummy 2:hg -R remote serve --stdio
Got arguments 1:user@dummy 2:hg -R local serve --stdio Got arguments 1:user@dummy 2:hg -R local serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio Got arguments 1:user@dummy 2:hg -R remote serve --stdio
changegroup-in-remote hook: HG_NODE=572896fe480d7581849806ee402175c49cb20037 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
Got arguments 1:user@dummy 2:hg -R remote serve --stdio Got arguments 1:user@dummy 2:hg -R remote serve --stdio
changegroup-in-remote hook: HG_NODE=ac7448082955a0b2ff5cb4512c1e061c779bbc79 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1

View File

@ -29,7 +29,7 @@ cd remote
hg init hg init
echo foo > bar echo foo > bar
hg add bar hg add bar
hg commit -m"test" -d "1000000 0" hg commit -m"test"
hg tip hg tip
cd .. cd ..
@ -42,7 +42,7 @@ cat bar
cd ../remote cd ../remote
echo baz > quux echo baz > quux
hg commit -A -mtest2 -d '100000000 0' hg commit -A -mtest2
# check for HTTP opener failures when cachefile does not exist # check for HTTP opener failures when cachefile does not exist
rm .hg/*.cache rm .hg/*.cache
@ -54,7 +54,7 @@ hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/,"
echo '% trying to push' echo '% trying to push'
hg update hg update
echo more foo >> bar echo more foo >> bar
hg commit -m"test" -d "100000000 0" hg commit -m"test"
hg push | sed -e "s,:$HGPORT/,:\$HGPORT/," hg push | sed -e "s,:$HGPORT/,:\$HGPORT/,"
echo '% trying clone -r' echo '% trying clone -r'

View File

@ -1,10 +1,10 @@
abort: error: Connection refused abort: error: Connection refused
255 255
copy: No such file or directory copy: No such file or directory
changeset: 0:53e17d176ae6 changeset: 0:61c9426e69fe
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: test summary: test
requesting all changes requesting all changes
@ -21,7 +21,7 @@ checking files
1 files, 1 changesets, 1 total revisions 1 files, 1 changesets, 1 total revisions
foo foo
adding quux adding quux
changegroup hook: HG_NODE=34401e0e9971e9720b613d9089ffa9a6eefb3d2d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote changegroup hook: HG_NODE=822d6e31f08b9d6e3b898ce5e52efc0a4bf4905a HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote
pulling from static-http://localhost:$HGPORT/remote pulling from static-http://localhost:$HGPORT/remote
searching for changes searching for changes
adding changesets adding changesets

View File

@ -111,7 +111,7 @@ hg status . in repo root:
$ cd repo2 $ cd repo2
$ touch modified removed deleted ignored $ touch modified removed deleted ignored
$ echo "^ignored$" > .hgignore $ echo "^ignored$" > .hgignore
$ hg ci -A -m 'initial checkin' -d "1000000 0" $ hg ci -A -m 'initial checkin'
adding .hgignore adding .hgignore
adding deleted adding deleted
adding modified adding modified

View File

@ -106,7 +106,7 @@ hg status . in repo root:
$ cd repo2 $ cd repo2
$ touch modified removed deleted ignored $ touch modified removed deleted ignored
$ echo "^ignored$" > .hgignore $ echo "^ignored$" > .hgignore
$ hg ci -A -m 'initial checkin' -d "1000000 0" $ hg ci -A -m 'initial checkin'
adding .hgignore adding .hgignore
adding deleted adding deleted
adding modified adding modified
@ -231,7 +231,7 @@ hg status -i ignoreddir/file:
$ hg init repo4 $ hg init repo4
$ cd repo4 $ cd repo4
$ touch modified removed deleted $ touch modified removed deleted
$ hg ci -q -A -m 'initial checkin' -d "1000000 0" $ hg ci -q -A -m 'initial checkin'
$ touch added unknown $ touch added unknown
$ hg add added $ hg add added
$ hg remove removed $ hg remove removed

View File

@ -3,87 +3,87 @@
$ echo a > a $ echo a > a
$ hg add a $ hg add a
$ hg commit -m "test" -d "1000000 0" $ hg commit -m "test"
$ hg history $ hg history
changeset: 0:0acdaf898367 changeset: 0:acb14030fe0a
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: test summary: test
$ hg tag ' ' $ hg tag ' '
abort: tag names cannot consist entirely of whitespace abort: tag names cannot consist entirely of whitespace
$ hg tag -d "1000000 0" "bleah" $ hg tag "bleah"
$ hg history $ hg history
changeset: 1:3ecf002a1c57 changeset: 1:d4f0d2909abc
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah for changeset 0acdaf898367 summary: Added tag bleah for changeset acb14030fe0a
changeset: 0:0acdaf898367 changeset: 0:acb14030fe0a
tag: bleah tag: bleah
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: test summary: test
$ echo foo >> .hgtags $ echo foo >> .hgtags
$ hg tag -d "1000000 0" "bleah2" || echo "failed" $ hg tag "bleah2" || echo "failed"
abort: working copy of .hgtags is changed (please commit .hgtags manually) abort: working copy of .hgtags is changed (please commit .hgtags manually)
failed failed
$ hg revert .hgtags $ hg revert .hgtags
$ hg tag -d "1000000 0" -r 0 x y z y y z || echo "failed" $ hg tag -r 0 x y z y y z || echo "failed"
abort: tag names must be unique abort: tag names must be unique
failed failed
$ hg tag -d "1000000 0" tap nada dot tip null . || echo "failed" $ hg tag tap nada dot tip null . || echo "failed"
abort: the name 'tip' is reserved abort: the name 'tip' is reserved
failed failed
$ hg tag -d "1000000 0" "bleah" || echo "failed" $ hg tag "bleah" || echo "failed"
abort: tag 'bleah' already exists (use -f to force) abort: tag 'bleah' already exists (use -f to force)
failed failed
$ hg tag -d "1000000 0" "blecch" "bleah" || echo "failed" $ hg tag "blecch" "bleah" || echo "failed"
abort: tag 'bleah' already exists (use -f to force) abort: tag 'bleah' already exists (use -f to force)
failed failed
$ hg tag -d "1000000 0" --remove "blecch" || echo "failed" $ hg tag --remove "blecch" || echo "failed"
abort: tag 'blecch' does not exist abort: tag 'blecch' does not exist
failed failed
$ hg tag -d "1000000 0" --remove "bleah" "blecch" "blough" || echo "failed" $ hg tag --remove "bleah" "blecch" "blough" || echo "failed"
abort: tag 'blecch' does not exist abort: tag 'blecch' does not exist
failed failed
$ hg tag -d "1000000 0" -r 0 "bleah0" $ hg tag -r 0 "bleah0"
$ hg tag -l -d "1000000 0" -r 1 "bleah1" $ hg tag -l -r 1 "bleah1"
$ hg tag -d "1000000 0" gack gawk gorp $ hg tag gack gawk gorp
$ hg tag -d "1000000 0" -f gack $ hg tag -f gack
$ hg tag -d "1000000 0" --remove gack gorp $ hg tag --remove gack gorp
$ cat .hgtags $ cat .hgtags
0acdaf8983679e0aac16e811534eb49d7ee1f2b4 bleah acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
0acdaf8983679e0aac16e811534eb49d7ee1f2b4 bleah0 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
868cc8fbb43b754ad09fa109885d243fc49adae7 gack 336fccc858a4eb69609a291105009e484a6b6b8d gack
868cc8fbb43b754ad09fa109885d243fc49adae7 gawk 336fccc858a4eb69609a291105009e484a6b6b8d gawk
868cc8fbb43b754ad09fa109885d243fc49adae7 gorp 336fccc858a4eb69609a291105009e484a6b6b8d gorp
868cc8fbb43b754ad09fa109885d243fc49adae7 gack 336fccc858a4eb69609a291105009e484a6b6b8d gack
3807bcf62c5614cb6c16436b514d7764ca5f1631 gack 799667b6f2d9b957f73fa644a918c2df22bab58f gack
3807bcf62c5614cb6c16436b514d7764ca5f1631 gack 799667b6f2d9b957f73fa644a918c2df22bab58f gack
0000000000000000000000000000000000000000 gack 0000000000000000000000000000000000000000 gack
868cc8fbb43b754ad09fa109885d243fc49adae7 gorp 336fccc858a4eb69609a291105009e484a6b6b8d gorp
0000000000000000000000000000000000000000 gorp 0000000000000000000000000000000000000000 gorp
$ cat .hg/localtags $ cat .hg/localtags
3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
$ hg update 0 $ hg update 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg tag -d "1000000 0" "foobar" $ hg tag "foobar"
$ cat .hgtags $ cat .hgtags
0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
$ cat .hg/localtags $ cat .hg/localtags
3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
$ hg tag -l 'xx $ hg tag -l 'xx
> newline' > newline'
@ -95,49 +95,49 @@ cloning local tags
$ cd .. $ cd ..
$ hg -R test log -r0:5 $ hg -R test log -r0:5
changeset: 0:0acdaf898367 changeset: 0:acb14030fe0a
tag: bleah tag: bleah
tag: bleah0 tag: bleah0
tag: foobar tag: foobar
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: test summary: test
changeset: 1:3ecf002a1c57 changeset: 1:d4f0d2909abc
tag: bleah1 tag: bleah1
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah for changeset 0acdaf898367 summary: Added tag bleah for changeset acb14030fe0a
changeset: 2:868cc8fbb43b changeset: 2:336fccc858a4
tag: gawk tag: gawk
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah0 for changeset 0acdaf898367 summary: Added tag bleah0 for changeset acb14030fe0a
changeset: 3:3807bcf62c56 changeset: 3:799667b6f2d9
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag gack, gawk, gorp for changeset 868cc8fbb43b summary: Added tag gack, gawk, gorp for changeset 336fccc858a4
changeset: 4:140c6e8597b4 changeset: 4:154eeb7c0138
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag gack for changeset 3807bcf62c56 summary: Added tag gack for changeset 799667b6f2d9
changeset: 5:470a65fa7cc9 changeset: 5:b4bb47aaff09
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Removed tag gack, gorp summary: Removed tag gack, gorp
$ hg clone -q -rbleah1 test test1 $ hg clone -q -rbleah1 test test1
$ hg -R test1 parents --style=compact $ hg -R test1 parents --style=compact
1[tip] 3ecf002a1c57 1970-01-12 13:46 +0000 test 1[tip] d4f0d2909abc 1970-01-01 00:00 +0000 test
Added tag bleah for changeset 0acdaf898367 Added tag bleah for changeset acb14030fe0a
$ hg clone -q -r5 test#bleah1 test2 $ hg clone -q -r5 test#bleah1 test2
$ hg -R test2 parents --style=compact $ hg -R test2 parents --style=compact
5[tip] 470a65fa7cc9 1970-01-12 13:46 +0000 test 5[tip] b4bb47aaff09 1970-01-01 00:00 +0000 test
Removed tag gack, gorp Removed tag gack, gorp
$ hg clone -q -U test#bleah1 test3 $ hg clone -q -U test#bleah1 test3
@ -152,24 +152,24 @@ issue 601
> f = file('.hg/localtags', 'w'); f.write(last); f.close() > f = file('.hg/localtags', 'w'); f.write(last); f.close()
> EOF > EOF
$ cat .hg/localtags; echo $ cat .hg/localtags; echo
3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
$ hg tag -l localnewline $ hg tag -l localnewline
$ cat .hg/localtags; echo $ cat .hg/localtags; echo
3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
f68b039e72eacbb2e68b0543e1f6e50990aa2bb5 localnewline c2899151f4e76890c602a2597a650a72666681bf localnewline
$ python << EOF $ python << EOF
> f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close() > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
> f = file('.hgtags', 'w'); f.write(last); f.close() > f = file('.hgtags', 'w'); f.write(last); f.close()
> EOF > EOF
$ hg ci -d '1000000 0' -m'broken manual edit of .hgtags' $ hg ci -m'broken manual edit of .hgtags'
$ cat .hgtags; echo $ cat .hgtags; echo
0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
$ hg tag -d '1000000 0' newline $ hg tag newline
$ cat .hgtags; echo $ cat .hgtags; echo
0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
6ae703d793c8b1f097116869275ecd97b2977a2b newline a0eea09de1eeec777b46f2085260a373b2fbc293 newline
tag and branch using same name tag and branch using same name

View File

@ -309,7 +309,7 @@ test filter with failed patch
$ hg up 0 $ hg up 0
0 files updated, 0 files merged, 3 files removed, 0 files unresolved 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
$ echo foo > b1 $ echo foo > b1
$ hg ci -d '0 0' -Am foo $ hg ci -Am foo
adding b1 adding b1
adding test-filter adding test-filter
created new head created new head

View File

@ -5,7 +5,7 @@ cd a
hg init hg init
echo 123 > a echo 123 > a
hg add a hg add a
hg commit -m "a" -u a -d "1000000 0" hg commit -m "a" -u a
cd .. cd ..
mkdir b mkdir b
@ -13,7 +13,7 @@ cd b
hg init hg init
echo 321 > b echo 321 > b
hg add b hg add b
hg commit -m "b" -u b -d "1000000 0" hg commit -m "b" -u b
hg pull ../a hg pull ../a
hg pull -f ../a hg pull -f ../a

View File

@ -9,15 +9,15 @@ adding manifests
adding file changes adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads) added 1 changesets with 1 changes to 1 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge) (run 'hg heads' to see heads, 'hg merge' to merge)
changeset: 1:bdcee5d51fa6 changeset: 1:9a79c33a9db3
tag: tip tag: tip
parent: -1:000000000000 parent: -1:000000000000
user: a user: a
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: a summary: a
changeset: 0:f155ba1aa5ba changeset: 0:01f8062b2de5
user: b user: b
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: b summary: b

View File

@ -6,7 +6,7 @@
$ echo a > a $ echo a > a
$ hg addremove $ hg addremove
adding a adding a
$ hg commit -m "1" -d "1000000 0" $ hg commit -m "1"
$ hg clone . ../r2 $ hg clone . ../r2
updating to branch default updating to branch default
@ -16,7 +16,7 @@
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo abc > a $ echo abc > a
$ hg diff --nodates $ hg diff --nodates
diff -r 33aaa84a386b a diff -r c19d34741b0a a
--- a/a --- a/a
+++ b/a +++ b/a
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@
@ -28,16 +28,16 @@
$ echo a2 > a $ echo a2 > a
$ hg addremove $ hg addremove
adding b adding b
$ hg commit -m "2" -d "1000000 0" $ hg commit -m "2"
$ cd ../r2 $ cd ../r2
$ hg -q pull ../r1 $ hg -q pull ../r1
$ hg status $ hg status
M a M a
$ hg parents $ hg parents
changeset: 0:33aaa84a386b changeset: 0:c19d34741b0a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
$ hg --debug up $ hg --debug up
@ -46,28 +46,28 @@
b b
resolving manifests resolving manifests
overwrite False partial False overwrite False partial False
ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299 ancestor c19d34741b0a local c19d34741b0a+ remote 1e71731e6fbb
a: versions differ -> m a: versions differ -> m
b: remote created -> g b: remote created -> g
preserving a for resolve of a preserving a for resolve of a
updating: a 1/2 files (50.00%) updating: a 1/2 files (50.00%)
picked tool 'true' for a (binary False symlink False) picked tool 'true' for a (binary False symlink False)
merging a merging a
my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a
updating: b 2/2 files (100.00%) updating: b 2/2 files (100.00%)
getting b getting b
1 files updated, 1 files merged, 0 files removed, 0 files unresolved 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
$ hg parents $ hg parents
changeset: 1:802f095af299 changeset: 1:1e71731e6fbb
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
$ hg --debug up 0 $ hg --debug up 0
resolving manifests resolving manifests
overwrite False partial False overwrite False partial False
ancestor 802f095af299 local 802f095af299+ remote 33aaa84a386b ancestor 1e71731e6fbb local 1e71731e6fbb+ remote c19d34741b0a
a: versions differ -> m a: versions differ -> m
b: other deleted -> r b: other deleted -> r
preserving a for resolve of a preserving a for resolve of a
@ -76,21 +76,21 @@
updating: a 2/2 files (100.00%) updating: a 2/2 files (100.00%)
picked tool 'true' for a (binary False symlink False) picked tool 'true' for a (binary False symlink False)
merging a merging a
my a@802f095af299+ other a@33aaa84a386b ancestor a@802f095af299 my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb
0 files updated, 1 files merged, 1 files removed, 0 files unresolved 0 files updated, 1 files merged, 1 files removed, 0 files unresolved
$ hg parents $ hg parents
changeset: 0:33aaa84a386b changeset: 0:c19d34741b0a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
$ hg --debug merge || echo failed $ hg --debug merge || echo failed
abort: there is nothing to merge - use "hg update" instead abort: there is nothing to merge - use "hg update" instead
failed failed
$ hg parents $ hg parents
changeset: 0:33aaa84a386b changeset: 0:c19d34741b0a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 1 summary: 1
$ hg --debug up $ hg --debug up
@ -99,44 +99,44 @@
b b
resolving manifests resolving manifests
overwrite False partial False overwrite False partial False
ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299 ancestor c19d34741b0a local c19d34741b0a+ remote 1e71731e6fbb
a: versions differ -> m a: versions differ -> m
b: remote created -> g b: remote created -> g
preserving a for resolve of a preserving a for resolve of a
updating: a 1/2 files (50.00%) updating: a 1/2 files (50.00%)
picked tool 'true' for a (binary False symlink False) picked tool 'true' for a (binary False symlink False)
merging a merging a
my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a
updating: b 2/2 files (100.00%) updating: b 2/2 files (100.00%)
getting b getting b
1 files updated, 1 files merged, 0 files removed, 0 files unresolved 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
$ hg parents $ hg parents
changeset: 1:802f095af299 changeset: 1:1e71731e6fbb
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
$ hg -v history $ hg -v history
changeset: 1:802f095af299 changeset: 1:1e71731e6fbb
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: a b files: a b
description: description:
2 2
changeset: 0:33aaa84a386b changeset: 0:c19d34741b0a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
files: a files: a
description: description:
1 1
$ hg diff --nodates $ hg diff --nodates
diff -r 802f095af299 a diff -r 1e71731e6fbb a
--- a/a --- a/a
+++ b/a +++ b/a
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@
@ -153,7 +153,7 @@ create a second head
$ echo a3 > a $ echo a3 > a
$ hg addremove $ hg addremove
adding b adding b
$ hg commit -m "3" -d "1000000 0" $ hg commit -m "3"
created new head created new head
$ cd ../r2 $ cd ../r2
@ -161,9 +161,9 @@ create a second head
$ hg status $ hg status
M a M a
$ hg parents $ hg parents
changeset: 1:802f095af299 changeset: 1:1e71731e6fbb
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
$ hg --debug up || echo failed $ hg --debug up || echo failed
@ -176,7 +176,7 @@ create a second head
searching for copies back to rev 1 searching for copies back to rev 1
resolving manifests resolving manifests
overwrite False partial False overwrite False partial False
ancestor 33aaa84a386b local 802f095af299+ remote 030602aee63d ancestor c19d34741b0a local 1e71731e6fbb+ remote 83c51d0caff4
a: versions differ -> m a: versions differ -> m
b: versions differ -> m b: versions differ -> m
preserving a for resolve of a preserving a for resolve of a
@ -184,28 +184,28 @@ create a second head
updating: a 1/2 files (50.00%) updating: a 1/2 files (50.00%)
picked tool 'true' for a (binary False symlink False) picked tool 'true' for a (binary False symlink False)
merging a merging a
my a@802f095af299+ other a@030602aee63d ancestor a@33aaa84a386b my a@1e71731e6fbb+ other a@83c51d0caff4 ancestor a@c19d34741b0a
updating: b 2/2 files (100.00%) updating: b 2/2 files (100.00%)
picked tool 'true' for b (binary False symlink False) picked tool 'true' for b (binary False symlink False)
merging b merging b
my b@802f095af299+ other b@030602aee63d ancestor b@000000000000 my b@1e71731e6fbb+ other b@83c51d0caff4 ancestor b@000000000000
0 files updated, 2 files merged, 0 files removed, 0 files unresolved 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit) (branch merge, don't forget to commit)
$ hg parents $ hg parents
changeset: 1:802f095af299 changeset: 1:1e71731e6fbb
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 2 summary: 2
changeset: 2:030602aee63d changeset: 2:83c51d0caff4
tag: tip tag: tip
parent: 0:33aaa84a386b parent: 0:c19d34741b0a
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: 3 summary: 3
$ hg diff --nodates $ hg diff --nodates
diff -r 802f095af299 a diff -r 1e71731e6fbb a
--- a/a --- a/a
+++ b/a +++ b/a
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@

View File

@ -3,11 +3,11 @@
hg init hg init
touch a touch a
hg add a hg add a
hg commit -m "Added a" -d "1000000 0" hg commit -m "Added a"
touch main touch main
hg add main hg add main
hg commit -m "Added main" -d "1000000 0" hg commit -m "Added main"
hg checkout 0 hg checkout 0
echo Main should be gone echo Main should be gone
@ -15,10 +15,10 @@ ls
touch side1 touch side1
hg add side1 hg add side1
hg commit -m "Added side1" -d "1000000 0" hg commit -m "Added side1"
touch side2 touch side2
hg add side2 hg add side2
hg commit -m "Added side2" -d "1000000 0" hg commit -m "Added side2"
hg log hg log

View File

@ -2,38 +2,38 @@
Main should be gone Main should be gone
a a
created new head created new head
changeset: 3:ded32b0db104 changeset: 3:91ebc10ed028
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added side2 summary: Added side2
changeset: 2:92a816cea698 changeset: 2:b932d7dbb1e1
parent: 0:537353581d3d parent: 0:c2eda428b523
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added side1 summary: Added side1
changeset: 1:221226fb2bd8 changeset: 1:71a760306caf
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added main summary: Added main
changeset: 0:537353581d3d changeset: 0:c2eda428b523
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added a summary: Added a
Should have two heads, side2 and main Should have two heads, side2 and main
changeset: 3:ded32b0db104 changeset: 3:91ebc10ed028
tag: tip tag: tip
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added side2 summary: Added side2
changeset: 1:221226fb2bd8 changeset: 1:71a760306caf
user: test user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added main summary: Added main
Should show a side1 side2 Should show a side1 side2
@ -42,7 +42,7 @@ side1
side2 side2
resolving manifests resolving manifests
overwrite True partial False overwrite True partial False
ancestor ded32b0db104+ local ded32b0db104+ remote 221226fb2bd8 ancestor 91ebc10ed028+ local 91ebc10ed028+ remote 71a760306caf
side2: other deleted -> r side2: other deleted -> r
side1: other deleted -> r side1: other deleted -> r
main: remote created -> g main: remote created -> g

View File

@ -29,7 +29,7 @@
adding mammals/Procyonidae/coatimundi adding mammals/Procyonidae/coatimundi
adding mammals/Procyonidae/raccoon adding mammals/Procyonidae/raccoon
adding mammals/skunk adding mammals/skunk
$ hg commit -m "commit #0" -d "1000000 0" $ hg commit -m "commit #0"
$ hg debugwalk $ hg debugwalk
f beans/black beans/black f beans/black beans/black