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 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

HOWTO – Modify the commit message in a Subversion repository

svn propset -r NUMBER --revprop svn:log "new log message" SVNURL
svn propset -r NUMBER --revprop svn:log --file messagefile SVNURL

Precondition

  • Ensure that the repository has been configured to allow for revprop-specific changes.

Actualities

[as Subversion Administrator (whatever that means to you)]

$ cd .../subversion_repository_filesystem/hooks
$ mv pre-revprop-change.tmpl pre-revprop-change
$ chmod a+x pre-revprop-change

[as yourself]

$ svn propset -r 34 --revprop svn:log --file better-commit-message.log  svn+ssh://svn.local/vault/trunk
property 'svn:log' set on repository revision 34
$ svn log
------------------------------------------------------------------------
r34 | wbaker | 2015-01-02 13:01:44 -0800 (Fri, 02 Jan 2015) | 9 lines

...blah blah blah...

References