pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cvs2hg: support cvs2fossil's -s flag



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By:	wiz
Date:		Sat Jul 8 09:18:55 2023 +0200
Changeset:	f94a15cdac4f30fd3591b4a59d6e93c6892a19e2

Modified Files:
	cvs2hg/files/cvs2hg
	cvs2hg/files/cvs2hg.1

Log Message:
cvs2hg: support cvs2fossil's -s flag

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f94a15cdac4f30fd3591b4a59d6e93c6892a19e2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cvs2hg/files/cvs2hg   |  6 ++++--
 cvs2hg/files/cvs2hg.1 | 12 +++++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diffs:
diff --git a/cvs2hg/files/cvs2hg b/cvs2hg/files/cvs2hg
index 059c72786c..fffb3f1a33 100644
--- a/cvs2hg/files/cvs2hg
+++ b/cvs2hg/files/cvs2hg
@@ -34,7 +34,8 @@ set -e
 USAGE="usage: $0 [-f fixup-sql-script] [-m mailmap] source-cvs-rsync-path target-path"
 fixup=""
 mailmap=""
-while getopts f:m: f
+merge_limit_seconds=""
+while getopts f:m:s: f
 do
     case $f in
 	f)      fixup="-f$OPTARG";;
@@ -43,6 +44,7 @@ do
 		    /*);;
 		    *) mailmap="../$OPTARG";;
 		esac;;
+	s)	merge_limit_seconds="-s$OPTARG";;
         \?)     echo "$USAGE" >&2; exit 1;;
     esac
 done
@@ -55,7 +57,7 @@ then
 fi
 SRC="$1"
 BASE="$2"
-cvs2fossil -m "$SRC" $fixup "$BASE"
+cvs2fossil -m $fixup $merge_limit_seconds "$SRC" "$BASE"
 # creates "$BASE" and "$BASE".fossil, but we don't need "$BASE"
 rm -f "$BASE"
 # convert to git
diff --git a/cvs2hg/files/cvs2hg.1 b/cvs2hg/files/cvs2hg.1
index 9846b3c23e..e25dd8c9b4 100644
--- a/cvs2hg/files/cvs2hg.1
+++ b/cvs2hg/files/cvs2hg.1
@@ -37,6 +37,7 @@
 .Nm
 .Op Fl f Ar fixup-sql-script
 .Op Fl m Ar mailmap
+.Op Fl s Ar merge-limit-seconds
 .Ar source
 .Ar destination
 .Sh DESCRIPTION
@@ -69,15 +70,20 @@ and finally
 the Mercurial repository created from the git one by
 .Xr hg 1 .
 .Pp
+You can pass an SQL fixup script for
+.Xr cvs2fossil 1
+using the
+.Fl f
+flag.
 You can pass a
 .Xr gitmailmap 5
 file for creating proper author information using the
 .Fl m
 flag.
-You can pass an SQL fixup script for
-.Xr cvs2fossil
+You can pass a merge time limit in seconds to
+.Xr cvs2fossil 1
 using the
-.Fl f
+.Fl s
 flag.
 .Sh EXAMPLES
 To convert the NetBSD src repository, if you have developer access, do:


Home | Main Index | Thread Index | Old Index