* question: connecting to multiple remote svn projects @ 2009-11-06 17:55 Dave Rodgman 2009-11-06 19:51 ` Avery Pennarun 0 siblings, 1 reply; 4+ messages in thread From: Dave Rodgman @ 2009-11-06 17:55 UTC (permalink / raw) To: git Hi, Given a layout in a single subversion repository like this: module1/branches/1.0/work module2/branches/1.0/work I would like achieve the following layout locally, in git: module1/work module2/work Obviously I can create multiple git repositories in separate directories, but I would like them to be in a single repository. I can also get the same layout as subversion, but this breaks various bits of build infrastructure. I've fiddled with --branches, etc on git svn init but can't figure out how to achieve this. I don't care about tracking the subversion branches in git, or being able to switch between subversion branches. Is this possible? How can I do this? many thanks Dave ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question: connecting to multiple remote svn projects 2009-11-06 17:55 question: connecting to multiple remote svn projects Dave Rodgman @ 2009-11-06 19:51 ` Avery Pennarun 2009-11-09 10:59 ` Dave Rodgman 0 siblings, 1 reply; 4+ messages in thread From: Avery Pennarun @ 2009-11-06 19:51 UTC (permalink / raw) To: Dave Rodgman; +Cc: git On Fri, Nov 6, 2009 at 12:55 PM, Dave Rodgman <dav1dr@eml.cc> wrote: > Given a layout in a single subversion repository like this: > > module1/branches/1.0/work > module2/branches/1.0/work > > I would like achieve the following layout locally, in git: > > module1/work > module2/work > > Obviously I can create multiple git repositories in separate directories, > but I would like them to be in a single repository. I can also get the > same layout as subversion, but this breaks various bits of build > infrastructure. Can you just create the file structure you want using symlinks? That would be the easiest way. > I don't care about tracking the subversion branches in git, or being able > to switch between subversion branches. Don't care about tracking *any* subversion history, or just the history of branches other than the 1.0 branch you've listed above? I assume the latter, because otherwise the problem is easy (just copy the latest revision of the files into a git repo and commit). Other options that might work for you: create a "superproject" branch and import the two modules using git-submodule, or else import them using git-subtree (http://github.com/apenwarr/git-subtree). Or import the svn history and then use git-filter-branch to move stuff around. Good luck. Avery ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question: connecting to multiple remote svn projects 2009-11-06 19:51 ` Avery Pennarun @ 2009-11-09 10:59 ` Dave Rodgman 2009-11-09 18:43 ` Avery Pennarun 0 siblings, 1 reply; 4+ messages in thread From: Dave Rodgman @ 2009-11-09 10:59 UTC (permalink / raw) To: git >> Given a layout in a single subversion repository like this: >> >> module1/branches/1.0/work >> module2/branches/1.0/work >> >> I would like achieve the following layout locally, in git: >> >> module1/work >> module2/work >> >> Obviously I can create multiple git repositories in separate >> directories, but I would like them to be in a single repository. I can >> also get the same layout as subversion, but this breaks various bits of >> build infrastructure. > > Can you just create the file structure you want using symlinks? That > would be the easiest way. It would, and this is what I do on Linux. On Windows, obviously, this doesn't work. >> I don't care about tracking the subversion branches in git, or being >> able to switch between subversion branches. > > Don't care about tracking *any* subversion history, or just the history > of branches other than the 1.0 branch you've listed above? I assume the > latter, because otherwise the problem is easy (just copy the latest > revision of the files into a git repo and commit). Indeed. I want history, but only for a given branch. > Other options that might work for you: create a "superproject" branch > and import the two modules using git-submodule, or else import them > using git-subtree (http://github.com/apenwarr/git-subtree). Or import > the svn history and then use git-filter-branch to move stuff around. As far as I can understand, git-submodule pulls in a specific commit, as does git subtree? I've experimented a little but with not much success. I want "git svn rebase" (or some equivalent command, or series of commands) to update the contents of module1/work to the latest commit into this branch, and similarly "git svn dcommit" should also commit into module1, module2, etc. Basically, I want my working copy to have the same functionality as if moduleX/work was the actual layout in subversion. I'm using git as a client for a svn repository, rather than doing a one-time import. Is this possible? thanks for your help Dave ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question: connecting to multiple remote svn projects 2009-11-09 10:59 ` Dave Rodgman @ 2009-11-09 18:43 ` Avery Pennarun 0 siblings, 0 replies; 4+ messages in thread From: Avery Pennarun @ 2009-11-09 18:43 UTC (permalink / raw) To: Dave Rodgman; +Cc: git On Mon, Nov 9, 2009 at 5:59 AM, Dave Rodgman <dav1dr@eml.cc> wrote: > As far as I can understand, git-submodule pulls in a specific commit, > as does git subtree? I've experimented a little but with not much success. Well, they both pull in a specific commit *and* all the history leading up to it, although the two of them do it in slightly different ways. > I want "git svn rebase" (or some equivalent command, or series of > commands) to update the contents of module1/work to the latest commit > into this branch, and similarly "git svn dcommit" should also commit into > module1, module2, etc. Basically, I want my working copy to have the same > functionality as if moduleX/work was the actual layout in subversion. I'm > using git as a client for a svn repository, rather than doing a one-time > import. Is this possible? Yes. Both tools will work for two-way svn import/export, although submodules will probably be a bit more convenient. Essentially, you create one branch (and one git-svn remote entry) for each svn subproject, and one branch for the combined project. In the combined project, your .gitmodules should use '.' as the submodule repository path (since all your submodule objects are in the same local repo). Then you 'git svn fetch' to retrieve the latest from each svn project. Then, in each submodule, you can 'git pull .. git-svn-branchname' to get the latest stuff from git-svn for that branch. Then, in the combined project, you 'git commit' to lock in those commits. It's a little screwy, but it works :) Avery ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-09 18:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-06 17:55 question: connecting to multiple remote svn projects Dave Rodgman 2009-11-06 19:51 ` Avery Pennarun 2009-11-09 10:59 ` Dave Rodgman 2009-11-09 18:43 ` Avery Pennarun
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).