Skip to contentSkip to conversation

Introducing: git-cvsexportcommit

PATCH New Martin Langhoff 1 participant 1 message Jun 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Introducing: git-cvsexportcommit

A script that can replay commits git into a CVS checkout. Tries to ensure the sanity of the operation and supports mainly manual usage.

If you are reckless enough, you can ask it to autocommit when everything has applied cleanly. Combined with a couple more scripts could become part of a git2cvs gateway.

Should support adds/removes and binary files.

---
The script has been in use in-house for a few days now, so it seems to work. Should grow a matching git-cvsexport script to drive it...
---

 Documentation/git-cvsexportcommit.txt |   56 ++++++++
 Makefile                              |    2 
 git-cvsexportcommit.perl              |  225 +++++++++++++++++++++++++++++++++
 3 files changed, 282 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/git-cvsexportcommit.txt
 create mode 100755 git-cvsexportcommit.perl

applies-to: faf296a197318ad6a001a672e3b585e6fe31f37b 3c52d7ffb4ce62605a132c72170613be84b5d733

Documentation/git-cvsexportcommit.txt new file +56 -0
new file mode 100644
index 0000000..532db66
@@ -0,0 +1,56 @@
+git-cvsexportcommit(1)
+================
+
+NAME
+----
+git-cvsexportcommit - Export a commit to a CVS checkout
+
+
+SYNOPSIS
+--------
+git-cvsapplycommmit.perl 
+                        [ -h ] [ -v ] [ -c ] [ -p ] [PARENTCOMMIT] COMMITID 
+
+
+DESCRIPTION
+-----------
+Exports a commit from GIT to a CVS checkout, making it easier
+to merge patches from a git repository into a CVS repository. 
+
+Execute it from the root of the CVS working copy. GIT_DIR must be defined. 
+
+It does its best to do the safe thing, it will check that the files are 
+unchanged and up to date in the CVS checkout, and it will not autocommit 
+by default.
+
+Supports file additions, removals, and commits that affect binary files.
+
+If the commit is a merge commit, you must tell git-cvsapplycommit what parent
+should the changeset be done against. 
+
+OPTIONS
+-------
+
+-c::
+	Commit automatically if the patch applied cleanly. It will not
+	commit if any hunks fail to apply or there were other problems.
+
+-p::
+	Be pedantic (paranoid) when applying patches. Invokes patch with 
+	--fuzz=0
+
+-v::
+	Verbose.
+
+Author
+------
+Written by Martin Langhoff <[email protected]>
+
+Documentation
+--------------
+Documentation by Martin Langhoff <[email protected]>
+
+GIT
+---
+Part of the gitlink:git[7] suite
+
Makefile +1 -1
index 6c01dc2..9ee1605 100644
@@ -94,7 +94,7 @@ SCRIPT_SH = \
 SCRIPT_PERL = \
 	git-archimport.perl git-cvsimport.perl git-relink.perl \
 	git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl \
-	git-svnimport.perl git-mv.perl
+	git-svnimport.perl git-mv.perl git-cvsexportcommit.perl
 
 SCRIPT_PYTHON = \
 	git-merge-recursive.py
git-cvsexportcommit.perl new file +225 -0

225 lines not on this page · raw message

---
0.99.8.GIT