tests: unify test-issue*
authorAdrian Buehlmann <adrian@cadifra.com>
Fri, 03 Sep 2010 23:34:37 +0200
changeset 12195 ee41be2bbf5a
parent 12194 9e40ea08c2ab
child 12196 e42bc7f66e25
tests: unify test-issue*
tests/test-issue1089
tests/test-issue1089.out
tests/test-issue1089.t
tests/test-issue1175
tests/test-issue1175.out
tests/test-issue1175.t
tests/test-issue1306
tests/test-issue1306.out
tests/test-issue1306.t
tests/test-issue322
tests/test-issue322.out
tests/test-issue322.t
tests/test-issue433
tests/test-issue433.out
tests/test-issue433.t
tests/test-issue436
tests/test-issue436.t
tests/test-issue522
tests/test-issue522.out
tests/test-issue522.t
tests/test-issue612
tests/test-issue612.out
tests/test-issue612.t
tests/test-issue619
tests/test-issue619.out
tests/test-issue619.t
tests/test-issue660
tests/test-issue660.out
tests/test-issue660.t
tests/test-issue672
tests/test-issue672.out
tests/test-issue672.t
tests/test-issue842
tests/test-issue842.out
tests/test-issue842.t
--- a/tests/test-issue1089	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-hg init a
-cd a
-mkdir a
-echo a > a/b
-hg ci -Am m
-hg rm a
-hg ci -m m a
-
-mkdir a b
-echo a > a/b
-hg ci -Am m
-hg rm a
-cd b
-# relative delete
-hg ci -m m ../a
--- a/tests/test-issue1089.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-adding a/b
-removing a/b
-adding a/b
-removing a/b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue1089.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,25 @@
+# http://mercurial.selenic.com/bts/issue1089
+
+  $ hg init
+  $ mkdir a
+  $ echo a > a/b
+  $ hg ci -Am m
+  adding a/b
+
+  $ hg rm a
+  removing a/b
+  $ hg ci -m m a
+
+  $ mkdir a b
+  $ echo a > a/b
+  $ hg ci -Am m
+  adding a/b
+
+  $ hg rm a
+  removing a/b
+  $ cd b
+
+Relative delete:
+
+  $ hg ci -m m ../a
+
--- a/tests/test-issue1175	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#!/bin/sh
-rm -rf a
-hg init a
-cd a
-touch a
-hg ci -Am0
-hg mv a a1
-hg ci -m1
-hg co 0
-hg mv a a2
-hg up
-hg ci -m2
-
-touch a
-hg ci -Am3
-hg mv a b
-hg ci -Am4 a
-hg ci --debug --traceback -Am5 b
-hg verify
-hg export --git tip
--- a/tests/test-issue1175.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-adding a
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-warning: detected divergent renames of a to:
- a2
- a1
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-adding a
-b
- b: searching for copy revision for a
- b: copy a:b80de5d138758541c5f05265ad144ab9fa86d1db
-committed changeset 5:89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b
-checking changesets
-checking manifests
-crosschecking files in changesets and manifests
-checking files
-4 files, 6 changesets, 4 total revisions
-# HG changeset patch
-# User test
-# Date 0 0
-# Node ID 89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b
-# Parent  7fc86ba705e717a721dbc361bf8c9bc05a18ca2f
-5
-
-diff --git a/b b/b
-new file mode 100644
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue1175.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,53 @@
+# http://mercurial.selenic.com/bts/issue1175
+
+  $ hg init
+  $ touch a
+  $ hg ci -Am0
+  adding a
+
+  $ hg mv a a1
+  $ hg ci -m1
+
+  $ hg co 0
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ hg mv a a2
+  $ hg up
+  warning: detected divergent renames of a to:
+   a2
+   a1
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg ci -m2
+
+  $ touch a
+  $ hg ci -Am3
+  adding a
+
+  $ hg mv a b
+  $ hg ci -Am4 a
+
+  $ hg ci --debug --traceback -Am5 b
+  b
+   b: searching for copy revision for a
+   b: copy a:b80de5d138758541c5f05265ad144ab9fa86d1db
+  committed changeset 5:89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b
+
+  $ hg verify
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  4 files, 6 changesets, 4 total revisions
+
+  $ hg export --git tip
+  # HG changeset patch
+  # User test
+  # Date 0 0
+  # Node ID 89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b
+  # Parent  7fc86ba705e717a721dbc361bf8c9bc05a18ca2f
+  5
+  
+  diff --git a/b b/b
+  new file mode 100644
+
--- a/tests/test-issue1306	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-echo % initialize remote repo with branches
-hg init remote
-cd remote
-echo a > a
-hg ci -Ama
-hg branch br
-hg ci -Amb
-echo c > c
-hg ci -Amc
-hg log
-
-cd ..
-echo % try cloning -r branch
-hg clone -rbr remote local1
-hg -R local1 parents
-
-echo % try cloning -rother clone#branch
-hg clone -r0 remote#br local2
-hg -R local2 parents
-
-echo % try cloning -r1 clone#branch
-hg clone -r1 remote#br local3
-hg -R local3 parents
--- a/tests/test-issue1306.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-% initialize remote repo with branches
-adding a
-marked working directory as branch br
-adding c
-changeset:   2:1630aed6ed2b
-branch:      br
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     c
-
-changeset:   1:234f53e6c5ff
-branch:      br
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     b
-
-changeset:   0:cb9a9f314b8b
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     a
-
-% try cloning -r branch
-requesting all changes
-adding changesets
-adding manifests
-adding file changes
-added 3 changesets with 2 changes to 2 files
-updating to branch br
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-changeset:   2:1630aed6ed2b
-branch:      br
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     c
-
-% try cloning -rother clone#branch
-requesting all changes
-adding changesets
-adding manifests
-adding file changes
-added 3 changesets with 2 changes to 2 files
-updating to branch default
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-changeset:   0:cb9a9f314b8b
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     a
-
-% try cloning -r1 clone#branch
-requesting all changes
-adding changesets
-adding manifests
-adding file changes
-added 3 changesets with 2 changes to 2 files
-updating to branch br
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-changeset:   1:234f53e6c5ff
-branch:      br
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     b
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue1306.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,98 @@
+# http://mercurial.selenic.com/bts/issue1306
+
+Initialize remote repo with branches:
+
+  $ hg init remote
+  $ cd remote
+
+  $ echo a > a
+  $ hg ci -Ama
+  adding a
+
+  $ hg branch br
+  marked working directory as branch br
+  $ hg ci -Amb
+
+  $ echo c > c
+  $ hg ci -Amc
+  adding c
+
+  $ hg log
+  changeset:   2:1630aed6ed2b
+  branch:      br
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     c
+  
+  changeset:   1:234f53e6c5ff
+  branch:      br
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     b
+  
+  changeset:   0:cb9a9f314b8b
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     a
+  
+
+  $ cd ..
+
+Try cloning -r branch:
+
+  $ hg clone -rbr remote local1
+  requesting all changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 2 changes to 2 files
+  updating to branch br
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg -R local1 parents
+  changeset:   2:1630aed6ed2b
+  branch:      br
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     c
+  
+
+Try cloning -rother clone#branch:
+
+  $ hg clone -r0 remote#br local2
+  requesting all changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 2 changes to 2 files
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg -R local2 parents
+  changeset:   0:cb9a9f314b8b
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     a
+  
+
+Try cloning -r1 clone#branch:
+
+  $ hg clone -r1 remote#br local3
+  requesting all changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 2 changes to 2 files
+  updating to branch br
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg -R local3 parents
+  changeset:   1:234f53e6c5ff
+  branch:      br
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     b
+  
+
--- a/tests/test-issue322	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#!/bin/sh
-# http://mercurial.selenic.com/bts/issue322
-
-echo % file replaced with directory
-
-hg init a
-cd a
-echo a > a
-hg commit -Ama
-rm a
-mkdir a
-echo a > a/a
-
-echo % should fail - would corrupt dirstate
-hg add a/a
-
-cd ..
-
-echo % directory replaced with file
-
-hg init c
-cd c
-mkdir a
-echo a > a/a
-hg commit -Ama
-
-rm -r a
-echo a > a
-
-echo % should fail - would corrupt dirstate
-hg add a
-
-cd ..
-
-echo % directory replaced with file
-
-hg init d
-cd d
-mkdir b
-mkdir b/c
-echo a > b/c/d
-hg commit -Ama
-rm -r b
-echo a > b
-
-echo % should fail - would corrupt dirstate
-hg add b
-
-exit 0
--- a/tests/test-issue322.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-% file replaced with directory
-adding a
-% should fail - would corrupt dirstate
-abort: file 'a' in dirstate clashes with 'a/a'
-% directory replaced with file
-adding a/a
-% should fail - would corrupt dirstate
-abort: directory 'a' already in dirstate
-% directory replaced with file
-adding b/c/d
-% should fail - would corrupt dirstate
-abort: directory 'b' already in dirstate
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue322.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,58 @@
+# http://mercurial.selenic.com/bts/issue322
+
+File replaced with directory:
+
+  $ hg init a
+  $ cd a
+  $ echo a > a
+  $ hg commit -Ama
+  adding a
+  $ rm a
+  $ mkdir a
+  $ echo a > a/a
+
+Should fail - would corrupt dirstate:
+
+  $ hg add a/a
+  abort: file 'a' in dirstate clashes with 'a/a'
+
+  $ cd ..
+
+Directory replaced with file:
+
+  $ hg init c
+  $ cd c
+  $ mkdir a
+  $ echo a > a/a
+  $ hg commit -Ama
+  adding a/a
+
+  $ rm -r a
+  $ echo a > a
+
+Should fail - would corrupt dirstate:
+
+  $ hg add a
+  abort: directory 'a' already in dirstate
+
+  $ cd ..
+
+Directory replaced with file:
+
+  $ hg init d
+  $ cd d
+  $ mkdir b
+  $ mkdir b/c
+  $ echo a > b/c/d
+  $ hg commit -Ama
+  adding b/c/d
+  $ rm -r b
+  $ echo a > b
+
+Should fail - would corrupt dirstate:
+
+  $ hg add b
+  abort: directory 'b' already in dirstate
+
+  $ exit 0
+
--- a/tests/test-issue433	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#!/bin/sh
-# http://mercurial.selenic.com/bts/issue433
-
-hg init a
-cd a
-echo a > a
-hg commit -Ama
-
-hg parents -r 0 doesnotexist
-true
--- a/tests/test-issue433.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-adding a
-abort: 'doesnotexist' not found in manifest!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue433.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,12 @@
+# http://mercurial.selenic.com/bts/issue433
+
+  $ hg init
+  $ echo a > a
+  $ hg commit -Ama
+  adding a
+
+  $ hg parents -r 0 doesnotexist
+  abort: 'doesnotexist' not found in manifest!
+
+  $ true
+
--- a/tests/test-issue436	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-hg init a
-cd a
-hg -v log -v
-hg -v log -v x
-true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue436.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,6 @@
+# http://mercurial.selenic.com/bts/issue436
+
+  $ hg init
+  $ hg -v log -v
+  $ hg -v log -v x
+
--- a/tests/test-issue522	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# In the merge below, the file "foo" has the same contents in both
-# parents, but if we look at the file-level history, we'll notice that
-# the version in p1 is an ancestor of the version in p2.  This test
-# makes sure that we'll use the version from p2 in the manifest of the
-# merge revision.
-
-hg init repo
-cd repo
-
-echo foo > foo
-hg ci -qAm 'add foo'
-
-echo bar >> foo
-hg ci -m 'change foo'
-
-hg backout -r tip -m 'backout changed foo'
-
-hg up -C 0
-touch bar
-hg ci -qAm 'add bar'
-
-hg merge --debug
-hg debugstate | grep foo
-hg st -A foo
-hg ci -m 'merge'
-
-hg manifest --debug | grep foo
-hg debugindex .hg/store/data/foo.i
-
--- a/tests/test-issue522.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-reverting foo
-changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  searching for copies back to rev 1
-  unmatched files in local:
-   bar
-resolving manifests
- overwrite None partial False
- ancestor bbd179dfa0a7 local 71766447bdbb+ remote 4d9e78aaceee
- foo: remote is newer -> g
-updating: foo 1/1 files (100.00%)
-getting foo
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-n   0         -2 unset               foo
-M foo
-c6fc755d7e68f49f880599da29f15add41f42f5a 644   foo
-   rev    offset  length   base linkrev nodeid       p1           p2
-     0         0       5      0       0 2ed2a3912a0b 000000000000 000000000000
-     1         5       9      1       1 6f4310b00b9a 2ed2a3912a0b 000000000000
-     2        14       5      2       2 c6fc755d7e68 6f4310b00b9a 000000000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue522.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,56 @@
+# http://mercurial.selenic.com/bts/issue522
+
+# In the merge below, the file "foo" has the same contents in both
+# parents, but if we look at the file-level history, we'll notice that
+# the version in p1 is an ancestor of the version in p2.  This test
+# makes sure that we'll use the version from p2 in the manifest of the
+# merge revision.
+
+  $ hg init
+
+  $ echo foo > foo
+  $ hg ci -qAm 'add foo'
+
+  $ echo bar >> foo
+  $ hg ci -m 'change foo'
+
+  $ hg backout -r tip -m 'backout changed foo'
+  reverting foo
+  changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e
+
+  $ hg up -C 0
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ touch bar
+  $ hg ci -qAm 'add bar'
+
+  $ hg merge --debug
+    searching for copies back to rev 1
+    unmatched files in local:
+     bar
+  resolving manifests
+   overwrite None partial False
+   ancestor bbd179dfa0a7 local 71766447bdbb+ remote 4d9e78aaceee
+   foo: remote is newer -> g
+  updating: foo 1/1 files (100.00%)
+  getting foo
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ hg debugstate | grep foo
+  n   0         -2 unset               foo
+
+  $ hg st -A foo
+  M foo
+
+  $ hg ci -m 'merge'
+
+  $ hg manifest --debug | grep foo
+  c6fc755d7e68f49f880599da29f15add41f42f5a 644   foo
+
+  $ hg debugindex .hg/store/data/foo.i
+     rev    offset  length   base linkrev nodeid       p1           p2
+       0         0       5      0       0 2ed2a3912a0b 000000000000 000000000000
+       1         5       9      1       1 6f4310b00b9a 2ed2a3912a0b 000000000000
+       2        14       5      2       2 c6fc755d7e68 6f4310b00b9a 000000000000
+
--- a/tests/test-issue612	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-mkdir t
-cd t
-
-hg init
-mkdir src
-echo a > src/a.c
-hg ci -Ama
-
-hg mv src source
-hg ci -Ammove
-
-hg co -C 0
-echo new > src/a.c
-echo compiled > src/a.o
-hg ci -mupdate
-
-hg st
-
-hg merge
-
-hg st
-
--- a/tests/test-issue612.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-adding src/a.c
-moving src/a.c to source/a.c
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-created new head
-? src/a.o
-merging src/a.c and source/a.c to source/a.c
-1 files updated, 1 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-M source/a.c
-R src/a.c
-? source/a.o
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue612.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,34 @@
+# http://mercurial.selenic.com/bts/issue612
+
+  $ hg init
+  $ mkdir src
+  $ echo a > src/a.c
+  $ hg ci -Ama
+  adding src/a.c
+
+  $ hg mv src source
+  moving src/a.c to source/a.c
+
+  $ hg ci -Ammove
+
+  $ hg co -C 0
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ echo new > src/a.c
+  $ echo compiled > src/a.o
+  $ hg ci -mupdate
+  created new head
+
+  $ hg status
+  ? src/a.o
+
+  $ hg merge
+  merging src/a.c and source/a.c to source/a.c
+  1 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ hg status
+  M source/a.c
+  R src/a.c
+  ? source/a.o
+
--- a/tests/test-issue619	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-mkdir t
-cd t
-hg init
-echo a > a
-hg ci -Ama
-echo b > b
-hg branch b
-hg ci -Amb
-hg co -C 0
-
-echo fast-forward
-hg merge b
-hg ci -Ammerge
-
-echo bogus fast-forward should fail
-hg merge b
-
-echo done
--- a/tests/test-issue619.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-adding a
-marked working directory as branch b
-adding b
-0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-fast-forward
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-bogus fast-forward should fail
-abort: merging with a working directory ancestor has no effect
-done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue619.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,30 @@
+# http://mercurial.selenic.com/bts/issue619
+
+  $ hg init
+  $ echo a > a
+  $ hg ci -Ama
+  adding a
+
+  $ echo b > b
+  $ hg branch b
+  marked working directory as branch b
+  $ hg ci -Amb
+  adding b
+
+  $ hg co -C 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+Fast-forward:
+
+  $ hg merge b
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg ci -Ammerge
+
+Bogus fast-forward should fail:
+
+  $ hg merge b
+  abort: merging with a working directory ancestor has no effect
+
+  $ true
+
--- a/tests/test-issue660	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-#!/bin/sh
-# http://mercurial.selenic.com/bts/issue660
-
-
-hg init a
-cd a
-echo a > a
-mkdir b
-echo b > b/b
-hg commit -A -m "a is file, b is dir"
-
-echo % file replaced with directory
-
-rm a
-mkdir a
-echo a > a/a
-
-echo % should fail - would corrupt dirstate
-hg add a/a
-
-echo % removing shadow
-hg rm --after a
-
-echo % should succeed - shadow removed
-hg add a/a
-
-echo % directory replaced with file
-
-rm -r b
-echo b > b
-
-echo % should fail - would corrupt dirstate
-hg add b
-
-echo % removing shadow
-hg rm --after b/b
-
-echo % should succeed - shadow removed
-hg add b
-
-echo % look what we got
-hg st
-
-echo % revert reintroducing shadow - should fail
-rm -r a b
-hg revert b/b
-
-echo % revert all - should succeed
-hg revert --all
-hg st
-
-echo % addremove
-
-rm -r a b
-mkdir a
-echo a > a/a
-echo b > b
-
-hg addremove -s 0
-hg st
-
-echo % commit
-hg ci -A -m "a is dir, b is file"
-hg st --all
-
-echo % long directory replaced with file
-
-mkdir d
-mkdir d/d
-echo d > d/d/d
-hg commit -A -m "d is long directory"
-rm -r d
-echo d > d
-
-echo % should fail - would corrupt dirstate
-hg add d
-
-echo % removing shadow
-hg rm --after d/d/d
-
-echo % should succeed - shadow removed
-hg add d
-hg ci -md
-
-echo % update should work at least with clean workdir
-
-rm -r a b d
-hg up -r 0
-hg st --all
-rm -r a b
-hg up -r 1
-hg st --all
-
-exit 0
--- a/tests/test-issue660.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-adding a
-adding b/b
-% file replaced with directory
-% should fail - would corrupt dirstate
-abort: file 'a' in dirstate clashes with 'a/a'
-% removing shadow
-% should succeed - shadow removed
-% directory replaced with file
-% should fail - would corrupt dirstate
-abort: directory 'b' already in dirstate
-% removing shadow
-% should succeed - shadow removed
-% look what we got
-A a/a
-A b
-R a
-R b/b
-% revert reintroducing shadow - should fail
-abort: file 'b' in dirstate clashes with 'b/b'
-% revert all - should succeed
-undeleting a
-forgetting a/a
-forgetting b
-undeleting b/b
-% addremove
-removing a
-adding a/a
-adding b
-removing b/b
-A a/a
-A b
-R a
-R b/b
-% commit
-C a/a
-C b
-% long directory replaced with file
-adding d/d/d
-% should fail - would corrupt dirstate
-abort: directory 'd' already in dirstate
-% removing shadow
-% should succeed - shadow removed
-% update should work at least with clean workdir
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-C a
-C b/b
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-C a/a
-C b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue660.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,140 @@
+# http://mercurial.selenic.com/bts/issue660
+
+  $ hg init
+  $ echo a > a
+  $ mkdir b
+  $ echo b > b/b
+  $ hg commit -A -m "a is file, b is dir"
+  adding a
+  adding b/b
+
+File replaced with directory:
+
+  $ rm a
+  $ mkdir a
+  $ echo a > a/a
+
+Should fail - would corrupt dirstate:
+
+  $ hg add a/a
+  abort: file 'a' in dirstate clashes with 'a/a'
+
+Removing shadow:
+
+  $ hg rm --after a
+
+Should succeed - shadow removed:
+
+  $ hg add a/a
+
+Directory replaced with file:
+
+  $ rm -r b
+  $ echo b > b
+
+Should fail - would corrupt dirstate:
+
+  $ hg add b
+  abort: directory 'b' already in dirstate
+
+Removing shadow:
+
+  $ hg rm --after b/b
+
+Should succeed - shadow removed:
+
+  $ hg add b
+
+Look what we got:
+
+  $ hg st
+  A a/a
+  A b
+  R a
+  R b/b
+
+Revert reintroducing shadow - should fail:
+
+  $ rm -r a b
+  $ hg revert b/b
+  abort: file 'b' in dirstate clashes with 'b/b'
+
+Revert all - should succeed:
+
+  $ hg revert --all
+  undeleting a
+  forgetting a/a
+  forgetting b
+  undeleting b/b
+
+  $ hg st
+
+addremove:
+
+  $ rm -r a b
+  $ mkdir a
+  $ echo a > a/a
+  $ echo b > b
+
+  $ hg addremove -s 0
+  removing a
+  adding a/a
+  adding b
+  removing b/b
+
+  $ hg st
+  A a/a
+  A b
+  R a
+  R b/b
+
+commit:
+
+  $ hg ci -A -m "a is dir, b is file"
+  $ hg st --all
+  C a/a
+  C b
+
+Long directory replaced with file:
+
+  $ mkdir d
+  $ mkdir d/d
+  $ echo d > d/d/d
+  $ hg commit -A -m "d is long directory"
+  adding d/d/d
+
+  $ rm -r d
+  $ echo d > d
+
+Should fail - would corrupt dirstate:
+
+  $ hg add d
+  abort: directory 'd' already in dirstate
+
+Removing shadow:
+
+  $ hg rm --after d/d/d
+
+Should succeed - shadow removed:
+
+  $ hg add d
+  $ hg ci -md
+
+Update should work at least with clean working directory:
+
+  $ rm -r a b d
+  $ hg up -r 0
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg st --all
+  C a
+  C b/b
+
+  $ rm -r a b
+  $ hg up -r 1
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg st --all
+  C a/a
+  C b
+
--- a/tests/test-issue672	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-# 0-2-4
-#  \ \ \
-#   1-3-5
-#
-# rename in #1, content change in #4.
-
-hg init t
-cd t
-
-touch 1
-touch 2
-hg commit -Am init  # 0
-
-hg rename 1 1a
-hg commit -m rename # 1
-
-hg co -C 0
-echo unrelated >> 2
-hg ci -m unrelated1 # 2
-
-hg merge --debug 1
-hg ci -m merge1 # 3
-
-hg co -C 2
-echo hello >> 1
-hg ci -m unrelated2 # 4
-
-hg co -C 3
-hg merge -y --debug 4
-
-hg co -C 4
-hg merge -y --debug 3
-
--- a/tests/test-issue672.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-adding 1
-adding 2
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-created new head
-  searching for copies back to rev 1
-  unmatched files in other:
-   1a
-  all copies found (* = to merge, ! = divergent):
-   1a -> 1 
-  checking for directory renames
-resolving manifests
- overwrite None partial False
- ancestor 81f4b099af3d local c64f439569a9+ remote c12dcd37c90a
- 1: other deleted -> r
- 1a: remote created -> g
-updating: 1 1/2 files (50.00%)
-removing 1
-updating: 1a 2/2 files (100.00%)
-getting 1a
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-created new head
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  searching for copies back to rev 1
-  unmatched files in local:
-   1a
-  all copies found (* = to merge, ! = divergent):
-   1a -> 1 *
-  checking for directory renames
-resolving manifests
- overwrite None partial False
- ancestor c64f439569a9 local e327dca35ac8+ remote 746e9549ea96
- 1a: local copied/moved to 1 -> m
-preserving 1a for resolve of 1a
-updating: 1a 1/1 files (100.00%)
-picked tool 'internal:merge' for 1a (binary False symlink False)
-merging 1a and 1 to 1a
-my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d
- premerge successful
-0 files updated, 1 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  searching for copies back to rev 1
-  unmatched files in other:
-   1a
-  all copies found (* = to merge, ! = divergent):
-   1a -> 1 *
-  checking for directory renames
-resolving manifests
- overwrite None partial False
- ancestor c64f439569a9 local 746e9549ea96+ remote e327dca35ac8
- 1: remote moved to 1a -> m
-preserving 1 for resolve of 1a
-removing 1
-updating: 1 1/1 files (100.00%)
-picked tool 'internal:merge' for 1a (binary False symlink False)
-merging 1 and 1a to 1a
-my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d
- premerge successful
-0 files updated, 1 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue672.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,101 @@
+# http://mercurial.selenic.com/bts/issue672
+
+# 0-2-4
+#  \ \ \
+#   1-3-5
+#
+# rename in #1, content change in #4.
+
+  $ hg init
+
+  $ touch 1
+  $ touch 2
+  $ hg commit -Am init  # 0
+  adding 1
+  adding 2
+
+  $ hg rename 1 1a
+  $ hg commit -m rename # 1
+
+  $ hg co -C 0
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ echo unrelated >> 2
+  $ hg ci -m unrelated1 # 2
+  created new head
+
+  $ hg merge --debug 1
+    searching for copies back to rev 1
+    unmatched files in other:
+     1a
+    all copies found (* = to merge, ! = divergent):
+     1a -> 1 
+    checking for directory renames
+  resolving manifests
+   overwrite None partial False
+   ancestor 81f4b099af3d local c64f439569a9+ remote c12dcd37c90a
+   1: other deleted -> r
+   1a: remote created -> g
+  updating: 1 1/2 files (50.00%)
+  removing 1
+  updating: 1a 2/2 files (100.00%)
+  getting 1a
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ hg ci -m merge1 # 3
+
+  $ hg co -C 2
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ echo hello >> 1
+  $ hg ci -m unrelated2 # 4
+  created new head
+
+  $ hg co -C 3
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ hg merge -y --debug 4
+    searching for copies back to rev 1
+    unmatched files in local:
+     1a
+    all copies found (* = to merge, ! = divergent):
+     1a -> 1 *
+    checking for directory renames
+  resolving manifests
+   overwrite None partial False
+   ancestor c64f439569a9 local e327dca35ac8+ remote 746e9549ea96
+   1a: local copied/moved to 1 -> m
+  preserving 1a for resolve of 1a
+  updating: 1a 1/1 files (100.00%)
+  picked tool 'internal:merge' for 1a (binary False symlink False)
+  merging 1a and 1 to 1a
+  my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d
+   premerge successful
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ hg co -C 4
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ hg merge -y --debug 3
+    searching for copies back to rev 1
+    unmatched files in other:
+     1a
+    all copies found (* = to merge, ! = divergent):
+     1a -> 1 *
+    checking for directory renames
+  resolving manifests
+   overwrite None partial False
+   ancestor c64f439569a9 local 746e9549ea96+ remote e327dca35ac8
+   1: remote moved to 1a -> m
+  preserving 1 for resolve of 1a
+  removing 1
+  updating: 1 1/1 files (100.00%)
+  picked tool 'internal:merge' for 1a (binary False symlink False)
+  merging 1 and 1a to 1a
+  my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d
+   premerge successful
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
--- a/tests/test-issue842	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-hg init test
-cd test
-echo foo > a
-hg ci -Ama
-
-hg up -r0000
-echo bar > a
-echo % should issue warning
-hg ci -Amb
-
-hg up -r0000
-echo stuffy > a
-echo % should not issue warning
-hg ci -q -Amc
-
-hg up -r0000
-echo crap > a
-hg branch testing
-echo % should not issue warning
-hg ci -q -Amd
--- a/tests/test-issue842.out	Fri Sep 03 22:10:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-adding a
-0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-% should issue warning
-adding a
-created new head
-0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-% should not issue warning
-0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-marked working directory as branch testing
-% should not issue warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-issue842.t	Fri Sep 03 23:34:37 2010 +0200
@@ -0,0 +1,38 @@
+# http://mercurial.selenic.com/bts/issue842
+
+  $ hg init
+  $ echo foo > a
+  $ hg ci -Ama
+  adding a
+
+  $ hg up -r0000
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ echo bar > a
+
+Should issue new head warning:
+
+  $ hg ci -Amb
+  adding a
+  created new head
+
+  $ hg up -r0000
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ echo stuffy > a
+
+Should not issue new head warning:
+
+  $ hg ci -q -Amc
+
+  $ hg up -r0000
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ echo crap > a
+  $ hg branch testing
+  marked working directory as branch testing
+
+Should not issue warning:
+
+  $ hg ci -q -Amd
+