Tuesday, October 26, 2010

Patching with a svn/git diff...

I joined Singular development when CVS was used and contributed to the switch to Subversion (http://www.singular.uni-kl.de/svn/) which is currently being used.

AFAIK, before CVS there was RCS used, which resulted in such funny file versions as: ;-)

At the moment we are working on Singular refactoring from bottom up and rely on git (http://developer.berlios.de/projects/singular/) for keeping our development branch (spielwiese) up to date with the official SVN Trunk (master).

Our git repo was imported by me using git-svn, which as it turned out, don't care for newly created SVN branches (such as Alexandr Dreyer's psico). (Btw, can there anything be done about that???). On the other side we don't commit to SVN from git.

That is why i needed an indirect connection in both ways, and the easiest found way was the following one:

  1. generate diff: "svn diff" / "git diff [--no-prefix]"
  2. and apply it with "patch -p0/-p1".

See http://stackoverflow.com/questions/659467/how-to-apply-svn-diff-to-git and http://tamsler.blogspot.com/2009/02/patching-with-git-diff.html.

Unfortunately, the method is too forgetfull as it leaves out all of the meta info (commit messages/authors/datestamps etc). Any comments on that?

Anyway, i hope that helps...

No comments:

Post a Comment