|
Project
|
SubGit
|
|
Priority
|
Normal |
|
Type
|
Usability Problem |
|
State
|
Fixed |
|
Assignee
|
Semyon Vadishev |
|
Subsystem
|
Translator Core |
|
Affected versions
|
1.0.0 (build 1696), Miai EAP6 (build 1381) |
|
Fix versions
|
2.0 |
|
Fixed in build
|
No Fixed in build
|
Could you send us $SVN_REPOS/conf/subgit.conf file along with `svn log` output for those revisions where ^/branches/next was created. You can also run `git fetch origin refs/svn/map:refs/notes/commits` in the working tree on your machine. This way every git commit gets a note with a branch and revision it corresponds to. Have a look where goes every commit, where's the point when history becomes unexpected.
So far it looks like there's no mapping specified for ^/trunk at all. As result SubGit does not try to follow its history. That's why you get a revision where ^/trunk was copied into ^/branches/next as an addition of the whole tree in a single commit.
The following layout configuration would work well for you:
[git '<id>']
trunk = branches/next:refs/heads/master
branches = trunk:refs/heads/trunk
branches = branches/*:refs/heads/*
...
Unfortunately, current version of SubGit doesn't support multiple "git.<id>.branches" options. We plan to introduce this feature a bit later — in version 1.1. And for now I'd recommend you to use the standard layout:
[git '<id>']
trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
...
But set default git ref to refs/heads/next for the central git repository, i.e. run the following command:
git symbolic-ref HEAD refs/heads/next
This way every time one clones this repository, git checks out refs/heads/next branch by default. Hope that would be fine for you.
Thank you.
branches = trunk:refs/heads/trunk
results in
error: layout options 'branches', 'shelves', and 'tags' should have format <svn path>/* or <svn path>/*:refs/<git path>
The second solution does not work either. As we would need
trunk = branches/next:refs/heads/master
branches = trunk:refs/heads/trunk
branches = branches/features/*:refs/heads/*
i.e., we have trunk, branches/next and branches/features/* (and in fact also branches/releases/*)
branches = trunk:refs/heads/trunk
results in
error: layout options 'branches', 'shelves', and 'tags' should have format <svn path>/ or <svn path>/:refs/<git path>
Yes, as I told in my first comment we're going to fix that in SubGit 1.1 release. So, far SubGit supports only single 'branches' & 'tags' mapping per Git repository.
trunk = branches/next:refs/heads/master
branches = trunk:refs/heads/trunk
branches = branches/features/*:refs/heads/*
i.e., we have trunk, branches/next and branches/features/ (and in fact also branches/releases/)
The same's here. Please upvote this issue — http://issues.tmatesoft.com/issue/SGT-434 (if you haven't yet), we're going to give a higher priority to it right after SubGit 1.0 release.
trunk = trunk:refs/heads/master
branches = branches/features/*:refs/heads/*
and move branches/next to branches/features/next
However, the history of all feature branches starting from (old position of) next starts at the point when next was created from trunk. And the next-branch (in the new svn position) has only a single commit in the git repo:
commit c5230f19b6406ec1d8c08d6d1b6ce53cf5f0c7b9
Author: root <>
Date: Sun Jun 24 17:27:49 2012 +0000
moved
namely the one that moved it to branches/features
There is unofficial support for multiple branches and tags already, but we didn't test it yet. Would you like to try this experimental feature? It needs some hackery though.
Sure - as we need the history, I am happy to be a tester for that feature.
The problem so far is that such layout won't work:
branches = branches/*:refs/heads/*
branches = branches/features/*:refs/heads/features/*
Try to use:
trunk = branches/next:refs/heads/master
branches = trunk:refs/heads/trunk
branches = branches/*:refs/heads/*
or
trunk = branches/next:refs/heads/master
branches = trunk:refs/heads/trunk
branches = branches/features/*:refs/heads/features/*
branches = branches/releases/*:refs/heads/releases/*
tags = tags/internal/*:refs/tags/internal/*
...
branches = branches/*:refs/heads/*
branches = branches/features/*:refs/heads/features/*
So, I'm closing the issue as fixed.