summaryrefslogtreecommitdiff
path: root/sync-all
Commit message (Collapse)AuthorAgeFilesLines
* Delete sync-allThomas Miedema2015-08-211-1023/+0
|
* Cleanup and better documentation of sync-all scriptThomas Miedema2014-09-011-139/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Rumor has it that sync-all is slowly on the way out. Now that all subrepositories have been turned into git submodules, sync-all might not be needed anymore. Nevertheless, here are some changes I had made while trying to understand why it existed in the first place: * update comments + help text * rename some variables for maintainability * s/branch_name/remote_name/ origin is the name of a remote, not a branch * s/repo_base/remote_root/ the word *remote* is key here * s/defaultrepo/default_root/ this was a darcsism, and it doesn't refer to a repository but to the root directory of all repositories * small tweaks * .git can be a file nowadays * don't skip END actions on exceptions #8886 reverts d523f9b3d4ce3463e8816cad2139ea397e00f8d1 Test Plan: Why revert d523f9b3d4ce3463e8816cad2139ea397e00f8d1? I put an old haddock repository from http://darcs.haskell.org/haddock2.git back in my tree. Now, when running `sync-all get`, the following happens: 1. I get a cryptic error saying: fatal: reference is not a tree: 5412c262f403e52be45d607b34eb3a5806ea2a76 Unable to checkout '5412c262f403e52be45d607b34eb3a5806ea2a76' in submodule path 'utils/haddock' git failed: 256 at ./sync-all line 112. 2. sync-all checks if maybe an old haddock repository is present 3. I get a clear warning saying: ============================ ATTENTION! You have an old haddock repository in your GHC tree! Please remove it (e.g. "rm -r utils/haddock"), and then run "./sync-all get" to get the new repository. ============================ Without commit d523f9b3d4ce3463e8816cad2139ea397e00f8d1 reverted, steps 2 and 3 were skipped. The problem that commit tried to solve, is now solved with 7012ed8515100b4947383e93b82dbff7a0aa835c. Reviewers: nomeata, austin, hvr Reviewed By: austin, hvr Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D178 GHC Trac Issues: #8886, #9212
* Check if file is present instead of directoryThomas Miedema2014-08-191-1/+1
| | | | | | | | | | | | | | | | Fixes #8886. Problem: any `sync-all` command that is run before the first succesfull `sync-all get` would trigger a false warning about an old `time` package being present. Cause: after cloning the ghc repository, the (empty) `libraries/time` directory is already present. Solution: check if the directory actually contains any of the `time` files. I picked the `LICENSE` file, since `boot` does so as well. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix “Checking for old .. repo” messagesJoachim Breitner2014-06-251-2/+2
|
* Fix sync-all get from a local working copyJoachim Breitner2014-06-251-2/+2
|
* Merge Thomas Miedema’s syn-all improvmentsJoachim Breitner2014-06-251-96/+36
|\ | | | | | | as submitted on #9212.
| * sync-all: infer remotepath from .gitmodules fileThomas Miedema2014-06-231-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After this commit, running `sync-all remote set-url` works properly for the haddock package: command: ./sync-all -r git://git.haskell.org remote set-url origin before: git://git.haskell.org/packages/haddock.git after: git://git.haskell.org/haddock.git By doing the `remotepath` lookup before the `$is_github_repo` check, running `sync-all remote set-url` now also works properly for submodule repos on github: command: ./sync-all -r git://github.com/ghc remote set-url origin before: git://github.com/ghc/packages/binary after: git://github.com/ghc/packages-binary * Relevant prior commits: 4f4357 "Make `sync-all remote set-url` use normalized `/packages/` urls" 34b072 "Convert haddock into a proper submodule (re #8545)" 974a97 "sync-all: Apply submodule url rewriting also to stuff in util/"
| * sync-all: set and check variable $repo_is_submoduleThomas Miedema2014-06-231-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not only does this make the code easier to read, it also fixes a bug. Starting with commits 691c8a and ccce9f, certain subcommands should behave differently for submodules. This was done by checking, for each such subcommand: $remotepath eq "-" This commit corrects that to the check: $$line{"remotepath"} eq "-". Because when we have a clone of a local mirror (checked_out_tree=1), remotepath actually gets set to $$line{"localpath"}.
| * sync-all: make --no-dph work for all subcommandsThomas Miedema2014-06-231-4/+4
| |
| * sync-all: die for real when required repo is missingThomas Miedema2014-06-231-6/+2
| | | | | | | | | | Since commit 0e17d4, the default "tag" is "-", not "". It is never undefined.
| * sync-all: delete dead code calling gitInitSubmodulesThomas Miedema2014-06-231-21/+0
| | | | | | | | | | | | | | | | | | When running './sync-all get', 'git submodule init' has to be (and is always) executed, since .gitmodules might contain new submodules (see commit c3db2b). As a result, after cloning the ghc repo and running the initial './sync-all get', .git/config will always contain some submodule sections. Therefore it is not needed to check for this on every subsequent get or pull, and this code can be deleted.
| * sync-all: cleanupThomas Miedema2014-06-231-41/+9
| | | | | | | | | | | | | | | | | | + Remove dead code from the DarcsAges + Tweak `git config` flags * remove --local, it is not a valid flag * --get was used in some places, not in others + Simplify reading current branch + Delete duplicated code in help
* | sync-all: Allow - in submodule URLsJoachim Breitner2014-06-251-2/+2
|/
* Replace all #!/usr/bin/perl with #!/usr/bin/env perlJoachim Breitner2014-04-301-1/+2
| | | | As suggested in #9057.
* Do not use basename()Joachim Breitner2014-04-191-1/+1
|
* More github url variantsJoachim Breitner2014-04-191-1/+1
|
* Remove some redundancy in sync-allJoachim Breitner2014-04-191-150/+33
|
* sync-all: Apply submodule url rewriting also to stuff in util/Joachim Breitner2014-04-191-4/+4
|
* Fix sync-all error message introduced in 41f5b7e3eHerbert Valerio Riedel2014-04-191-6/+6
| | | | | | Curiously, 'aforesaid' has the same length as the word 'testsuite'... Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Update `sync-all` and `packages` wrt to fold-inHerbert Valerio Riedel2014-04-191-0/+81
| | | | | | | | | | | | | | | | This adapts `sync-all` and `packages` to the recently folded-in Git repositories - `base.git` - `ghc-prim.git` - `integer-gmp.git` - `integer-simple.git` - `template-haskell.git` See #8545 as well as 5f54d67818ee7a74325eed130438beba96510e43 for more details. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* sync-all: Skip END actions on exceptionsFlorian Weimer2014-03-221-0/+7
| | | | | | | | Before this change, the END actions were executed even if the code throws an exception using "die". This resulted in very confusing error reporting when an invalid command line option was specified. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Also allow http://github.com (#8824)Joachim Breitner2014-03-081-1/+1
|
* Make sync-all handle all github protocols correctlyJoachim Breitner2014-03-071-3/+5
| | | | This fixes #8824.
* Correctly clone submodules from githubJoachim Breitner2014-02-061-14/+34
|
* Update `sync-all` and others files w.r.t. merged testsuite (re #8545)Herbert Valerio Riedel2014-01-121-5/+19
| | | | | | | | | | | | | See merge commit 66693401b98cb5aa912948af7bbd2182474f50c4 This commit also adds a check for a left-over testsuite/.git folder to sync-all This way, the first time sync-all is called after updating to a post-testsuite-merge (see #8545) state of ghc.git, the sync-all script aborts with an error message if a `testsuite/.git` folder is detected and thus forces the user to take action. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Fix branch name check regex in sync-allJoachim Breitner2013-11-211-3/+3
|
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-2/+2
|
* Teach sync-all how to rewrite submodule repo urlsHerbert Valerio Riedel2013-09-281-5/+24
| | | | | | | This applies attachment:sync-all-submodules-locally.diff from #8369 Authored-by: Nathaniel Filardo Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Fix typo in sync-all script. (#8375)Muhaimin Ahsan2013-09-281-1/+1
|
* Allow branches with / in them (e.g. wip/) in ./sync-allJoachim Breitner2013-09-171-3/+3
|
* Extend `packages` by 4th column for upstream repoHerbert Valerio Riedel2013-09-021-1/+2
| | | | | | | By keeping the repository url in the `packages` file scripts such as source:ghc/sync-all can pick it up. Moreover, it's easier to automatically validate for correctness than the wiki:Repositories/Upstream page.
* Add check for obsolete `darcs.haskell.org` repo urlsHerbert Valerio Riedel2013-08-281-0/+22
| | | | | | | | If the check detects an obsolete URL, show a warning and tell the user how to invoke `sync-all` in order to update the local Git repo to point to the new repository URLs. This is related to #8121
* Fix windows detection in ./sync-all.Austin Seipp2013-08-231-1/+1
| | | | | | We weren't considering 'msys' for the $OSNAME. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Revert "Add support for external repositories to sync-all"Austin Seipp2013-08-231-6/+2
| | | | | | This reverts commit 2e41f2fa91c833a4420ac273254e49468044bc4b. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Replace occurences of darcs.haskell.org by git.haskell.orgHerbert Valerio Riedel2013-08-191-6/+6
| | | | | ...as the new `git.haskell.org` CNAME has been activated (see also GitolitePlan and #8121 for more details)
* Add support for external repositories to sync-allAustin Seipp2013-08-181-2/+6
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* sync-all: remove trailing '/' from root-urls in help textHerbert Valerio Riedel2013-08-091-2/+2
| | | | This is a test commit for addressing #8121
* Make `sync-all remote set-url` use normalized `/packages/` urlsHerbert Valerio Riedel2013-08-091-1/+10
| | | | | | | | | | | | A simple heuristic (i.e. replacing the `libraries/` suffix by `packages/` in the inferred remotepath, if the remotepath in the `packages` file is "-") used to infer the remotepath for Git submodules. A proper solution would require to parse the `.gitmodules` file to obtain the actual localpath<->remotepath mapping. This addresses #8121 and is a follow-up to a22e908 which changed the `.gitmodules` urls to use the `/packages/` folder instead of `/libraries/`.
* sync-all : Replace '~~' operator with something supported by older Perl.Erik de Castro Lopo2013-08-061-1/+2
|
* sync-all : Warn on 'pull' operation if not on master branch.Erik de Castro Lopo2013-08-051-0/+15
|
* Fix typosGabor Greif2013-07-311-1/+1
|
* Move libffi's tarball into its own repoIan Lynagh2013-07-301-5/+18
| | | | This means that ghc-tarballs is only needed on Windows
* Add a 'compare' command to sync-allIan Lynagh2013-04-191-0/+47
|
* Some sync-all refactoringIan Lynagh2013-04-191-91/+108
|
* Use a simpler way of finding the current git branch in sync-allIan Lynagh2013-04-191-1/+1
|
* Remove the VCS column from 'packages'Ian Lynagh2013-03-041-55/+47
| | | | It's now always 'git'.
* Remove the darcs support from sync-allIan Lynagh2013-03-041-80/+32
|
* Fix the autocrlf test in sync-allIan Lynagh2013-02-171-2/+3
| | | | Apparently git ignores the --git-dir argument.
* Set repositories to have core.autocrlf == false; fixes #7673Ian Lynagh2013-02-171-4/+24
| | | | Based on a patch from rassilon.
* Check sub-modules are OK before pushingIan Lynagh2013-02-151-0/+40
|