GCC C++ Modules TS Branch in Git from the original Subversion service

Whereas

GCC for Modules TS is mastered in Subversion. It would be fun to have it copied and available in Git. Because that’s what the cool kids use nowadays.

Specimen

  • svn://gcc.gnu.org/svn/gcc/branches/c++-modules

References

Recipe

cd /…/vault/git/svn/org.gnu.gcc
mkdir c++-modules
svnadmin create c++-modules
cat > c++-modules/hooks/pre-revprop-change <<EOF
#!/bin/sh
exit 0;
EOF
chmod +x c++-modules/hooks/pre-revprop-change

svnsync init file:///…/vault/git/svn/org.gnu.gcc/c++-modules svn://gcc.gnu.org/svn/gcc/branches/c++-modules
# one line of output
# …quick…

svnsync sync file:///…/vault/git/svn/org.gnu.gcc/c++-modules
# …lots and lots of output…
# …long time passing…
# …think "five days" as 1 rev/sec is common and you need r25500…

cd /…/vault/git/clones
git svn clone file:///…/vault/git/svn/org.gnu.gcc/c++-modules -T trunk -b branches -t tags

Also, -s is the same as -T trunk -b branches -t tags

Previously,

Recipe for subversion-to-git for rsa (of code.google.com)

Whereas

Google Code is now Dead Code Walking, it’s time to acquire copies of the necessary sources mastered there.

Specimen

rsaThe rsa project an implementation of the RSA cryptography algorithm in C++.

Recipe

$ cd /vault/git/svn/com.google.code
$ mkdir rsa
$ svnadmin create rsa
$ cat > rsa/hooks/pre-revprop-change <<EOF
#!/bin/sh
exit 0;
EOF
$ chmod +x rsa/hooks/pre-revprop-change

$ svnsync init file:///vault/git/svn/com.google.code/rsa  http://rsa.googlecode.com/svn
Copied properties for revision 0.
# (just the one line of output)

$ svnsync sync file:///vault/git/svn/com.google.code/rsa 
# ... lots and lots of output (very slow)
# (very slow)
$ cd /vault/git/clones
$ git svn clone file:///vault/git/svn/com.google.code/rsa/rsa -T trunk -b branches -t tags
Initialized empty Git repository in /vault/git/clones/rsa/.git/
Using higher level of URL: file:///vault/git/svn/com.google.code/rsa/rsa => file:///vault/git/svn/com.google.code/rsa
# (lots of output, very slow)
r70 = ec1f09d6cf45cb09d411cac386b76ade1b5da15d (refs/remotes/trunk)
Checked out HEAD:
  file:///vault/git/svn/com.google.code/rsa/rsa/trunk r70

# convert to the bare repository format
$ mv rsa/.git rsa.git
$ rm -rf rsa
$ cd rsa.git
$ git config --bool core.bare true

Also, -s or --stdlayout is the same as -T trunk -b branches -t tags

WATCHOUT – if you use --stdlayouton an inappropriate dubversion URL, then you’ll get an empty cloned git repository.  The case above has the “standard layout” occurring, not at the top level, but rather one level down; e.g. within rsa of file:///vault/git/svn/com.google.code/rsa, for a complete URL of file:///vault/git/svn/com.google.code/rsa/rsa.

Optionally

emacs rsa.git/description
touch rsa.git/git-daemon-export-ok

Previously

Recipe for subversion-to-git for mysqlpp

Whereas

mysql++ has some minor issues, it is time to develop & present the remediations.

Previously

For mod-ndb we had Recipe for subversion-to-git for mod-ndb
For dbd-modules we had git svn, svnsync | Git and Subversion

Current

mysql++ seems to be mastered at Gna!

Recipe

$ cd /vault/git/svn
$ svnadmin create mysqlpp
$ cat > mysqlpp/hooks/pre-revprop-change
#!/bin/sh
exit 0;
^D
$ chmod +x mysqlpp/hooks/pre-revprop-change
$ svnsync init file:///vault/git/svn/mysqlpp http://svn.gna.org/svn/mysqlpp
Copied properties for revision 0.

$ svnsync sync file:///vault/git/svn/mysqlpp 
... hundreds of lines ...

$ cd /vault/git/clones
$ git svn clone file:///vault/git/svn/mysqlpp -T trunk -b branches -t tags

Also, -s is the same as -T trunk -b branches -t tags

Recipe for subversion-to-git for mod-ndb

Whereas

Google Code is now Dead Code Walking, it’s time to acquire copies of the necessary sources mastered there.

Previously

For dbd-modules we had git svn, svnsync | Git and Subversion

Recipe

$ cd /vault/git/svn

$ mkdir mod-ndb

$ svnadmin create mod-ndb

$ cat > mod-ndb/hooks/pre-revprop-change <<EOF > #!/bin/sh
> exit 0;
> EOF

$ chmod a+x mod-ndb/hooks/pre-revprop-change
$ ls -alsd mod-ndb/hooks/pre-revprop-change
4 -rwxrwxr-x. 1 wbaker source 18 Apr  1 10:43 mod-ndb/hooks/pre-revprop-change

$ svnsync init file:///vault/git/svn/mod-ndb http://mod-ndb.googlecode.com/svn
Copied properties for revision 0 (svn:sync-* properties skipped)

$ svnsync sync file:///vault/git/svn/mod-ndb
Committed revision 1.
Copied properties for revision 1.
Committed revision 2.
Copied properties for revision 2.
Committed revision 3.
Copied properties for revision 3.
...hundreds of lines...

$ git svn clone file:///vault/git/svn/mod-ndb -T trunk -b branches -t tags

Also, -s is the same as -T trunk -b branches -t tags

git svn, svnsync | Git and Subversion

Whereas

Google Code is now Dead Code Walking, it’s time to acquire copies of the necessary sources mastered there.

Specimen

dbd-modulesSeveral Apache modules to allow Apache 2.2+ to access databases using DBD

References

Recipe

cd /vault/git/svn/com.google.code
mkdir dbd-modules
svnadmin create dbd-modules
cat > dbd-modules/hooks/pre-revprop-change <<EOF
#!/bin/sh
exit 0;
EOF
chmod +x dbd-modules/hooks/pre-revprop-change

svnsync init file:///vault/git/svn/com.google.code/dbd-modules  http://dbd-modules.googlecode.com/svn
# one line of output

svnsync sync file:///vault/git/svn/com.google.code/dbd-modules 
# ... lots and lots of output

cd /vault/git/clones
git svn clone file:///vault/git/svn/com.google.code/dbd-modules -T trunk -b branches -t tags

Also, -s is the same as -T trunk -b branches -t tags