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

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

This widget could not be displayed.

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

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

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!

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

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

This widget could not be displayed.

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

This widget could not be displayed.

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"

This widget could not be displayed.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,320 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you