Commit 8d1fb9c
Fix
Summary:
When `selectivepulldefault=main,master` and a repo's default branch is actually `"master"` (no `"main"` exists), `sl pull --rebase` would abort with "missing rebase destination" because `bookmarks.mainbookmark()` always returned the first config entry (`"main"`).
The fix is in `tweakdefaults.py`: the `pull --rebase` code path now tries each configured `selectivepulldefault` name when the first one doesn't exist in the repo. `mainbookmark()` itself is left unchanged (always returns `names[0]`) since many callers depend on it being a stable, side-effect-free config lookup — changing it to do `name in repo` caused regressions in mutation/visibility behavior (e.g., `test-pushrebase-remotenames.t`, `test-remotenames-pushto.t`).
Resolves #1116
Differential Revision: D99509206
fbshipit-source-id: 2bff968e3aee2502ef386616dbd5a73af9145b3fsl pull --rebase when default branch is "master"1 parent 32cb788 commit 8d1fb9c
File tree
2 files changed
+72
-0
lines changed- eden/scm
- sapling/ext
- tests
2 files changed
+72
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
278 | 286 | | |
279 | 287 | | |
280 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
0 commit comments