Re: git-svn and a nested branches folder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Russ Brown <pickscrape@xxxxxxxxx> wrote:
> Eric Wong wrote:
> > Russ Brown <pickscrape@xxxxxxxxx> wrote:
> >> Basically, we have a structure like this:
> >>
> >> |
> >> +-trunk
> >> +-tags
> >> +-branches
> >>   + category-a
> >>     + branch-a
> >>     + branch-b
> >>   + category-b
> >>     + branch-c
> >>     + branch-d

> >> The only other problem is in branch naming, which could clash if you
> >> only use the outer-most directory name, so I'd suggest something that
> >> involves concatenating the folders in the path relative to 'branches' to
> >> keep them unique (if git can handle slashes in branch names then all the
> >> better).
> > 
> > As Peter suggested, disable globbing for branches and use explicit
> > fetch refspecs for now...
> > 
> 
> I've actually knocked up a rough script which generates a list of
> refspec lines for you given a repo URL, trunk reference and branches
> directory. It uses svn log -v --xml and pipes it through a couple of
> XSLT templates, and basically looks for all copies that copy from trunk
> (recursively: so it includes branches of branches too). I can post it to
> the list if you'd find it useful or interesting.
> 
> It's generating output that looks sensible to me, but the results aren't
> quite what I'd expected. I'll paste a sample in here in case there's
> anything obvious someone might spot that I've missed
> 
> # This line was generated by git-svn init, and I kept it
> fetch = all/trunk:refs/remotes/trunk
> 
> # These lines generated by my tool, dirnames replaced for security reasons:
> 
> fetch = branches/folder/projecta:refs/remotes/svn/folder/projecta
> fetch = branches/folder/projectb:refs/remotes/svn/folder/projectb
> fetch = branches/folder/projectc:refs/remotes/svn/folder/projectc
> fetch = branches/folder/projectd:refs/remotes/svn/folder/projectd
> fetch = branches/folder/projecte:refs/remotes/svn/folder/projecte
> fetch = branches/folder/projectf:refs/remotes/svn/folder/projectf
> fetch = branches/folder/projectg:refs/remotes/svn/folder/projectg
> 
> git branch -a doesn't list any of those branches after fetch completes.
> Looking back at the output from fetch, all revisions applied were to trunk.
> 
> Anything wrong with those fetch lines?

>From your tree diagram, it seemed that trunk/ and branches/ were at
the same depth in your SVN repository.  However, in your generated
fetch lines they all started with "branches/" in front, yet your
trunk fetch line had "all/" in front of trunk, so maybe prefixing
the generated ones with "all/" helps?

> Thanks for your time.

No problem.

-- 
Eric Wong
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux