local svn:externals with bzr and by-reference trees

$ bzr branch https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk
$ cd trunk/
$ svn proplist -v -R https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk | grep externals -C1
Properties on 'svn-checkout/mingw-w64-headers/ddk/include':
ddk svn://svn.reactos.org/reactos/trunk/reactos/include/ddk

$ bzr branch svn://svn.reactos.org/reactos/trunk/reactos/include/ddk mingw-w64-headers/ddk/include/ddk
$ bzr join mingw-w64-headers/ddk/include/ddk/
$ bzr ci -m "Merging svn:externals"

$ bzr merge :parent
https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk is permanently redirected to https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk/
+N mingw-w64-crt/misc/wcstof.c
+N mingw-w64-headers/direct-x/include/d3dx9shape.h
M mingw-w64-crt/ChangeLog
M mingw-w64-headers/include/ChangeLog
M mingw-w64-headers/include/dbghelp.h
All changes applied successfully.

$ bzr ci -m "merged from upstream svn"

$ bzr merge svn://svn.reactos.org/reactos/trunk/reactos/include/ddk
M mingw-w64-headers/ddk/include/ddk/hubbusif.h
M mingw-w64-headers/ddk/include/ddk/ntddk.h
M mingw-w64-headers/ddk/include/ddk/ntifs.h
M mingw-w64-headers/ddk/include/ddk/ntimage.h
M mingw-w64-headers/ddk/include/ddk/usbbusif.h
M mingw-w64-headers/ddk/include/ddk/wdm.h
All changes applied successfully.

$ bzr ci -m "Merged updates from ddk svn:externals"

If you really need to commit back. Create pristine bzr-svn import without joined externals. Merge just the revisions you want to commit and merge that into svn.

$ echo "Bzr rocks" >> sure-it-does; bzr add sure-it-does; bzr ci -m "My masive hack"
$ bzr branch :parent ../pristine
$ cd ../pristine
$ bzr merge -r-2..-1 ../trunk
$ bzr ci -m "Bingo"
$ bzr push :parent

But this will invalidate your “joined” clone.

When bzr people talk about NestedTrees we mean by-reference Nested Trees such that joining a tree doesn’t join it’s whole history but instead transperatly, rerucsivly commits to correct child branches. With by-reference nested trees you would then be able to push to correct upstreams of all externals code.


3 Responses to local svn:externals with bzr and by-reference trees

  1. bonjour je voudrait devenir administrateur chez hubuntu merci

    • Je ne parle pas francaise.

      !Hola! I don’t speak spanish either =)


    • “hello I would like to become a director of hubuntu thank you” is what google translate says.

      Well i’m just a blogger on Ubuntu Planet I can’t really do that for you. Search for “LoCo Directory” or contact past people in “hubuntu”

%d bloggers like this: