Opened 20 months ago

Closed 8 months ago

#8369 closed bug (fixed)

Small improvements to ./sync-all

Reported by: nwf Owned by: hvr
Priority: lowest Milestone:
Component: Trac & Git Version: 7.7
Keywords: sync-all Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

./sync-all get in a local clone does not use local submodules. That is, if I

git clone ghc ghc-tmp; cd ghc-tmp; ./sync-all get

the contained clones come over just fine from ghc/... into ghc-tmp/..., but the submodules are fetched over the network connection. I think the attached patch brings the "fetch from the clone source if possible" behavior over to submodules, though possibly not in an ideal way.

Separately, I find that I want to run shell commands in each repository; adding a "shell" verb is trivial and a second patch is attached.

Attachments (2)

sync-all-submodules-locally.diff (2.6 KB) - added by nwf 20 months ago.
sync-all-shell.diff (501 bytes) - added by nwf 20 months ago.

Download all attachments as: .zip

Change History (8)

Changed 20 months ago by nwf

Changed 20 months ago by nwf

comment:1 Changed 20 months ago by leroux

Usually what I do to achieve this is

git clone ghc ghc-clone
cd ghc-clone
./sync-all -r ../ghc remote set-url origin
./sync-all --testsuite --nofib get
./sync-all -r https://github.com/ghc remote set-url origin
./sync-all -r ../ghc remote add working
./sync-all checkout master
./sync-all checkout ghc-head # probably not right, but attached submodules to their "correct" branch.

Here's the script I use: https://gist.github.com/leroux/6735171

Last edited 20 months ago by leroux (previous) (diff)

comment:2 Changed 20 months ago by leroux

Nevermind, I was mistaken. This is great! =)
If it's ready to be merged in, go ahead and change it to patch. (I haven't tested yet)

comment:3 Changed 20 months ago by Herbert Valerio Riedel <hvr@…>

In 0481e076f3cb4010894324cac71e947c6637805a/ghc:

Teach sync-all how to rewrite submodule repo urls

This applies attachment:sync-all-submodules-locally.diff from #8369

Authored-by: Nathaniel Filardo
Signed-off-by: Herbert Valerio Riedel <[email protected]>

comment:4 Changed 15 months ago by hvr

  • Component changed from Compiler to Trac & Git
  • Keywords sync-all added
  • Owner set to hvr

comment:5 Changed 11 months ago by thomie

Can this ticket be closed?

comment:6 Changed 8 months ago by thomie

  • Resolution set to fixed
  • Status changed from new to closed

Note: since all repositories have been turned into git submodules, you normally don't need sync-all anymore. See git working conventions and git submodules for the new submodule workflow.

Note: See TracTickets for help on using tickets.