views:

16

answers:

2

Hey all,

My team and I are currently working on a university project. We were given the project but it hadn't officially started, so we began work in GIT to get a head start. The coordinator of the project has now forced us to use SVN so I am attempting to use git-svn to interface the two repositories.

I can move our commits into the svn repository by .git/info/grafts so that is not the issue.

My problem is that in our course we are given participation marks which are based on our commit histories. However obviously all of our commits have my svn username because I moved them across (which im not sure would please my team mates very much).

I have looked into the git authors file, but as far as I can tell it is only used for the reverse lookup.

Now I understand that with ssh+svn I would obviously need their ssh logins (we may be willing to go to this extreme though) to spoof this information, however I have access to the repository via file:// if that helps.

So to summaries:

I need "git svn dcommit" to map git authors to their respective svn usernames and if possible (less important) have the date information correct. One caveat on that is a few authors on git have multiple git authors (which have already made commits) so I need to be able to map multiple git authors to a single svn username.

Thanks in advance for any help provided :)


A: 

To do that you will need to have account names and logins of each of your teamates and repush all commits (via a script) and constantly push it under corresponding commit.

Why don't you submit git author statistics for assessment?

Dima
Probably because the dumb T.A. can't handle it.
T.E.D.
lol nah, basically i cant do that because they use a script that calculates it based on the ammount of changes in the commit... so much for writing correct concise code the first time being a good thingbut thanks for your advice about the script.
Nick
A: 

If you have file access to the repository, you could push all the commits into subversion using your own credentials then use the command-line revision property editor to change the usernames associated with commits made by other people:

svn propset --revprop -r$REV svn:author $USER

You need file access for this, as the default rev-prop change hook disallows all changes and the supplied template will only allow log message changes, not author changes, so you'll need to set the pre-revprop-change-hook to allow your changes.

Andrew Aylett
Sorry what are the specific requisites for this? I know i need file access which shouldn't be a problem. And sorry im very svn illiterate (and proud of it ;) ) so what do you mean pre-revprop-change-hook, how do i change this?
Nick
If you look in the repository, there's a directory called 'hooks'. In it there'll be a file `pre-revprop-change.tmpl`. Read the contents and follow the instructions. You probably want to test on a scratch repository first, and you may need to learn at least a little about subversion :).
Andrew Aylett
Cool thanks i will do :)
Nick

related questions