[PATCH] tests: unify test-push-hook-lock

Adrian Buehlmann adrian at cadifra.com
Mon Sep 13 12:02:24 CDT 2010


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1284397043 -7200
# Node ID 07b277957539754b394cd628aea3f3aec8050016
# Parent  7dfbffaa830e8773a7b3382dc17ac37f65ba1fa0
tests: unify test-push-hook-lock

diff --git a/tests/test-push-hook-lock.out b/tests/test-push-hook-lock.out
deleted file mode 100644
--- a/tests/test-push-hook-lock.out
+++ /dev/null
@@ -1,11 +0,0 @@
-adding foo
-updating to branch default
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-updating to branch default
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-pushing to ../2
-searching for changes
-adding changesets
-adding manifests
-adding file changes
-added 1 changesets with 1 changes to 1 files
diff --git a/tests/test-push-hook-lock b/tests/test-push-hook-lock.t
old mode 100755
new mode 100644
rename from tests/test-push-hook-lock
rename to tests/test-push-hook-lock.t
--- a/tests/test-push-hook-lock
+++ b/tests/test-push-hook-lock.t
@@ -1,13 +1,31 @@
-#!/bin/sh
-hg init 1
-echo '[ui]' >> 1/.hg/hgrc
-echo 'timeout = 10' >> 1/.hg/hgrc
-echo foo > 1/foo
-hg --cwd 1 ci -A -m foo
-hg clone 1 2
-hg clone 2 3
-echo '[hooks]' >> 2/.hg/hgrc
-echo 'changegroup.push = hg push -qf ../1' >> 2/.hg/hgrc
-echo bar >> 3/foo
-hg --cwd 3 ci -m bar
-hg --cwd 3 push ../2
+  $ hg init 1
+
+  $ echo '[ui]' >> 1/.hg/hgrc
+  $ echo 'timeout = 10' >> 1/.hg/hgrc
+
+  $ echo foo > 1/foo
+  $ hg --cwd 1 ci -A -m foo
+  adding foo
+
+  $ hg clone 1 2
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg clone 2 3
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ echo '[hooks]' >> 2/.hg/hgrc
+  $ echo 'changegroup.push = hg push -qf ../1' >> 2/.hg/hgrc
+
+  $ echo bar >> 3/foo
+  $ hg --cwd 3 ci -m bar
+
+  $ hg --cwd 3 push ../2
+  pushing to ../2
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+


More information about the Mercurial-devel mailing list