[PATCH] tests: unify test-issue522

Adrian Buehlmann adrian at cadifra.com
Sat Sep 4 04:24:48 CDT 2010


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1283592112 -7200
# Node ID 8cef7d44704fd0b209a684a0413802caac67fd62
# Parent  6a742e4d127c5a63eff72f7377d38898b3d3467f
tests: unify test-issue522

diff --git a/tests/test-issue522.out b/tests/test-issue522.out
deleted file mode 100644
--- a/tests/test-issue522.out
+++ /dev/null
@@ -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
diff --git a/tests/test-issue522 b/tests/test-issue522.t
old mode 100755
new mode 100644
rename from tests/test-issue522
rename to tests/test-issue522.t
--- a/tests/test-issue522
+++ b/tests/test-issue522.t
@@ -1,4 +1,4 @@
-#!/bin/sh
+# 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
@@ -6,26 +6,51 @@
 # makes sure that we'll use the version from p2 in the manifest of the
 # merge revision.
 
-hg init repo
-cd repo
+  $ hg init
 
-echo foo > foo
-hg ci -qAm 'add foo'
+  $ echo foo > foo
+  $ hg ci -qAm 'add foo'
 
-echo bar >> foo
-hg ci -m 'change foo'
+  $ echo bar >> foo
+  $ hg ci -m 'change foo'
 
-hg backout -r tip -m 'backout changed foo'
+  $ hg backout -r tip -m 'backout changed foo'
+  reverting foo
+  changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e
 
-hg up -C 0
-touch bar
-hg ci -qAm 'add bar'
+  $ hg up -C 0
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
-hg merge --debug
-hg debugstate | grep foo
-hg st -A foo
-hg ci -m 'merge'
+  $ touch bar
+  $ hg ci -qAm 'add bar'
 
-hg manifest --debug | grep foo
-hg debugindex .hg/store/data/foo.i
+  $ 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
+


More information about the Mercurial-devel mailing list