Looking for git help for Boost releases
I’m trying to figure out tooling for making boost releases. One of the missing pieces that we had in SVN was “svn export”, which let you check out a particular branch/revision to a local folder, w/o any of the SVN infrastructure (such as .svn folders). It also let you set the line endings of the files, so I could make a release with Windows line endings on a non-windows computer. The command that I used was: svn export --non-interactive --native-eol XXX -r YYY, https://svn.boost.org/svn/boost/branches/release ZZZ where: XXX was line ending that I wanted (either CRLF for windows or LF for unix) YYY was the revision that I was interested in (usually HEAD) ZZZ was the destination for the export How can I do something like this for git? I’ve looked at “git archive”, and that’s something like what I want, but it doesn’t handle sub-projects. There are a few scripts around that claim to do “git archive over sub-projects”, but I haven’t found one that works with our set up, and none of them let you modify the line endings for (some of) the files as part of the process. Any ideas? Suggestions? Pointers? Thanks in advance. — Marshall
On Tue, Jun 3, 2014 at 7:39 PM, Marshall Clow
I’m trying to figure out tooling for making boost releases.
One of the missing pieces that we had in SVN was “svn export”, which let you check out a particular branch/revision to a local folder, w/o any of the SVN infrastructure (such as .svn folders). It also let you set the line endings of the files, so I could make a release with Windows line endings on a non-windows computer.
The command that I used was:
svn export --non-interactive --native-eol XXX -r YYY, https://svn.boost.org/svn/boost/branches/release ZZZ
where: XXX was line ending that I wanted (either CRLF for windows or LF for unix) YYY was the revision that I was interested in (usually HEAD) ZZZ was the destination for the export
How can I do something like this for git? I’ve looked at “git archive”, and that’s something like what I want, but it doesn’t handle sub-projects. There are a few scripts around that claim to do “git archive over sub-projects”, but I haven’t found one that works with our set up, and none of them let you modify the line endings for (some of) the files as part of the process.
Any ideas? Suggestions? Pointers?
If a single command is not a requirement, you could just do a normal git clone, then copy the sources without history in a separate directory and apply todos/fromdos (depending on the system you're running and the desired line endings). You'll probably have to use it with find and file masks.
On Jun 3, 2014, at 9:02 AM, Andrey Semashev
On Tue, Jun 3, 2014 at 7:39 PM, Marshall Clow
wrote: I’m trying to figure out tooling for making boost releases.
One of the missing pieces that we had in SVN was “svn export”, which let you check out a particular branch/revision to a local folder, w/o any of the SVN infrastructure (such as .svn folders). It also let you set the line endings of the files, so I could make a release with Windows line endings on a non-windows computer.
The command that I used was:
svn export --non-interactive --native-eol XXX -r YYY, https://svn.boost.org/svn/boost/branches/release ZZZ
where: XXX was line ending that I wanted (either CRLF for windows or LF for unix) YYY was the revision that I was interested in (usually HEAD) ZZZ was the destination for the export
How can I do something like this for git? I’ve looked at “git archive”, and that’s something like what I want, but it doesn’t handle sub-projects. There are a few scripts around that claim to do “git archive over sub-projects”, but I haven’t found one that works with our set up, and none of them let you modify the line endings for (some of) the files as part of the process.
Any ideas? Suggestions? Pointers?
If a single command is not a requirement, you could just do a normal git clone, then copy the sources without history in a separate directory and apply todos/fromdos (depending on the system you're running and the desired line endings). You'll probably have to use it with find and file masks.
I’d really like to avoid this, because of the possibility (probability? certainty?) of getting some of the line endings wrong. The information on which files should have “native” line endings is part of the git repo, and I’d like to figure out how to use that. I don’t mind it being multiple commands, since I’m going to put them in a script. — Marshall
On 3 Jun 2014 at 11:10, Marshall Clow wrote:
If a single command is not a requirement, you could just do a normal git clone, then copy the sources without history in a separate directory and apply todos/fromdos (depending on the system you're running and the desired line endings). You'll probably have to use it with find and file masks.
I´d really like to avoid this, because of the possibility (probability? certainty?) of getting some of the line endings wrong. The information on which files should have "native" line endings is part of the git repo, and I´d like to figure out how to use that.
I don´t mind it being multiple commands, since I´m going to put them in a script.
I would urge you to revisit my earlier proposed solution. You may not be aware it was me who wrote the .gitattributtes for Boost, and myself and Dave mostly implemented the EOL infrastructure into the git conversion tool. I know what I'm talking about here. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
On Tue, Jun 3, 2014 at 5:54 PM, Niall Douglas
On 3 Jun 2014 at 11:10, Marshall Clow wrote:
If a single command is not a requirement, you could just do a normal git clone, then copy the sources without history in a separate directory and apply todos/fromdos (depending on the system you're running and the desired line endings). You'll probably have to use it with find and file masks.
I´d really like to avoid this, because of the possibility (probability? certainty?) of getting some of the line endings wrong. The information on which files should have "native" line endings is part of the git repo, and I´d like to figure out how to use that.
I don´t mind it being multiple commands, since I´m going to put them in a script.
I would urge you to revisit my earlier proposed solution.
You may not be aware it was me who wrote the .gitattributtes for Boost, and myself and Dave mostly implemented the EOL infrastructure into the git conversion tool. I know what I'm talking about here.
What would be most convincing would be a working script that does what needs to be done. Thanks, --Beman
On 3 June 2014 16:39, Marshall Clow
I’m trying to figure out tooling for making boost releases.
One of the missing pieces that we had in SVN was “svn export”, which let you check out a particular branch/revision to a local folder, w/o any of the SVN infrastructure (such as .svn folders). It also let you set the line endings of the files, so I could make a release with Windows line endings on a non-windows computer.
The command that I used was:
svn export --non-interactive --native-eol XXX -r YYY, https://svn.boost.org/svn/boost/branches/release ZZZ
where: XXX was line ending that I wanted (either CRLF for windows or LF for unix) YYY was the revision that I was interested in (usually HEAD) ZZZ was the destination for the export
How can I do something like this for git? I’ve looked at “git archive”, and that’s something like what I want, but it doesn’t handle sub-projects. There are a few scripts around that claim to do “git archive over sub-projects”, but I haven’t found one that works with our set up, and none of them let you modify the line endings for (some of) the files as part of the process.
Any ideas? Suggestions? Pointers?
Thanks in advance.
I do something like this for the documentation, so I could extract that from the build script. Although it requires a local mirror of the git repos, so it might need to be adapted a bit. But it doesn't do anything about line endings. It might be easier to just create a shallow clone, and then delete the .git files and directories.
On 3 Jun 2014 at 8:39, Marshall Clow wrote:
One of the missing pieces that we had in SVN was "svn export", which let you check out a particular branch/revision to a local folder, w/o any of the SVN infrastructure (such as .svn folders). It also let you set the line endings of the files, so I could make a release with Windows line endings on a non-windows computer.
git archive works for single repos. No submodule support though, and no CRLF forcing support. So I'd suggest a script like this: 1. Fetch all submodules and check them out. 2. For each submodule, switch to a temporary local branch. If generating a windows build, replace .gitattributes in each submodule with a CRLF forcing one. Commit, per submodule. 3. Force git hard reset every submodule to the temporary branch. 4. Zip up the entire tree, with an exclusion filter for anything starting with a '.'. git only puts its infrastructure in the root of a module, so you only need to zap those and you're done. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
On 3 June 2014 17:15, Niall Douglas
On 3 Jun 2014 at 8:39, Marshall Clow wrote:
One of the missing pieces that we had in SVN was "svn export", which let you check out a particular branch/revision to a local folder, w/o any of the SVN infrastructure (such as .svn folders). It also let you set the line endings of the files, so I could make a release with Windows line endings on a non-windows computer.
git archive works for single repos. No submodule support though, and no CRLF forcing support.
I've just been looking into setting line endings using 'git archive', it can be done using something like: git -c core.autocrlf=false -c core.eol=crlf archive master I expect similar configuration settings would work for 'git clone'.
On Jun 3, 2014, at 10:02 AM, Daniel James
On 3 June 2014 17:15, Niall Douglas
wrote: On 3 Jun 2014 at 8:39, Marshall Clow wrote:
One of the missing pieces that we had in SVN was "svn export", which let you check out a particular branch/revision to a local folder, w/o any of the SVN infrastructure (such as .svn folders). It also let you set the line endings of the files, so I could make a release with Windows line endings on a non-windows computer.
git archive works for single repos. No submodule support though, and no CRLF forcing support.
I've just been looking into setting line endings using 'git archive', it can be done using something like:
git -c core.autocrlf=false -c core.eol=crlf archive master
I expect similar configuration settings would work for 'git clone’.
Sadly, this doesn’t work for me, because I have [core] excludesfile = /Users/marshall/.gitignore autocrlf = input in my .gitconfig file. git -c core.autocrlf=false -c core.eol=crlf clone git@github.com:boostorg/boost.git --branch master --single-branch /Sources/boost/releases/windows Cloning into '/Sources/boost/releases/windows'... error: core.autocrlf=input conflicts with core.eol=crlf fatal: bad config file line 8 in /Users/marshall/.gitconfig which is really bizarre, because I’m setting “core.autocrlf” right there on the command line. — Marshall
On 3 June 2014 20:37, Marshall Clow
git -c core.autocrlf=false -c core.eol=crlf clone git@github.com:boostorg/boost.git --branch master --single-branch /Sources/boost/releases/windows Cloning into '/Sources/boost/releases/windows'... error: core.autocrlf=input conflicts with core.eol=crlf fatal: bad config file line 8 in /Users/marshall/.gitconfig
It doesn't work for me either, but it does work for 'archive'. Which is a bit odd, maybe 'clone' uses the setting from the config file so that future commands in that repo will work consistently. We could set HOME to another directory which contains a config file with the settings we need. Or we could something similar to my script for the documentation. Are you using python? I use a shell script for the documentation build, but I should be able to convert it to python.
On 3 June 2014 21:08, Daniel James
It doesn't work for me either, but it does work for 'archive'. Which is a bit odd, maybe 'clone' uses the setting from the config file so that future commands in that repo will work consistently. We could set HOME to another directory which contains a config file with the settings we need. Or we could something similar to my script for the documentation. Are you using python? I use a shell script for the documentation build, but I should be able to convert it to python.
I've attached a script which creates a mirror and exports a couple of copies under the directory it is in. This behaviour is at the end, it should be easy to modify. I think I'm going to use this for a new version of the documentation build setup, the current shell script is getting unwieldy.
participants (5)
-
Andrey Semashev
-
Beman Dawes
-
Daniel James
-
Marshall Clow
-
Niall Douglas