summaryrefslogtreecommitdiffstats
path: root/llvm/utils/git-svn
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* git-llvm: Fix incremental population of svn tree.James Y Knight2018-11-291-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "svn update --depth=..." is, annoyingly, not a specification of the desired depth, but rather a _limit_ added on top of the "sticky" depth in the working-directory. However, if the directory doesn't exist yet, then it sets the sticky depth of the new directory entries. Unfortunately, the svn command-line has no way of expanding the depth of a directory from "empty" to "files", without also removing any already-expanded subdirectories. The way you're supposed to increase the depth of an existing directory is via --set-depth, but --set-depth=files will also remove any subdirs which were already requested. This change avoids getting into the state of ever needing to increase the depth of an existing directory from "empty" to "files" in the first place, by: 1. Use svn update --depth=files, not --depth=immediates. The latter has the effect of checking out the subdirectories and marking them as depth=empty. The former excludes sub-directories from the list of entries, which avoids the problem. 2. Explicitly populate missing parent directories. Using --parents seemed nice and easy, but it marks the parent dirs as depth=empty. Instead, check out parents explicitly if they're missing. llvm-svn: 347883
* llvm-git: More tweaks.James Y Knight2018-11-281-36/+19
| | | | | | | | | | | | On python3, use bytes for reading and applying the patch file, rather than str. This fixes encoding issues when applying patches with python3.X (reported by zturner). Also, simplify and speed up "svn update" via svn's "--parents" argument, instead of manually computing and supplying the list of parent directories to update. llvm-svn: 347766
* Make git-llvm python3 compatible again. Hopefully. :)James Y Knight2018-11-161-4/+13
| | | | llvm-svn: 347113
* Speed up git-llvm script by only svn up'ing affected directories.James Y Knight2018-11-161-30/+72
| | | | | | | | | Also, support modifications to toplevel files in git (which need to be committed to "monorepo-root" in svn). Differential Revision: https://reviews.llvm.org/D54341 llvm-svn: 347103
* [git-llvm] Fix some issues surrouding EOL conversion on Windows.Zachary Turner2018-10-091-9/+19
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes three issues. The first is that we didn't consider files which are explicitly set to eolstyle CRLF in the repo, and there are a handful of these. Second is that dos2unix doesn't have a -q option in GnuWin32, so this codepath wasn't working properly. Finally with newer versions of Python (or newer versions of Git, or some combination of the two) patches can't be applied when we treat stdin as text, because Python silently undoes all the work we did to convert the newlines to LF using dos2unix by using universal_newlines=True and then converting them *back* to CRLF. So we need to add a way to force stdin to be treated as binary, and use it when LF-newlines are required. Differential Revision: https://reviews.llvm.org/D51444 llvm-svn: 344095
* [git-llvm] Handle files ignored by svn correctlyWalter Lee2017-12-221-5/+6
| | | | | | | | | | Summary: Correctly handle files ignored by svn (such as .o files, which are ignored by default) by adding "--no-ignore" flag to "svn status" and "svn add". Differential Revision: https://reviews.llvm.org/D41404 llvm-svn: 321388
* [git] Update the llvm git helper script to work correctly with theChandler Carruth2017-09-161-1/+1
| | | | | | latest Python versions. llvm-svn: 313435
* Revert r305598, "utils: Add a git-r utility for mapping svn revisions to git ↵Peter Collingbourne2017-06-191-169/+0
| | | | | | | | | | | revisions in the monorepo." $ git revert `git r 305598` We need to decide whether we want development tools to be written in Go first. llvm-svn: 305741
* utils: Add a git-r utility for mapping svn revisions to git revisions in the ↵Peter Collingbourne2017-06-161-0/+169
| | | | | | monorepo. llvm-svn: 305598
* git-llvm: Update the project list for the llvm-project-20170507 monorepo.Peter Collingbourne2017-06-041-0/+5
| | | | llvm-svn: 304691
* git-llvm script should add .exe on Windows.Zachary Turner2017-05-241-0/+2
| | | | llvm-svn: 303708
* [git-llvm] Check if svn is installed.Rui Ueyama2017-05-231-0/+8
| | | | | | | | | | | | | The error message that git-llvm script prints out when svn is missing is very cryptic. I spent a fair amount of time to find what was wrong with my environment. It looks like many newcomers also exprienced a hard time to submit their first patches due to this error. This patch adds a more user-friendly error message. Differential Revision: https://reviews.llvm.org/D33458 llvm-svn: 303696
* [git-llvm] Don't attempt to propget files that don't exist yet in SVNReid Kleckner2017-05-181-0/+2
| | | | | | svn propget will fail halfway through, and the patch will fail to apply. llvm-svn: 303359
* [git-llvm] Fix svn:eol-style issue for one-file patchesReid Kleckner2017-05-121-14/+19
| | | | llvm-svn: 302853
* [git-llvm] Remove CR from middle of svn propget outputReid Kleckner2017-04-241-0/+2
| | | | llvm-svn: 301268
* [git-llvm] Make `push` work on CRLF files with svn:eol-style=nativeReid Kleckner2017-04-241-7/+60
| | | | | | | | | | | | | | | | | | | | | | Summary: `git apply` on Windows doesn't work for files that SVN checks out as CRLF. There is no way to force SVN to check everything out with Unix line endings on Windows. Files with svn:eol-style=native will always come out with CRLF, breaking `git apply`, which wants Unix line endings. My workaround is to list all files with this property set in the change, and run `dos2unix` on them. SVN doesn't commit a massive line ending change because the svn:eol-style property indicates that these are text files. Tested on r301245. Reviewers: zturner, jlebar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32452 llvm-svn: 301262
* Remove extraneous space.Rui Ueyama2016-12-201-1/+1
| | | | llvm-svn: 290165
* [git-llvm] Use --force-interactive when commiting to enable SVN to prompt ↵Mehdi Amini2016-11-301-1/+1
| | | | | | | | | | | | | password When svn does not know the password and it has to prompt, it needs to query. However it won't when invoked from the Python script and instead fails with: svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option Differential Revision: https://reviews.llvm.org/D27274 llvm-svn: 288266
* Improve `git llvm push` to suggest `git pull` when applying patch failsMehdi Amini2016-11-121-4/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D26565 llvm-svn: 286695
* Fix `git-llvm` script to handle `git worktree` setups correctlyMehdi Amini2016-11-071-1/+2
| | | | llvm-svn: 286140
* Add some facilities to work with a git monorepo (experimental setup)Mehdi Amini2016-11-071-0/+278
| | | | | | | | | | | | | | | Add a new script in llvm/utils/git-svn/. When present in the $PATH, it enables a `git llvm` command. It is providing at this point only the ability to push from the git monorepo: `git llvm push`. It is intended to evolves with more features, for instance I plan on features like `git llvm show r284955` to help working with sequential revision numbers. The push feature is taken from Justin Lebar's script available here: https://github.com/jlebar/llvm-repo-tools/ Differential Revision: https://reviews.llvm.org/D26334 llvm-svn: 286138
* Revert "Add some facilities to work with a git monorepo (experimental setup)"Mehdi Amini2016-11-071-296/+0
| | | | | | This reverts commit r286123, accidentally commited while testing itself... llvm-svn: 286124
* Add some facilities to work with a git monorepo (experimental setup)Mehdi Amini2016-11-071-0/+296
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Some changes are made to cmake, especially the addition of a new LLVM_ENABLE_PROJECTS option that makes the build system aware of the monorepo directory structure. Also a new script is added in llvm/utils/git-svn/. When present in the $PATH, it enables a `git llvm` command. It is providing at this point only the ability to push from the git monorepo: `git llvm push`. It is intended to evolves with more features, for instance I plan on features like `git llvm show r284955` to help working with sequential revision numbers. The push feature is taken from Justin Lebar's script available here: https://github.com/jlebar/llvm-repo-tools/ Reviewers: jlebar Subscribers: mgorny, modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D26334 llvm-svn: 286123
* Improve check on git-svnrevert, better error messageRenato Golin2015-05-161-1/+6
| | | | | | | | | | | When the commit is not in the tree at all, find-rev returns 0 and prints an empty string. We need to catch that problem too, when trying to revert. Adding a list of possible problems, so that you can easily and quickly correct without having to edit the script again. llvm-svn: 237516
* Update git-svnrevert to accept git and svn revisionsRenato Golin2014-10-081-9/+16
| | | | | | | | | | Interchangeable commit ids can now be used on this git-svnrevert, which will figure out what kind of commit that is (if you use format rNNNN for SVN commits) and make sure the right ids are used in the right places. It's a little bit more robust and user-friendly. llvm-svn: 219290
* Use 'git svn find-rev' in git-svnrevert instead of shell script fu.Michael Gottesman2013-04-261-4/+3
| | | | | | Thanks Chandler! llvm-svn: 180592
* Added the scripts git-svnup/git-svnrevert to utils/git-svn.Michael Gottesman2013-04-262-0/+68
It makes more sense to have git-svnup here than catting said file in the documentation (where we should rather point users to this directory). I included git-svnrevert as an additional gift to the community. I will update the documentation in a second commit later today. git-svnrevert takes in a git hash for a commit, looks up the svn revision for said commit and then creates the normal git revert commit message with the one liner message, except instead of saying Revert "<<<INSERT ONELINER HERE>>>" This reverts commit <<<INSERT GITHASH HERE>>> It says: Revert "<<<INSERT ONELINER HERE>>>" This reverts commit r<<<INSERT SVN REVISION HERE>>> so git hashes will not escape into our svn logs (which just look unseemly). llvm-svn: 180587
OpenPOWER on IntegriCloud