changeset 410:5be08fa6b4ba

New setup methods for test repositories
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 28 Jan 2020 09:50:40 +0100
parents eea4223c5163
children 4c2088eea12c
files tests/lib-test-timestamps.sh
diffstat 1 files changed, 23 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/lib-test-timestamps.sh	Tue Jan 28 09:17:54 2020 +0100
+++ b/tests/lib-test-timestamps.sh	Tue Jan 28 09:50:40 2020 +0100
@@ -165,7 +165,7 @@
 
 
 #
-# Prepare a bare repo
+# Prepare a bare repo w/o any extension
 #
 # prepare_bare_repo REPO SHOW_OUTPUT
 #
@@ -174,3 +174,25 @@
     SHOW_OUTPUT="$2"
     hg init "$1"
 }
+
+#
+# Prepare a minimal repo with just timestamps, shelve and rebase
+#
+# prepare_mini_repo REPO SHOW_OUTPUT
+#
+prepare_mini_repo() {
+    _check_environment || return 1
+    SHOW_OUTPUT="$2"
+    hg init "$1"
+    cd "$1"
+    touch .hgtimestamps
+    cat >>$LOCAL_HGRCPATH <<EOF
+[extensions]
+shelve=
+rebase=
+timestamps=$LOCAL_TESTDIR/../extensions/timestamps.py
+EOF
+    hg add .hgtimestamps
+    hg commit -m 'Activate timestamps'
+    cd ..
+}