Advertising

This works very well (in fact, I use this approach for my website, too), but observe how
the "upstream" ("vendor") branch file contents (the Wordpress files) is at the same
directory level as the project itself.

With my main programming project, I'm in a very similar situation, and I'd love to
extend this idea to manage the outside, external libraries (e.g. lua, wxWidgets and
zlib) in a similar manner.

The key difference would be that the upstream branch had the libraries *not* at the top
level:

lua/
wxWidgets/
zlib/
but have them all in a single shared directory:
ExtLibs/
lua/
wxWidgets/
zlib/

This would be important to have it match the main project (master) branch, which had
both ExtLibs/ and additionally all the project-specific directories as well. For example:

abc/
bin/
ExtLibs/
lua/
wxWidgets/
zlib/
samples/
src/

(Unfortunately, none of the Git books that I've read ("Pro Git" by Chacon, "Version
control with Git" by Loeliger and McCullough, "Git" by Haenel and Plenz) mention this
technique in their subprojects chapters. In fact, when you search, the answer to "vendor
branches" seems almost always to be "submodules" or "subtrees". I see that the above has
limits of its own, but seems to be a very good solution for most cases of "vendor branch".)

In summary, all like in the blog post above, but with the extra (sub-)directory
"ExtLibs".

In this spirit, I had no problems converting my three websites from Subversion to Git,
which were never structured in the Subversion standard layout, but right from the start
like this:

works too, and also imports "vendor/", but similar to the "cafu" website above, it
doesn't create any merges regarding "vendor".
As opposed to the website, the files in the vendor branch are also at the wrong level
(ExtLibs is missing), so I cannot use grafts to manually postprocess the import!

Third, I tried to re-arrange the repository layout in Subversion first, in order to give
git-svn a better hint. That is, a Subversion test repository I made to look like this:

vendor/
ExtLibs/
lua/
wxWidgets/
zlib/

using something like "svn move vendor/ temp/", "svn move temp/ vendor/ExtLibs/
--parents", then tried again as before. But unfortunately, this created two more
revisions (and additional confusion), but didn't change anything else.

In summary, I've not been able to import the above Subversion directory into Git with
all merges intact, or at least in a manner that I was able to fix in postprocessing.

Btw., if you'd like to have a look at the real thing, the Subversion repository
URL is:
https://srv7.svn-repos.de/dev123/projects/cafu
and the authors file that I used was simply:
Carsten = Carsten Fuchs <carsten.fu...@cafu.de>
Thank you very much for reading this far!

I'm still a beginner with Git, and I'd be very grateful for any help or advice about
converting this repository.

Best regards,
Carsten
--
Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
Learn more at http://www.cafu.de
--
You received this message because you are subscribed to the Google Groups "Git for
human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/git-users?hl=en.