summaryrefslogtreecommitdiff
path: root/utils/git-svn
Commit message (Collapse)AuthorAgeFilesLines
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347883 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347766 91177308-0d34-0410-b5e6-96231b3b80d8
* Make git-llvm python3 compatible again. Hopefully. :)James Y Knight2018-11-161-4/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347113 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347103 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344095 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321388 91177308-0d34-0410-b5e6-96231b3b80d8
* [git] Update the llvm git helper script to work correctly with theChandler Carruth2017-09-161-1/+1
| | | | | | latest Python versions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313435 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305741 91177308-0d34-0410-b5e6-96231b3b80d8
* utils: Add a git-r utility for mapping svn revisions to git revisions in the ↵Peter Collingbourne2017-06-161-0/+169
| | | | | | monorepo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305598 91177308-0d34-0410-b5e6-96231b3b80d8
* git-llvm: Update the project list for the llvm-project-20170507 monorepo.Peter Collingbourne2017-06-041-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304691 91177308-0d34-0410-b5e6-96231b3b80d8
* git-llvm script should add .exe on Windows.Zachary Turner2017-05-241-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303708 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303696 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303359 91177308-0d34-0410-b5e6-96231b3b80d8
* [git-llvm] Fix svn:eol-style issue for one-file patchesReid Kleckner2017-05-121-14/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302853 91177308-0d34-0410-b5e6-96231b3b80d8
* [git-llvm] Remove CR from middle of svn propget outputReid Kleckner2017-04-241-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301268 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301262 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous space.Rui Ueyama2016-12-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290165 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288266 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve `git llvm push` to suggest `git pull` when applying patch failsMehdi Amini2016-11-121-4/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D26565 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286695 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix `git-llvm` script to handle `git worktree` setups correctlyMehdi Amini2016-11-071-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286140 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286138 91177308-0d34-0410-b5e6-96231b3b80d8
* 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... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286124 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286123 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237516 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219290 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'git svn find-rev' in git-svnrevert instead of shell script fu.Michael Gottesman2013-04-261-4/+3
| | | | | | Thanks Chandler! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180592 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180587 91177308-0d34-0410-b5e6-96231b3b80d8