There are a few svn repositories that use non-standard layout like this:
<path_to_project>/trunk
<path_to_project>/production
<path_to_project>/some_branchproduction and some_branch are indeed branched from trunk.
1. How do you init/clone svn repositories like that?
2. Is there a way to add a new svn branch like that (say production
or some_branch) to an existing git-svn repository that has trunk cloned?Thanks!
__Luke
-
I seem to remember that you can pass more than one `-b' option to git-
svn clone, so I'd basically do (untested):I don't know, but that'd be great indeed.
--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
You can simply add "fetch" lines to the relevant "svn-remote" section
in .git/config.--
larsh
-
I did try to add a "fetch" line for the production branch like this:
[svn-remote "svn"]
url = svn+ssh://host/svn/project
fetch = production:refs/remotes/svn-prod
fetch = trunk:refs/remotes/git-svnwhich is modeled after http://lists-archives.org/git/420712-git-svn-
remote-tracking-branch-question.htmlBut when I try to checkout the production branch like this:
git checkout -b prod remotes/svn-prod
I got this:
git checkout: updating paths is incompatible with switching branches/
forcing
Did you intend to checkout 'remotes/svn-prod' which can not be
resolved as commit?Can you shed some light on this? (git version is 1.5.3.4)
Thanks!
__Luke
-
Did you forget to run 'git svn fetch' after modifying your .git/config?
--
larsh
-
Yes, I did. It didn't seem to do anything. $? is 0. the master/trunk
is up-to-date but the production branch has never been fetched. If
this is supposed to work, the fetch might be triggered upon next
update in trunk?__Luke
-
Hmm, it works for me, I've been adding and removing branches like this
for months, but my .git/config is slightly different:[svn-remote "svn"]
url = svn://example.org
fetch = project/trunk:refs/remotes/svn/trunk
fetch = project/branches/topic:refs/remotes/svn/topicI don't know if this difference is important, though...
--
larsh
-
I tried to test this on a local repository like file:///path/project.
It seems to work and get everything properly upon git svn fetch.
However it doesn't work for the production branch. If I modify the
fetch line a bit to svn/prod instead of svn-prod and try git svn
fetch again. It would hang for about 2 minutes and return 0 and show
nothing in progress. A .git/svn/svn/prod directory is created but
it's empty.One thing that might be special for this branch is that it gets
deleted and recreated/copied all the time from trunk. I wonder if git-
svn use some kind of heuristics to determine if there is anything to
fetch and silently failing...__Luke
-
In case others encounter this problem and want to find a solution...
After some permutations, this is the config that worked for me:
[svn-remote "svn"]
url = svn+ssh://host/svn
fetch = project/trunk:refs/remotes/git-svn
fetch = project/production:refs/remotes/svn/productionThe primary difference is that I moved 'project' from url to the
fetch specs. My original single trunk config looked like this:[svn-remote "svn"]
url = svn+ssh://host/svn/project/trunk
fetch = :refs/remotes/git-svnI wish that "git svn fetch" could be more verbose about what's going
on in this case.__Luke
-
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Linus Torvalds | Re: Slow DOWN, please!!! |
| Tony Lindgren | [PATCH 37/90] ARM: OMAP: MPUIO wake updates |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Alexey Dobriyan | Re: [GIT]: Networking |
| Dushan Tcholich | Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 |
