Skip to content

Commit 07dbe9b

Browse files
authored
Merge pull request #38 from lqd/commits_doc
Document how to list bors' commits for bisections to a PR
2 parents 0009997 + d947d63 commit 07dbe9b

File tree

1 file changed

+48
-3
lines changed

1 file changed

+48
-3
lines changed

TUTORIAL.md

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,46 @@ it fails. In just a few steps, we find that it stopped working on
6767
But wait, we can do better! As long as the regression wasn't too long ago, we
6868
can find the exact PR that caused the regression. Use git hashes from the
6969
rustc repo's log as the start/end parameters. They must be from bors on the
70-
master branch. Assuming you aren't reading this too far in the future, the
70+
master branch.
71+
72+
To find a list of all such usable commit hashes, we can use `git log` in the
73+
`RUST_SRC_REPO` git clone. After regressing to a nightly, and padding a couple
74+
days before and after its date to allow for the CI build process time:
75+
76+
```
77+
git log --since "JUL 28 2018" --until "JUL 30 2018" --author=bors --pretty=format:"%H %an %ad"
78+
```
79+
80+
will show
81+
82+
```
83+
e4378412ecfc2a4ff5dfd65fef53fa6be691f689 bors Mon Jul 30 10:19:38 2018 +0000
84+
5ed2b5120bd875a7eb9fd8545d86eb1de1e41bce bors Mon Jul 30 08:25:36 2018 +0000
85+
7bbcd005b30582d07f1a39dcf50f77b54e055828 bors Mon Jul 30 06:29:39 2018 +0000
86+
a3f519df09bf40d09c1a111599b8f115f11fbb49 bors Mon Jul 30 04:34:19 2018 +0000
87+
b12235db096ab24a31e6e894757abfe8b018d44a bors Mon Jul 30 01:08:13 2018 +0000
88+
866a713258915e6cbb212d135f751a6a8c9e1c0a bors Sun Jul 29 21:37:47 2018 +0000
89+
70cac59031d5c33962a1f53cdca9359c0dcd1f9f bors Sun Jul 29 19:37:28 2018 +0000
90+
75af9df71b9eea84f281cf7de72c3e3cc2b02222 bors Sun Jul 29 13:23:01 2018 +0000
91+
2a9dc245c60ab4478b3bc4670aaad4b39e646366 bors Sun Jul 29 11:27:48 2018 +0000
92+
023fd7e74a9eb5bafcb75fcbe69b7110e9de4492 bors Sun Jul 29 09:33:37 2018 +0000
93+
a5c2d0fffaaf0b764c01bc4066e51ffd475ceae9 bors Sun Jul 29 06:32:24 2018 +0000
94+
fb0653e40289eecf32f3fac1e84fc69b815ce5cb bors Sun Jul 29 03:20:54 2018 +0000
95+
6a2c97c38d297307dd8554853890f51144f62172 bors Sun Jul 29 01:14:39 2018 +0000
96+
6323d9a45bdf0ac2a9319a6a558537e0a7e6abd1 bors Sat Jul 28 23:10:10 2018 +0000
97+
dab71516f1f4f6a63e32dffeb2625a12e5113485 bors Sat Jul 28 20:44:17 2018 +0000
98+
4234adf0d4fa56e8a8b8d790fb4992d160ab2188 bors Sat Jul 28 18:41:40 2018 +0000
99+
d75458200516f06455d175adc001fd993d674050 bors Sat Jul 28 16:44:21 2018 +0000
100+
26e73dabeb7a15e0e38feb2cadca3c1f740a61d2 bors Sat Jul 28 14:26:16 2018 +0000
101+
5b465e309da475aaedcb742ef29094c82e970051 bors Sat Jul 28 11:37:41 2018 +0000
102+
```
103+
104+
and we can, for example, pick the last commit on the day before the nightly,
105+
`6323d9a45bdf0ac2a9319a6a558537e0a7e6abd1`, as the start of the range, and the
106+
last commit on the day of the nightly, `866a713258915e6cbb212d135f751a6a8c9e1c0a`,
107+
as the end of the range.
108+
109+
Assuming you aren't reading this too far in the future, the
71110
following should work:
72111

73112
```
@@ -77,8 +116,14 @@ cargo-bisect-rustc --test-dir=foo \
77116
```
78117

79118
This tells us that the regression started with
80-
70cac59031d5c33962a1f53cdca9359c0dcd1f9f and you can look at the git log to
81-
find the PR.
119+
`70cac59031d5c33962a1f53cdca9359c0dcd1f9f` and you can look at the git log to
120+
find the PR. Here, #51361.
121+
122+
```
123+
git log -1 70cac59031d5c33962a1f53cdca9359c0dcd1f9f
124+
```
125+
126+
shows the merge commit's description starts with "`Auto merge of #51361`".
82127

83128
## Testing interactively
84129

0 commit comments

Comments
 (0)