views:

141

answers:

2

Much like it's possible to geotag pictures, I wonder if there is a way to automatically geolocate the code associated with a commit - or any changes - in a version control system like SVN?

I couldn't find any information about this and I don't know if for example SVN stores the IP address used by the committers, which in most situations would be enough to differentiate the different places the changes were made from.

Even in a situation where I use a repository on my own I would find it useful to know which portions of code were written at home, which at the office and which while traveling. That way one could maybe make some statistics about their performance depending on where they are.

So do you know any tool or plugin that lets one do that?

Using a different user account for each location wouldn't be a satisfactory solution, I'm really looking for something that would store the IP or use whatever other technique there might be to locate a user at the time he/she's doing changes.

+1  A: 

It might be too simple, but why not just write a shell or perl wrapper for your checkin command that appends your IP address to the checkin comment?

Mike G.
I use a closed-source GUI to access my repositories. I'd prefer a server-based solution which would be GUI-agnostic. I don't think it would work in a collaborative situation either as there will always be people who forget to use the script to append that information.
Gilles
+2  A: 

You can use svn propset as part of a checkin to include the IP address and a hook script to deny transactions that do not include it and another hook script to record a history of values. I cannot find an example where anyone has done this.

Subversion Properties

Hook Scripts

cfeduke
Interesting, but aren't properties static? I haven't seen any mention of IP address on that explanation page so I assume you meant manually writing the IP address as something to append to checking comments? Problematic for a given computer that's used in different locations.
Gilles