Commit 0f31c2e5 authored by thomie's avatar thomie Committed by Austin Seipp

Cleanup and better documentation of sync-all script

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 d523f9b3

Test Plan:
Why revert d523f9b3?

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 d523f9b3 reverted, steps
2 and 3 were skipped. The problem that commit tried to solve,
is now solved with 7012ed85.

Reviewers: nomeata, austin, hvr

Reviewed By: austin, hvr

Subscribers: simonmar, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D178

GHC Trac Issues: #8886, #9212
parent 9e939403
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment