jj-octo 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jj-octo.js +12 -5
- package/package.json +1 -1
package/dist/jj-octo.js
CHANGED
|
@@ -18112,7 +18112,7 @@ var layer14 = /* @__PURE__ */ layerMergedContext(/* @__PURE__ */ succeed6(fetch)
|
|
|
18112
18112
|
// package.json
|
|
18113
18113
|
var package_default = {
|
|
18114
18114
|
name: "jj-octo",
|
|
18115
|
-
version: "0.2.
|
|
18115
|
+
version: "0.2.2",
|
|
18116
18116
|
description: "A jj subcommand for working with GitHub that supports stacking",
|
|
18117
18117
|
license: "MIT",
|
|
18118
18118
|
repository: {
|
|
@@ -18886,13 +18886,20 @@ var rebaseStack = (root, required) => gen2(function* () {
|
|
|
18886
18886
|
yield* error(`left "${name}" and the changes on it where they were: they conflict with the trunk`);
|
|
18887
18887
|
}
|
|
18888
18888
|
});
|
|
18889
|
-
var sync4 = (required = []) => gen2(function* () {
|
|
18889
|
+
var sync4 = (required = [], mergedChanges = []) => gen2(function* () {
|
|
18890
18890
|
const jj = yield* Jj;
|
|
18891
18891
|
const before = yield* bookmarksBeforeFetch;
|
|
18892
18892
|
yield* jj.run(["git", "fetch"]);
|
|
18893
|
+
for (const { bookmark } of mergedChanges) {
|
|
18894
|
+
yield* jj.run(["bookmark", "forget", "--include-remotes", `exact:${bookmark}`]);
|
|
18895
|
+
}
|
|
18896
|
+
if (mergedChanges.length > 0) {
|
|
18897
|
+
const revset = mergedChanges.map(({ changeId }) => `change_id(${changeId})`).join(" | ");
|
|
18898
|
+
yield* jj.run(["abandon", `(${revset}) & mutable()`]);
|
|
18899
|
+
}
|
|
18893
18900
|
const fetched = yield* bookmarkTargets;
|
|
18894
18901
|
const notCombined = [];
|
|
18895
|
-
for (const bookmark of before) {
|
|
18902
|
+
for (const bookmark of before.filter(({ name }) => mergedChanges.every((change) => change.bookmark !== name))) {
|
|
18896
18903
|
if (!(yield* combine4(bookmark, fetched.get(bookmark.name)?.origin))) {
|
|
18897
18904
|
notCombined.push(bookmark.name);
|
|
18898
18905
|
}
|
|
@@ -18970,7 +18977,7 @@ var merge5 = (revision) => gen2(function* () {
|
|
|
18970
18977
|
yield* error("queued to merge; run `jj gh sync` once it has");
|
|
18971
18978
|
} else {
|
|
18972
18979
|
yield* error(`merged up to #${pullRequest.number}`);
|
|
18973
|
-
yield* sync4(stackChanges);
|
|
18980
|
+
yield* sync4(stackChanges, changes);
|
|
18974
18981
|
for (const bookmark of above) {
|
|
18975
18982
|
if ((yield* commitsAt(bookmarkRevset(bookmark))).length > 0) {
|
|
18976
18983
|
yield* republish(bookmarkRevset(bookmark));
|
|
@@ -18979,7 +18986,7 @@ var merge5 = (revision) => gen2(function* () {
|
|
|
18979
18986
|
}
|
|
18980
18987
|
}
|
|
18981
18988
|
});
|
|
18982
|
-
var mergeCommand = make30("merge", { revision: revisionFlag("The top change to merge") }, ({ revision }) => asUserError(merge5(revision).pipe(provide3(GitHubFromOrigin)))).pipe(withHelp("Merge the pull requests of a change and the ones below it", "Squash-merges them, and prints which before it does. An empty working copy means the change below it. Fails before merging if any of the changes has edits that aren't pushed.", "A pull request in a GitHub stack is merged together with the pull requests below it. Either all of them merge or none does. A pull request outside a stack is merged alone, and only if its base is the trunk.", "Then syncs, as `jj gh sync` does, and pushes what is left of the change's stack again, up to the highest branch already on GitHub. Unlike `jj gh sync`, it rebases
|
|
18989
|
+
var mergeCommand = make30("merge", { revision: revisionFlag("The top change to merge") }, ({ revision }) => asUserError(merge5(revision).pipe(provide3(GitHubFromOrigin)))).pipe(withHelp("Merge the pull requests of a change and the ones below it", "Squash-merges them, and prints which before it does. An empty working copy means the change below it. Fails before merging if any of the changes has edits that aren't pushed.", "A pull request in a GitHub stack is merged together with the pull requests below it. Either all of them merge or none does. A pull request outside a stack is merged alone, and only if its base is the trunk.", "Then syncs, as `jj gh sync` does, and pushes what is left of the change's stack again, up to the highest branch already on GitHub. Unlike `jj gh sync`, it abandons the merged changes and forgets their bookmarks, rather than relying on each coming out empty on the trunk, which one doesn't where a change merged above it edited the same lines. It also rebases the rest of the stack even where it conflicts with the trunk, and the conflict is recorded in the change.", "If GitHub queues the merge instead, nothing is synced. Run `jj gh sync` once it has merged."));
|
|
18983
18990
|
|
|
18984
18991
|
// src/cli/gh/submit.ts
|
|
18985
18992
|
var submitCommand = make30("submit", {
|