repo-mirror.sh: Allow to specify the .hgrc file.

Thu, 24 Feb 2022 15:28:10 +0100

author
Goetz.Pfeiffer@helmholtz-berlin.de
date
Thu, 24 Feb 2022 15:28:10 +0100
changeset 2439
dd51aae58f05
parent 2438
2a8fd0711e15
child 2440
2bc737833b37

repo-mirror.sh: Allow to specify the .hgrc file.
Ignore-this: e6c58413c1b6f90cbbe109fcc48df0675a0f483c119c29ecee7ca151148cf2831cb0b8a091460a5c

Since the hggit extension, which is activated in the hgrc file, breaks pulling
repositories by http, hggit is not activated in my personal hgrc file.

For now, the user of repo-mirror.sh can specify a hgrc file at some othet
location which has hggit enabled just for the purpose of mercurial --> git
conversion.

bin/repo-mirror.sh file | annotate | diff | comparison | revisions
--- a/bin/repo-mirror.sh	Thu Feb 24 10:23:53 2022 +0100
+++ b/bin/repo-mirror.sh	Thu Feb 24 15:28:10 2022 +0100
@@ -186,6 +186,9 @@
   echo "              This may be needed to convert repositories that"
   echo "              are not UTF-8 encoded. Example:"
   echo "                iso8859-1 : ISO8850-1 encoding"
+  echo "--hgrc HGRCFILE:"
+  echo "              Specify the .hgrc file. This sets the environment"
+  echo "              variable HGRCPATH (see mercurial documentation)."
   echo 
   echo "-y --yes    : Create destination reposity if it doesn't exist"
   echo "              without prompting the user"
@@ -225,6 +228,10 @@
             fi
             shift 2
             ;;
+        --hgrc)
+            export HGRCPATH="$2"
+            shift 2
+            ;;
         -y | --yes)
             yes="yes"
             shift

mercurial