Skip to content

Commit 800ccb6

Browse files
authored
Merge pull request #2491 from Kobzol/switch-to-rustc-josh-sync
2 parents d5ad5d7 + 6851554 commit 800ccb6

File tree

8 files changed

+57
-820
lines changed

8 files changed

+57
-820
lines changed

.github/workflows/rustc-pull.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ jobs:
2424
run: rustup update stable
2525
- uses: Swatinem/rust-cache@v2
2626
with:
27-
workspaces: "josh-sync"
2827
# Cache the josh directory with checked out rustc
29-
cache-directories: "/home/runner/.cache/rustc-dev-guide-josh"
30-
- name: Install josh
31-
run: RUSTFLAGS="--cap-lints warn" cargo install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
28+
cache-directories: "/home/runner/.cache/rustc-josh"
29+
- name: Install rustc-josh-sync
30+
run: cargo install --locked --git https://github.com/rust-lang/josh-sync
3231
- name: Setup bot git name and email
3332
run: |
3433
git config --global user.name 'The rustc-dev-guide Cronjob Bot'
@@ -38,7 +37,7 @@ jobs:
3837
# Turn off -e to disable early exit
3938
shell: bash {0}
4039
run: |
41-
cargo run --manifest-path josh-sync/Cargo.toml -- rustc-pull
40+
rustc-josh-sync pull
4241
exitcode=$?
4342
4443
# If no pull was performed, we want to mark this job as successful,

README.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -72,49 +72,6 @@ including the `<!-- toc -->` marker at the place where you want the TOC.
7272

7373
## Synchronizing josh subtree with rustc
7474

75-
This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.github.io/josh/intro.html) subtree. You can use the following commands to synchronize the subtree in both directions.
75+
This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.github.io/josh/intro.html) subtree. You can use the [rustc-josh-sync](https://github.com/rust-lang/josh-sync) tool to perform synchronization.
7676

77-
You'll need to install `josh-proxy` locally via
78-
79-
```
80-
cargo install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
81-
```
82-
Older versions of `josh-proxy` may not round trip commits losslessly so it is important to install this exact version.
83-
84-
### Pull changes from `rust-lang/rust` into this repository
85-
86-
1) Checkout a new branch that will be used to create a PR into `rust-lang/rustc-dev-guide`
87-
2) Run the pull command
88-
```
89-
cargo run --manifest-path josh-sync/Cargo.toml rustc-pull
90-
```
91-
3) Push the branch to your fork and create a PR into `rustc-dev-guide`
92-
93-
### Push changes from this repository into `rust-lang/rust`
94-
95-
NOTE: If you use Git protocol to push to your fork of `rust-lang/rust`,
96-
ensure that you have this entry in your Git config,
97-
else the 2 steps that follow would prompt for a username and password:
98-
99-
```
100-
[url "git@github.com:"]
101-
insteadOf = "https://github.com/"
102-
```
103-
104-
1) Run the push command to create a branch named `<branch-name>` in a `rustc` fork under the `<gh-username>` account
105-
```
106-
cargo run --manifest-path josh-sync/Cargo.toml rustc-push <branch-name> <gh-username>
107-
```
108-
2) Create a PR from `<branch-name>` into `rust-lang/rust`
109-
110-
#### Minimal git config
111-
112-
For simplicity (ease of implementation purposes), the josh-sync script simply calls out to system git. This means that the git invocation may be influenced by global (or local) git configuration.
113-
114-
You may observe "Nothing to pull" even if you *know* rustc-pull has something to pull if your global git config sets `fetch.prunetags = true` (and possibly other configurations may cause unexpected outcomes).
115-
116-
To minimize the likelihood of this happening, you may wish to keep a separate *minimal* git config that *only* has `[user]` entries from global git config, then repoint system git to use the minimal git config instead. E.g.
117-
118-
```
119-
GIT_CONFIG_GLOBAL=/path/to/minimal/gitconfig GIT_CONFIG_SYSTEM='' cargo run --manifest-path josh-sync/Cargo.toml -- rustc-pull
120-
```
77+
You can find a guide on how to perform the synchronization [here](./src/external-repos.md#synchronizing-a-josh-subtree).

0 commit comments

Comments
 (0)