[Git] Extracting libraries from the svn sandbox

One of the issues that came up in the documentation discussion was the desire to extract still useful sub-trees from the old svn sandbox, and to move them to GitHub. I've been able to extract my proposed endian library from the sandbox, history and all. Here was the process: 1) Created a empty repository named "endian" in my GitHub account via the usual web interface. 2) From the command line, in a temporary directory: git svn clone https://svn.boost.org/svn/boost/sandbox/endian (Got a "Error validating server certificate...", and gave "p" as a response to the "(R)eject, accept (t)emporarily or accept (p)ermanently?" query. The process ran for perhaps 10 minutes, but that was fine because it was successful at recovering history. And it is a one-time process.) cd endian git branch -d git-svn git push --mirror git@github.com:Beman/endian.git That's it! The git branch command deletes the git-svn branch, which is an artifact of the conversion process. Finish off by cloning the library in its permanent local location: cd permanent-local-location git clone git@github.com:Beman/endian.git Comments? Is there a better way to do this? Once comments have come in, I'll create a doc page for doing this, with a link from the FAQ. --Beman

On Wed, Dec 12, 2012 at 9:57 PM, Beman Dawes <bdawes@acm.org> wrote:
git svn clone https://svn.boost.org/svn/boost/sandbox/endian [...] Comments? Is there a better way to do this?
This approach has the following disadvantages (which might or might not be important to you): - it will add git-svn-id lines to all commit messages - the commit authors will have invalid email addresses - their names will be the username in the svn repository In case some or all of these issues bother you, I've successfully used the following instructions to create repositories that pretty much look like regular git repositories: http://stackoverflow.com/a/3972103/92542 Basically, for the first issue, you can pass "--no-metadata" to "git svn clone". And for the other issues you can provide a mapping from svn user to git user in a text file and pass it to "git svn clone" via "-A". Best, Mika

Even though I have yet to try this.. Which I'll do later tonight when I get home.. It's possible with subversion 1.7 to just use the svnrdump command to dump out a subtree from svn with history. Then to load it back up to to Github through their subversion interface. Thereby preserving all history, including branches if you follow the trunk/branches naming or manually load back into trunk and branches individually. I'll post some steps later tonight as to how the results look like. On Wed, Dec 12, 2012 at 4:06 PM, Mika Fischer <mika.fischer@zoopnet.de>wrote:
On Wed, Dec 12, 2012 at 9:57 PM, Beman Dawes <bdawes@acm.org> wrote:
git svn clone https://svn.boost.org/svn/boost/sandbox/endian [...] Comments? Is there a better way to do this?
This approach has the following disadvantages (which might or might not be important to you): - it will add git-svn-id lines to all commit messages - the commit authors will have invalid email addresses - their names will be the username in the svn repository
In case some or all of these issues bother you, I've successfully used the following instructions to create repositories that pretty much look like regular git repositories: http://stackoverflow.com/a/3972103/92542
Basically, for the first issue, you can pass "--no-metadata" to "git svn clone". And for the other issues you can provide a mapping from svn user to git user in a text file and pass it to "git svn clone" via "-A".
Best, Mika
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Mika Fischer wrote:
This approach has the following disadvantages (which might or might not be important to you): - it will add git-svn-id lines to all commit messages - the commit authors will have invalid email addresses - their names will be the username in the svn repository
In case some or all of these issues bother you, I've successfully used the following instructions to create repositories that pretty much look like regular git repositories: http://stackoverflow.com/a/3972103/92542
Basically, for the first issue, you can pass "--no-metadata" to "git svn clone". And for the other issues you can provide a mapping from svn user to git user in a text file and pass it to "git svn clone" via "-A".
Reference for those who want to further study this option: I believe the approach is also discussed (and advocated) in the ProGit book. -Julian

On Wed, Dec 12, 2012 at 5:06 PM, Mika Fischer <mika.fischer@zoopnet.de> wrote:
On Wed, Dec 12, 2012 at 9:57 PM, Beman Dawes <bdawes@acm.org> wrote:
git svn clone https://svn.boost.org/svn/boost/sandbox/endian [...] Comments? Is there a better way to do this?
This approach has the following disadvantages (which might or might not be important to you): - it will add git-svn-id lines to all commit messages
Interesting, but I actually like those commit message additions.
- the commit authors will have invalid email addresses - their names will be the username in the svn repository
In case some or all of these issues bother you, I've successfully used the following instructions to create repositories that pretty much look like regular git repositories: http://stackoverflow.com/a/3972103/92542
Basically, for the first issue, you can pass "--no-metadata" to "git svn clone". And for the other issues you can provide a mapping from svn user to git user in a text file and pass it to "git svn clone" via "-A".
Ah! That's a nice touch. Thanks, --Beman

