Guest?
 
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
  • Created by   eric
    11 months ago (19 Jun 2012 22:46)
  • Updated by   Semyon Vadishev
    2 months ago (21 Mar 2013 20:43)
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
In our setting we once branched 'trunk' to 'branches/next' and from there create feature branches. In Subgit we have the '–trunk branches/next' option. However, the attached Git repo only stores history starting with the revision when 'branches/next' was branched. All history before (available in svn!) is not stored. It seems that Subgit is not tracking the parent path up for such a 'trunk'-scenario. (Note 'trunk' in svn is still existing, but development on has stopped).
Comments (8)
 
History
 
Linked Issues (?)
 
Semyon Vadishev
  Semyon Vadishev
20 Jun 2012 02:07
11 months ago
Hello Eric,

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.
eric
  eric
21 Jun 2012 09:18
11 months ago
There is another problem, the line

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/*)
Semyon Vadishev
  Semyon Vadishev
22 Jun 2012 17:17
11 months ago
There is another problem, the line
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.

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/)

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.
eric
  eric
25 Jun 2012 23:37
10 months ago
I now used

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
Semyon Vadishev
  Semyon Vadishev
26 Jun 2012 14:13
10 months ago
This is exactly the same problem — SubGit does not follow Subversion branches out of trunk & branches/features/* scope. SubGit 1.1 will fix that with support of multiple 'branches' mappings.

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.
eric
  eric
26 Jun 2012 14:19
10 months ago
Ahhh, sorry took a while to understand that no 'support' for several branches-lines in subgit.conf also implies of not being able to track branches not specified.

Sure - as we need the history, I am happy to be a tester for that feature.
Semyon Vadishev
  Semyon Vadishev
26 Jun 2012 19:08
10 months ago
I've prepared a new build with enabled support for multiple mappings. See my comment here — http://issues.tmatesoft.com/issue/SGT-434#comment=60-3967

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/*
...
Semyon Vadishev
  Semyon Vadishev
21 Mar 2013 20:43
2 months ago
Since first 2.0 EAP builds SubGit supports options like these:

branches = branches/*:refs/heads/*
branches = branches/features/*:refs/heads/features/*

So, I'm closing the issue as fixed.
Related Changes
Resolved Date
2 months ago (21 Mar 2013 20:43)
State
SubmittedFixed
Apply Command

Command Preview: