Current setup
I am running a local git repository in parallel to a svn checkout in the same folder. Whenever something new happens on the svn server I run svn update
to download the commits. Then I git add && git commit
the whole set of changes to the git repository.
Task
I want to checkout each commit separately to being able to git add && git commit
the change with the corresponding commit message from svn.
Ideas
I already found out that I can use svnversion
to retrieve the revision numbers of the working copy and the server.
// svnversion -h
usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]
Produce a compact 'version number' for the working copy path
WC_PATH. TRAIL_URL is the trailing portion of the URL used to
determine if WC_PATH itself is switched (detection of switches
within WC_PATH does not rely on TRAIL_URL). The version number
is written to standard output. For example:
$ svnversion . /repos/svn/trunk
4168
The version number will be a single number if the working
copy is single revision, unmodified, not switched and with
an URL that matches the TRAIL_URL argument. If the working
copy is unusual the version number will be more complex:
4123:4168 mixed revision working copy
4168M modified working copy
4123S switched working copy
4123P partial working copy, from a sparse checkout
4123:4168MS mixed revision, modified, switched working copy
...
Note
I would be happy to discuss ideas with you to solve the task.
A later setup would also include svn externals which is why I cannot checkout the svn repository via git-svn.