I tried using the possible more direct svnrdump command (to talk to the github subversion bridge directly) and failed. It seems the github bridge doesn't support the svn webdav commands svn 1.7 uses. So I tried Beman's suggested commands.. On Wed, Dec 12, 2012 at 2:57 PM, Beman Dawes <bdawes@acm.org> wrote:
One of the issues that came up in the documentation discussion was the desire to extract still useful sub-trees from the old svn sandbox, and to move them to GitHub.
I've been able to extract my proposed endian library from the sandbox, history and all. Here was the process:
1) Created a empty repository named "endian" in my GitHub account via the usual web interface.
1.5) Create an authors mapping file that has lines to match your github account: echo "grafik = Rene Rivera <grafikrobot@gmail.com>" > github-authors.txt
2) From the command line, in a temporary directory:
git svn clone https://svn.boost.org/svn/boost/sandbox/endian
I added "-Agithub-authors.txt": git svn clone -Agithub-authors.txt https://svn.boost.org/svn/boost/sandbox/boost/predef
(Got a "Error validating server certificate...", and gave "p" as a response to the "(R)eject, accept (t)emporarily or accept (p)ermanently?" query. The process ran for perhaps 10 minutes, but that was fine because it was successful at recovering history. And it is a one-time process.)
As I was experimenting I ended up running it multiple times.. And it worked the first time. Then after deleting/resetting it stopped working subsequent times. Even after trying the exact initial command. So it seems it's rather fragile? cd endian
git branch -d git-svn
It error-ed for me at that point.
git push --mirror git@github.com:Beman/endian.git
I pushed the repo anyway, using the HTTPS protocol: git push --mirror https://github.com/grafikrobot/boost-predef.git That's it! The git branch command deletes the git-svn branch, which is
an artifact of the conversion process.
Finish off by cloning the library in its permanent local location:
cd permanent-local-location git clone git@github.com:Beman/endian.git
I wouldn't bother with this part for documentation. As it's just using git. I sure hope there's a better way to do this.. As I can't seem to make it work more than once. And if it can't be replicated.. I wouldn't recommend this procedure. I have to say.. I keep being underwhelmed by git :-\ -- -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

On 13 December 2012 05:12, Rene Rivera <grafikrobot@gmail.com> wrote:
I tried using the possible more direct svnrdump command (to talk to the github subversion bridge directly) and failed.
Using git svn seems to be expensive, especially with our repo's complicated history. If it can reduce the server load, it might be worth using that technique to transfer individual sandbox libraries to a fresh subversion server. Hopefully, it isn't too hard to automate.

On Thu, Dec 13, 2012 at 6:07 AM, Daniel James <dnljms@gmail.com> wrote:
On 13 December 2012 05:12, Rene Rivera <grafikrobot@gmail.com> wrote:
I tried using the possible more direct svnrdump command (to talk to the github subversion bridge directly) and failed.
Using git svn seems to be expensive, especially with our repo's complicated history. If it can reduce the server load, it might be worth using that technique to transfer individual sandbox libraries to a fresh subversion server. Hopefully, it isn't too hard to automate.
Since git svn to pull stuff out of the sandbox is just a one-time procedure, and will only be used for a small number of libraries, it doesn't seem worth it to do any optimization. --Beman

