Changes

Jump to navigation Jump to search
2,710 bytes added ,  13:07, 8 February 2023
no edit summary
Line 1: Line 1: −
Initial script to take the latest version of a module and move it to Gitea.
+
==Initial script to take the latest version of a module and move it to Gitea.==
 
   
<syntaxhighlight lang="shell">
 
<syntaxhighlight lang="shell">
 
#!/bin/bash
 
#!/bin/bash
Line 67: Line 66:  
echo "Created $1 Repo in $RemoteRepoURL"
 
echo "Created $1 Repo in $RemoteRepoURL"
 
exit 0  
 
exit 0  
 +
</syntaxhighlight>
   −
 
+
==Issues:==
 
  −
</syntaxhighlight>Issues:
      
# How to partition the repos between smecontribs and core? different User? - smecontribs and smeserver directories? Then module name.With contribs10 / sme10 directories underneath, and also the common directory.
 
# How to partition the repos between smecontribs and core? different User? - smecontribs and smeserver directories? Then module name.With contribs10 / sme10 directories underneath, and also the common directory.
Line 77: Line 75:  
# Are going to hold the rpm's in the git repo as well? Otherwise we need the .gitignore set to *.rpm
 
# Are going to hold the rpm's in the git repo as well? Otherwise we need the .gitignore set to *.rpm
 
# I presume we will hold the file tree tar file in git?
 
# I presume we will hold the file tree tar file in git?
# I also presume that we will have one git repo per module? Rather than share a repo across all modules?
+
# I also presume that we will have one git repo per module? Rather than share Importing the a repo across all modules?
#
+
 
#
+
 
#
+
==Bringing across all the CVS history as well...==
 +
 
 +
According to google, git has a parameter "cvsimport" since version 2.1, however the version in my Rocky 8 system is 2.3.1, but has not such parameter.  Latest comments I can find are for 2012, and some say it is not very reliable, so I suspect it has been withdrawn.
 +
 
 +
Only tool I can find is "cvs-fast-import" which will work with git-fast-import to import all the CVS data (inc history)
 +
 
 +
No rpms seem to exist, so I am having to build it on the Rocky 8 system (on which I also have CVS installed, and have access to the SME CVS)
 +
 
 +
Code for cvs-fast-import is here : https://gitlab.com/esr/cvs-fast-export
 +
 
 +
I needed
 +
 
 +
<syntaxhighlight lang="shell">
 +
 
 +
git clone https://gitlab.com/esr/cvs-fast-export
 +
cd cvs-fast-export
 +
sudo dnf install dnf-plgins-core
 +
sudo dnf install epel-release
 +
sudo dnf config-manager --set-enabled powertools
 +
sudo buildprep --doc
 +
make install-bin
 +
make install
 +
 
 +
[brianr@rockysmebuild cvs-fast-export]$ cvs-fast-export --help
 +
Usage: cvs-fast-export [OPTIONS] [FILE]...
 +
Parse RCS files and emit a fast-import stream.
 +
 
 +
Mandatory arguments to long options are mandatory for short options too.
 +
-h --help                      This help
 +
-g --graph                      Dump the commit graph
 +
-V --version                    Print version
 +
-w --commit-time-window=WINDOW  Time window for commits(seconds)
 +
-c --content-only              Don't trust commit-IDs
 +
-l --log=LOG_FILE              Log file
 +
-a --authorlist                Report committer IDs from repository
 +
-A --authormap=AUTHOR_MAP      Author map file
 +
-R --revision-map=REV_MAP      Revision map file
 +
-r --reposurgeon                Issue cvs-revision properties
 +
-T                              Force deterministic dates
 +
-e --remote=REMOTE              Relocate branches to refs/remotes/REMOTE
 +
-s --strip=PREFIX              Strip the given PREFIX instead of longest common prefix
 +
-p --progress                  Enable load-status reporting
 +
-P --promiscuous                Process files without ,v extension
 +
-v --verbose                    Show verbose progress messages
 +
-q --quiet                      Suppress normal warnings
 +
-i --incremental=TIME          Incremental dump beginning after specified RFC3339-format TIME.
 +
-t --threads=N                  Use threaded scheduler with N threads for CVS master analyses.
 +
-E --embed-id                  Embed CVS revisions in the commit messages.
 +
 
 +
Example: find | cvs-fast-export
 +
[brianr@rockysmebuild cvs-fast-export]$
 +
 
 +
</syntaxhighlight>
 +
 
 +
It includes a "cvsconvert" script which runs cvs-fast-convert and writes to a git repo.
 +
 
 +
HOWEVER it needs access to the CVS files, not just the cvs client!

Navigation menu