Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Retain full history of moved Subversion directory in Git using the Stash Subgit mirror plugin?

Jason S January 13, 2014
Hi,
The Subversion directory that contains our main codebase has moved several times over the years. For example:
dir1 -> dir2 -> dir3
Using the Stash Subgit plugin, the git mirror doesn't contain history before the move to "dir3". However, the full history is available in the Subversion repo.
We are not concerned about mirroring branches or tags to Git, but we'd like to retain the full history of the "trunk" if possible.
I understand this is a known limitation, but I'm wondering if anyone can suggest a workaround.
Many thanks.

4 answers

1 accepted

3 votes
Answer accepted
Semyon Vadishev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2014

Hi Jason,

SubGit imports/synchronizes only those branches and tags specified on SVN settings page. So, in order to keep the history for all the previous locations of your trunk folder, please include all those locations into trunk & branches options just as follows:

Subversion URL = http://host/svn/repo

Trunk = dir3:refs/heads/master

Branches = dir2:refs/heads/old_master; dir1:refs/heads/even_older_master; branches/*:refs/heads/*

...

With these settings specified SubGit should be able to join the history for all three locations. Also, please consider reporting your issue to our issue tracker with more details (repository layout, how it was actually changing over time, `svn log` output for corresponding revisions). We'll try to provide you with all necessary instructions as soon as possible.

Thanks,

Semyon

Jason S January 13, 2014

Thanks Semyon! I'm giving it a shot right now.

Jason S January 19, 2014

Hi Semyon,

I attempted your suggestion, however it seems to result in an infinate loop during the initial translation of the import. The revision number count keeps starting over from the beginning after reaching the end.

These are my Stash Subversion Mirror settings:

URL : svn+ssh://svn.company.com/home/svn
Branches Mapping:
Trunk: dir3:refs/heads/master
Branches: dir2:refs/heads/old_master; dir1:refs/heads/even_older_master; gitsvn/branches/*:refs/heads/*
Tags: gitsvn/tags/*
Shelves: gitsvn/shelves/*

Any other thoughts?

Regarding the issue tracker, I think my problem is the same (or very similar) to this issue: http://issues.tmatesoft.com/issue/SGT-721

Thanks!

Alexander Kitaev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2014

Hi Jason,

I attempted your suggestion, however it seems to result in an infinate loop during the initial translation of the import. The revision number count keeps starting over from the beginning after reaching the end.

This looks like a bug. Could you please send us debug log files located in <STASH_HOME>/data/repositories/<ID>/subgit/logs directory? You can find path to Git repository on Settings | Repository Details page.

You can report a new issue to our tracker with the logs attached or just send an email to support@subgit.com.

Thank you,

Semyon

Semyon Vadishev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2014

Hi Jason,

I attempted your suggestion, however it seems to result in an infinate loop during the initial translation of the import. The revision number count keeps starting over from the beginning after reaching the end.

This looks like a bug. Could you please send us debug log files located in <STASH_HOME>/data/repositories/<ID>/subgit/logs directory? You can find path to Git repository on Settings | Repository Details page.

You can report a new issue to our tracker with the logs attached or just send an email to support@subgit.com.

Thank you,

Semyon

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2014

Of course. Sorry, that was a dumb thing to say. :(

My git-svn comment still stands, or otherwise or in any case I would recommend pinging the Subgit people on Twitter to get their attention.

0 votes
Jason S January 13, 2014

Hi Charles, thanks for the reply. "git log -- dir2" does not work because the "dir2" is the root of the mirror. So "git log -- dir3" doesn't work either. However, I can see the oldest commit in the repo with "git log | tail -n 5", which is the commit creating "dir3"

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2014

Hi Jason,

If you run 'git log -- dir2' does it have any history? Or is Subgit not importing that at all?

Otherwise I know that git-svn can be better at importing weird SVN history, although be warned it's much slower than Subgit.

Cheers,

Charles

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events