On Thu, Dec 13, 2012 at 12:12 AM, Rene Rivera <grafikrobot@gmail.com> wrote:
I tried using the possible more direct svnrdump command (to talk to the github subversion bridge directly) and failed. It seems the github bridge doesn't support the svn webdav commands svn 1.7 uses. So I tried Beman's suggested commands..
...
1.5) Create an authors mapping file that has lines to match your github account:
echo "grafik = Rene Rivera <grafikrobot@gmail.com>" > github-authors.txt
2) From the command line, in a temporary directory:
git svn clone https://svn.boost.org/svn/boost/sandbox/endian
I added "-Agithub-authors.txt":
git svn clone -Agithub-authors.txt https://svn.boost.org/svn/boost/sandbox/boost/predef
I'm not recommending -A. It doesn't seem very robust.
(Got a "Error validating server certificate...", and gave "p" as a response to the "(R)eject, accept (t)emporarily or accept (p)ermanently?" query. The process ran for perhaps 10 minutes, but that was fine because it was successful at recovering history. And it is a one-time process.)
I've changed the recommendation to use http rather than https.
As I was experimenting I ended up running it multiple times.. And it worked the first time. Then after deleting/resetting it stopped working subsequent times. Even after trying the exact initial command. So it seems it's rather fragile?
If there is any kind of a failure, delete the temporary directory and start over at the beginning. Restarts are probably doable by someone who understands the way the svn <---> git bridge works, but if they know that much they probably aren't following my instructions anyhow.
cd endian
git branch -d git-svn
It error-ed for me at that point.
Turns out that step isn't needed anyhow.
git push --mirror git@github.com:Beman/endian.git
I pushed the repo anyway, using the HTTPS protocol:
git push --mirror https://github.com/grafikrobot/boost-predef.git
That's it! The git branch command deletes the git-svn branch, which is
an artifact of the conversion process.
Finish off by cloning the library in its permanent local location:
cd permanent-local-location git clone git@github.com:Beman/endian.git
I wouldn't bother with this part for documentation. As it's just using git.
The docs are aimed at new Git users, and reinforcing their growing understanding.
I sure hope there's a better way to do this.. As I can't seem to make it work more than once. And if it can't be replicated.. I wouldn't recommend this procedure.
I've run the procedure several times, and it has been reliable for me as long as I stuck to the Basic Procedure.
I have to say.. I keep being underwhelmed by git :-\
Moving from svn to git is like moving from C to C++. If all you ever do is write C programs in C++, then C++ is underwhelming, and that's being charitable. Same for Git - If all you ever do with git is what you did with svn, then git is underwhelming, and that is being charitable. It is when you do something that you couldn't do well, or even at all with svn, that git starts to appear in a different light. --Beman

On Thu, Dec 13, 2012 at 11:15 AM, Beman Dawes <bdawes@acm.org> wrote:
On Thu, Dec 13, 2012 at 12:12 AM, Rene Rivera <grafikrobot@gmail.com> wrote:
I tried using the possible more direct svnrdump command (to talk to the github subversion bridge directly) and failed. It seems the github bridge doesn't support the svn webdav commands svn 1.7 uses. So I tried Beman's suggested commands..
...
1.5) Create an authors mapping file that has lines to match your github account:
echo "grafik = Rene Rivera <grafikrobot@gmail.com>" > github-authors.txt
2) From the command line, in a temporary directory:
git svn clone https://svn.boost.org/svn/boost/sandbox/endian
I added "-Agithub-authors.txt":
git svn clone -Agithub-authors.txt https://svn.boost.org/svn/boost/sandbox/boost/predef
I'm not recommending -A. It doesn't seem very robust.
The only problem I see is that you need all the authors listed. Is there something else?
As I was experimenting I ended up running it multiple times.. And it worked the first time. Then after deleting/resetting it stopped working subsequent times. Even after trying the exact initial command. So it seems it's rather fragile?
If there is any kind of a failure, delete the temporary directory and start over at the beginning. Restarts are probably doable by someone who understands the way the svn <---> git bridge works, but if they know that much they probably aren't following my instructions anyhow.
I tried many times to start from a clean slate. I.e. delete the local git directory and trying the clone again. The result is that when it gets to the end of downloading the svn revisions it abruptly stops (without any messages).. And the git repo is left empty. Not even an error message, and no seeming way to make it be verbose enough to decipher where it fails. Hence why I'm unimpressed.. But by now everyone knows my feelings about git, so I'll make this my last comment on that. -- -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

On Thu, Dec 13, 2012 at 11:30 AM, Rene Rivera <grafikrobot@gmail.com> wrote:
On Thu, Dec 13, 2012 at 11:15 AM, Beman Dawes <bdawes@acm.org> wrote:
On Thu, Dec 13, 2012 at 12:12 AM, Rene Rivera <grafikrobot@gmail.com> wrote:
I tried many times to start from a clean slate. I.e. delete the local git directory and trying the clone again. The result is that when it gets to the end of downloading the svn revisions it abruptly stops (without any messages).. And the git repo is left empty. Not even an error message, and no seeming way to make it be verbose enough to decipher where it fails.
OK, finally figured out what the user error was.. I had introduced a typo in the URL at some point and the clone wasn't finding anything. Hence the empty, and marked invalid, resulting git repo. I did get the authors file to work too. And the commits in github show up as being done by me. You can see the result at <https://github.com/grafikrobot/boost-predef>. I'm attaching the authors file that I used (it just has myself in it). Perhaps we can create a fully populated authors file for others to use? PS.. I'll see about responding to the testing related email tomorrow. Time to sleep now. -- -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

on Thu Dec 13 2012, Beman Dawes <bdawes-AT-acm.org> wrote:
On Thu, Dec 13, 2012 at 12:12 AM, Rene Rivera <grafikrobot@gmail.com> wrote:
I tried using the possible more direct svnrdump command (to talk to the github subversion bridge directly) and failed. It seems the github bridge doesn't support the svn webdav commands svn 1.7 uses. So I tried Beman's suggested commands..
...
1.5) Create an authors mapping file that has lines to match your github account:
echo "grafik = Rene Rivera <grafikrobot@gmail.com>" > github-authors.txt
2) From the command line, in a temporary directory:
git svn clone https://svn.boost.org/svn/boost/sandbox/endian
I added "-Agithub-authors.txt":
git svn clone -Agithub-authors.txt https://svn.boost.org/svn/boost/sandbox/boost/predef
I'm not recommending -A. It doesn't seem very robust.
IMO you really do want author translation when using git-svn. -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost

On Wed, Dec 12, 2012 at 3:57 PM, Beman Dawes <bdawes@acm.org> wrote:
One of the issues that came up in the documentation discussion was the desire to extract still useful sub-trees from the old svn sandbox, and to move them to GitHub.
I've been able to extract my proposed endian library from the sandbox, history and all. Here was the process:
I've now created a doc page. See https://svn.boost.org/trac/boost/wiki/ExtractSandbox --Beman

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Beman Dawes Sent: Thursday, December 13, 2012 5:18 PM To: Boost Developers List Subject: Re: [boost] [Git] Extracting libraries from the svn sandbox
On Wed, Dec 12, 2012 at 3:57 PM, Beman Dawes <bdawes@acm.org> wrote:
One of the issues that came up in the documentation discussion was the desire to extract still useful sub-trees from the old svn sandbox, and to move them to GitHub.
I've been able to extract my proposed endian library from the sandbox, history and all. Here was the process:
I've now created a doc page. See https://svn.boost.org/trac/boost/wiki/ExtractSandbox
Windows ======== * I needed to have a cmd.exe 'run with administrator'. * I was not certain if I was 'bashing' or 'batting' but talk of "making sure git-bash was in my path before Cygwin" made start 'bashing' but then got to the symlink and decided I should be 'batting' after all. I presume 'POSIX' mean all non-Windows platforms? * A single typo will scupper the whole thing. The process really needs automating with the library name as a parameter. * Some steps to show that the directory structure is right, and also to show that the symlinks are right too would be useful. I installed symlinks $ sudo apt-get install symlinks which warms of dangling links (pointing to nowhere/nothing) Ubuntu ====== * I needed to install git - not just logging in to it. Permission denied (publickey). fatal: The remote end hung up unexpectedly * Perhaps because of this, I had to install a new SSH key, a messy business (but well described) * I considered adding b2 and bjam to the PATH in .bashrc . But instead did boost-root/build/v2$sudo install b2 /usr/bin I ran the test OK in both cases. Moving an existing sandbox library Pierre Talbot's 2011 GSoC project checks. ============================================================== * I needed to have a cmd.exe 'Run with administrator'. https://svn.boost.org/trac/boost/wiki/ExtractSandbox Worked OK for me. More details in attached zip. H:\git-temp>git svn clone http://svn.boost.org/svn/boost/sandbox/SOC/2011/checks Initialized empty Git repository in h:/git-temp/checks/.git/ W: Ignoring error from SVN, path probably does not exist: (175007): HTTP Path Not Found: REPORT request failed on '/svn/boost/!svn/bc/100/sandbox/SOC/2011/checks': '/svn/boost/!svn/bc/100/sandbox/SOC/2011/checks' path not found W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories Checked through r42900.... eventually up to r81158 Took a couple of kiloseconds to scan all the Boost revisions! (Time for tea ;-) And blew the top of the DOS box buffer :-( (So better to send to a log file?) <snip> r77300 = 5194d8002858ca4816b0050690cb18a3ea057f65 (refs/remotes/git-svn) M libs/checks/test/test_checks.cpp ... W: -empty_dir: boost/checks/prechecksum.hpp r80904 = 84349968d807fb7ea02206479e516534fa53ceec (refs/remotes/git-svn) M boost/checks/checksum.hpp M boost/checks/modulus97.hpp M boost/checks/mastercard.hpp M libs/checks/doc/doxygen/doxywarn.log r81158 = d08cbb13b856f3e4fa9dcc3881809a5a2e9af765 (refs/remotes/git-svn) Checked out HEAD: http://svn.boost.org/svn/boost/sandbox/SOC/2011/checks r81158 Will RTFM for what the letter A, D and M mean. I:\boost-trunk\libs>git clone git@github.com:pabristow/checks.git Cloning into 'checks'... Enter passphrase for key '/c/Users/Paul/.ssh/id_rsa': remote: Counting objects: 3785, done. remote: Compressing objects: 100% (697/697), done. remote: Total 3785 (delta 2732), reused 3785 (delta 2732) Receiving objects: 100% (3785/3785), 6.40 MiB | 496 KiB/s, done. Resolving deltas: 100% (2732/2732), done. Rename from 'I:/boost-trunk/libs/checks/.git/HEAD.lock' to 'I:/boost-trunk/libs/checks/.git/HEAD' failed. Should I try again? (y/n) y Questions: * Not sure why above failed first time, but was OK on retry. (Could be a problem in a command file?) * I didn't need any symlink to run the test - though I expected to have to do so? I need it elsewhere? So I created a link as before I:\boost-trunk\boost>mklink /d checks ..\libs\checks\include\boost\checks symbolic link created for checks <<===>> ..\libs\checks\include\boost\checks 18-Dec-2012 17:08 <SYMLINKD> checks [..\libs\checks\include\boost\checks] but this is wrong because the conversion is using the existing 'old' file structure - since there is no /include folder. What should I do about this - create a new symlink? Sounds a bit dodgy to have different file structures? * How do I give the original GSoC author Pierre Talbot write access to this git repo? Do we have to share a password? (I wouldn't want him to have access to my other git repros?) * What will prevent two 'user submitted' libraries with the same name? Looking OKish, but fiddly, and a single typo will scupper you, so a command file system would be *much* better (but perhaps troublesome?). Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Paul A. Bristow Sent: Tuesday, December 18, 2012 5:28 PM To: boost@lists.boost.org Subject: Re: [boost] [Git] Extracting libraries from the svn sandbox
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Beman Dawes Sent: Thursday, December 13, 2012 5:18 PM To: Boost Developers List Subject: Re: [boost] [Git] Extracting libraries from the svn sandbox
Further to my progress report yesterday... For Pierre Talbot's GSoC checksums library checks, I've tried to follow your procedure as reported by you at https://svn.boost.org/trac/boost/wiki/ExtractSandbox, and it works OK using the b2 jamfile call, which is promising, but to get it to work using VS I need to provide an additional include directory I:\boost-trunk\libs\checks but it doesn't have the 'right' directory structure , as your example 'simple', mainly in lacking a folder /include and I don't understand how is ever could have this folder /include ? So the analogous symlink I created to I:\boost-trunk/libs/trivial/include/boost/trivial is wrong and should link instead to I:\boost-trunk\libs\checks\boost\checks from boost-trunk\checks I:\boost-trunk\boost>mklink /d checks ..\libs\checks\boost\checks symbolic link created for checks <<===>> ..\libs\checks\boost\checks Windows Explorer shows a link Target I:\boost-trunk\libs\checks\boost\checks and open file location opens showing folder \checks I:\boost-trunk\boost>dir checks Volume in drive I is Boost Volume Serial Number is 2772-A18A Directory of I:\boost-trunk\boost\checks 18-Dec-2012 16:13 <DIR> . 18-Dec-2012 16:13 <DIR> .. 18-Dec-2012 16:13 2,454 amex.hpp 18-Dec-2012 16:13 4,427 basic_checks.hpp … VS with a VC include directory i:\boost-trunk\ now builds OK. (Aside: the lines #include <boost/checks/some_check.hpp> all are underlined in red and say "Error: cannot open source file "boost/checks/some_check.hpp" for a long time - So this doesn't seem quite ideal but perhaps a VS feature?) I had expected, the link to point to I:\boost-trunk\libs\checks\ to find #include <boost/checks/some_checks.hpp> But I'm obviously still confused by symlinks. Would this need an include directory of I:boost-trunk\boost rather than I:boost-trunk\ It seems to me that keeping all the folder structures the same is really, really important (having caused many muddles in the past), so would it be better just to tell people to 'start afresh manually' by running a command file to create the directory structure (parameterised for the library name of course) moving the files to the right place following the simple example's layout? I'm also concerned at the potential for modifications to IDE projects that would be required to change when going from sandbox through acceptance to trunk and release. Most tests are developed using an IDE (not just VS, but also NetBeans, CodeBlocks, Eclipse …) and then run portably using bjam (or something). (I've had experience of this - there are hundreds of Boost.Math test projects and I have an IDE project for each of them - so changing from sandbox to trunk was painful :-) It will be a real nuisance to have to change all the projects include settings (especially if you have unwisely not use the VS collection of settings where a change can be used by all projects - as I have sometimes unwisely done). Before I go any further, I wanted to be quite sure that we are agreed that we have really got this right, because if we haven't, we could be heading for big trouble later. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Paul A. Bristow Sent: Wednesday, December 19, 2012 5:47 PM To: boost@lists.boost.org Subject: Re: [boost] [Git] Extracting libraries from the svn sandbox
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Paul A. Bristow Sent: Tuesday, December 18, 2012 5:28 PM To: boost@lists.boost.org Subject: Re: [boost] [Git] Extracting libraries from the svn sandbox
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Beman Dawes Sent: Thursday, December 13, 2012 5:18 PM To: Boost Developers List Subject: Re: [boost] [Git] Extracting libraries from the svn sandbox
Further to my progress report yesterday...
For Pierre Talbot's GSoC checksums library checks, I've tried to follow your procedure as reported by you at https://svn.boost.org/trac/boost/wiki/ExtractSandbox, and it works OK using the b2 jamfile call,
which is promising, but to get it to work using VS I need to provide an additional include directory
I:\boost-trunk\libs\checks
but it doesn't have the 'right' directory structure , as your example 'simple', mainly in lacking a folder /include
and I don't understand how is ever could have this folder /include ?
So the analogous symlink I created to
I:\boost-trunk/libs/trivial/include/boost/trivial
is wrong and should link instead to
I:\boost-trunk\libs\checks\boost\checks
from boost-trunk\checks
I:\boost-trunk\boost>mklink /d checks ..\libs\checks\boost\checks symbolic link created for checks <<===>> ..\libs\checks\boost\checks
Windows Explorer shows a link Target I:\boost-trunk\libs\checks\boost\checks
and open file location opens showing folder \checks
I:\boost-trunk\boost>dir checks Volume in drive I is Boost Volume Serial Number is 2772-A18A
Directory of I:\boost-trunk\boost\checks
18-Dec-2012 16:13 <DIR> . 18-Dec-2012 16:13 <DIR> .. 18-Dec-2012 16:13 2,454 amex.hpp 18-Dec-2012 16:13 4,427 basic_checks.hpp …
VS with a VC include directory i:\boost-trunk\ now builds OK.
(Aside: the lines
#include <boost/checks/some_check.hpp>
all are underlined in red and say "Error: cannot open source file "boost/checks/some_check.hpp"
for a long time - So this doesn't seem quite ideal but perhaps a VS feature?)
I had expected, the link to point to
I:\boost-trunk\libs\checks\
to find
#include <boost/checks/some_checks.hpp>
But I'm obviously still confused by symlinks.
Would this need an include directory of
I:boost-trunk\boost
rather than
I:boost-trunk\
It seems to me that keeping all the folder structures the same is really, really important (having caused many muddles in the past), so would it be better just to tell people to 'start afresh manually' by running a command file to create the directory structure (parameterised for the library name of course) moving the files to the right place following the simple example's layout?
I'm also concerned at the potential for modifications to IDE projects that would be required to change when going from sandbox through acceptance to trunk and release. Most tests are developed using an IDE (not just VS, but also NetBeans, CodeBlocks, Eclipse …) and then run portably using bjam (or something). (I've had experience of this - there are hundreds of Boost.Math test projects and I have an IDE project for each of them - so changing from sandbox to trunk was painful :-)
It will be a real nuisance to have to change all the projects include settings (especially if you have unwisely not use the VS collection of settings where a change can be used by all projects - as I have sometimes unwisely done).
Before I go any further, I wanted to be quite sure that we are agreed that we have really got this right, because if we haven't, we could be heading for big trouble later.
Sorry to reply to self *twice*, but I just want to report using NetBeans (see netbeans.org) a portable IDE. First Using my NetBeans default gcc 4.7.2 C++ compiler: 1 Created new project trivial (cleared makefile button as have a main in test program). * Added existing file using the [...] browse box "I:/boost-trunk/libs/trivial/libs/checks/test/thrice_test.cpp" * Added Project Properties, Build, C++ Compiler, General, Include directories I:\boost-trunk - my 'boost-root' * Clicked on Run icon * Output windows contains g++.exe -c -g -I/I/boost-trunk -MMD -MP -MF build/Debug/mingw32-Windows/_ext/1817206218/thrice_test.o.d -o build/Debug/mingw32-Windows/_ext/1817206218/thrice_test.o /I/boost-trunk/libs/trivial/test/thrice_test.cpp * Run window contains No errors detected. RUN SUCCESSFUL (total time: 139ms) :-)) 2 Created new project checks (cleared makefile button as have a main in test program). * Added existing file using the [...] browse box I:\boost-trunk\libs\checks\libs\checks\test\test_checks.cpp * Added Project Properties, Build, C++ Compiler, General, Include directories I:\boost-trunk - my 'boost-root' * Clicked on Run icon. 8 Output windows contains g++.exe -c -g -I/I/boost-trunk -MMD -MP -MF build/Debug/mingw32-Windows/_ext/776286597/test_checks.o.d -o build/Debug/mingw32-Windows/_ext/776286597/test_checks.o /I/boost-trunk/libs/checks/libs/checks/test/test_checks.cpp * Run window contains Running 12 test cases... *** No errors detected RUN SUCCESSFUL (total time: 229ms) Using clang 3.1 clang++.exe -c -g -I/I/boost-trunk -MMD -MP -MF build/dbg_clang/MinGW_Clang-Windows/_ext/776286597/test_checks.o.d -o build/dbg_clang/MinGW_Clang-Windows/_ext/776286597/test_checks.o /I/boost-trunk/libs/checks/libs/checks/test/test_checks.cpp and 2 warnings, but runs OK. And finally re-ran checks using Visual Studio but using VS 2010 compiler (from NetBeans with an add-on) * Added Project Properties, Build, Linker, Libraries, used [...] browse box to add one library file: libboost_unit_test_framework-vc100-mt-s-1_53.lib (Sadly autolinking doesn't work) msvc_caller.exe -c -Od -W3 -I /I/boost-trunk -Fobuild/dbg_vs/VCC4N-Windows/_ext/776286597/test_checks.o /I/boost-trunk/libs/checks/libs/checks/test/test_checks.cpp test_checks.cpp Linking to lib file: libboost_unit_test_framework-vc100-mt-s-1_53.lib mkdir -p dist/dbg_vs/VCC4N-Windows msvc_caller.exe -OUT:dist/dbg_vs/VCC4N-Windows/checks build/dbg_vs/VCC4N-Windows/_ext/776286597/test_checks.o /I/boost-trunk/stage/lib/libboost_unit_test_framework-vc100-mt-s-1_53.lib Run window is OK (as other compilers). So these 'sandbox' projects all seem to work OK with the symlinks set up before. However, I still think that some confirmation from others that the directory structure and symlinks is what we want for 'sandbox' projects, and how we will transition any accepted into 'official' Boost and finally into release. Paul PS NetBeans has Git (and subversion) built in, so I committed a small change to the test_checks.cpp source file. ==[IDE]== 20-Dec-2012 17:32:18 Committing... Git Commit ---------- git add I:\boost-trunk\libs\checks\libs\checks\test\test_checks.cpp git commit -m Working with NetBeans I:\boost-trunk\libs\checks\libs\checks\test\test_checks.cpp Commit Log revision : 5b8d04584e1b2fdd7acaf4863130ed8c94729c9a author : Paul Bristow <pbristow@hetp.u-net.com> date : 20-Dec-2012 17:32:18 summary : Working with NetBeans INFO: End of Commit ==[IDE]== 20-Dec-2012 17:32:18 Committing... finished. Neat?
--- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com
participants (7)
-
Beman Dawes
-
Daniel James
-
Dave Abrahams
-
Julian Gonggrijp
-
Mika Fischer
-
Paul A. Bristow
-
Rene Rivera