Versions 99 to 100
Lines 256–285 at 100 (were 256–285 at 99)
259− const refused = await main(["publish", "-m", "new picture"], { cwd: dir, env: ENV, write: () => {} });
259+ const refused = await main(["push", "-m", "new picture"], { cwd: dir, env: ENV, write: () => {} });
263− /NOT SENT: b\.txt was text and now has a NUL byte at line 1 \(byte 0\)\..*pass --binary b\.txt\.\nNot published\./,
263+ /NOT SENT: b\.txt was text and now has a NUL byte at line 1 \(byte 0\)\..*pass --binary b\.txt\.\nNot pushed\./,
265265 // The publish goes through, and still says the huge file was left out, with a non-zero exit.
266− const published = await avcs(dir, "publish", "-m", "new picture, b is binary now", "--binary", "b.txt");
266+ const published = await avcs(dir, "push", "-m", "new picture, b is binary now", "--binary", "b.txt");
268− assert.ok(published.json.version !== undefined, "the rest was published");
273− assert.equal((await avcs(bob, "sync")).exit, 0);
274274 assert.deepEqual(new Uint8Array(readFileSync(join(bob, "pic.bin"))), new Uint8Array([9, 0, 9]));
276276
280− assert.equal((await avcs(dir, "publish", "-m", "another picture")).exit, 0);
281281 // sync records first, so bob's picture goes into his draft and collides with alice's rather than being lost.
282− const synced = JSON.parse((await main(["sync", "--json"], { cwd: bob, env: ENV, write: () => {} })).stdout);
282+ const synced = JSON.parse((await main(["pull", "--json"], { cwd: bob, env: ENV, write: () => {} })).stdout);
284284 assert.deepEqual(new Uint8Array(readFileSync(join(bob, "pic.bin"))), new Uint8Array([7, 0, 7]), "bob's bytes stay");
285285
Lines 414–428 at 100 (were 414–428 at 99)
417− assert.equal((await avcs(root, "publish", "-m", "caps")).exit, 0);
420420
421− it("hands news back as additionalContext when someone publishes lines in the draft", async () => {
421+ it("hands news back as additionalContext when someone pushes lines in the draft", async () => {
422422 const { folders } = await project({ "a.txt": "one\ntwo\n", "b.txt": "b\n" }, "alice", "bob");
425− assert.equal((await avcs(folders.alice!, "publish", "-m", "shout one")).exit, 0);
Lines 449–455 at 100 (were 449–455 at 99)
451451
452−describe("record, publish and sync", () => {
Lines 462–483 at 100 (were 462–483 at 99)
464464
465− it("publishes, syncs into another folder, refuses a collision, and settles it", async () => {
468− const pub = await avcs(folders.alice!, "publish", "-m", "alice was here");
471471
474− const refused = await avcs(folders.bob!, "publish", "-m", "bob too");
479479
480− const sync = await avcs(folders.bob!, "sync");
Lines 488–498 at 100 (were 488–498 at 99)
489489
491− const ok = await avcs(folders.bob!, "publish", "-m", "keep both");
494494
495− const back = await avcs(folders.alice!, "sync");
Lines 502–520 at 100 (were 502–520 at 99)
505− assert.equal((await avcs(folders.alice!, "publish", "-m", "drop b")).exit, 0);
506− const s = await avcs(folders.bob!, "sync");
511511
512− it("keeps CRLF line endings when sync rewrites a CRLF file", async () => {
514514 assert.equal(read(folders.bob!, "w.txt"), "one\ntwo\n", "a new file comes in the server form");
516− assert.equal((await avcs(folders.bob!, "publish", "-m", "caps")).exit, 0);
517− const s = await avcs(folders.alice!, "sync");
Lines 529–536 at 100 (were 529–536 at 99)
530530 assert.equal((await avcs(bob, "join", name, "--agent", "bob", "--server", fake.url)).exit, 0);
532− assert.equal((await avcs(folders.alice!, "publish", "-m", "three files")).exit, 0);
533− assert.equal((await avcs(bob, "sync")).exit, 0);
Lines 540–583 at 100 (were 540–583 at 99)
543− assert.equal((await avcs(folders.alice!, "publish", "-m", "d")).exit, 0);
544− assert.equal((await avcs(bob, "sync")).exit, 0);
546546 assert.equal((await avcs(bob, "record")).json.sent, 0, "CRLF on disk is the same text to the server");
548548
549− it("keeps each line's own ending in a mixed-ending file when sync rewrites it (lone CR too)", async () => {
549+ it("keeps each line's own ending in a mixed-ending file when pull rewrites it (lone CR too)", async () => {
552− assert.equal((await avcs(folders.bob!, "publish", "-m", "change b, add a line")).exit, 0);
553− assert.equal((await avcs(folders.alice!, "sync")).exit, 0);
554554 // a, c, d and e keep their endings; the changed and the new line take the most common one (CRLF).
558558
559− it("keeps a missing final newline (LF or CRLF) when sync rewrites the file, with nothing left to record", async () => {
559+ it("keeps a missing final newline (LF or CRLF) when pull rewrites the file, with nothing left to record", async () => {
560560 const { folders } = await project({ "n.txt": "one\ntwo", "c.txt": "x\r\ny" }, "alice", "bob");
563− assert.equal((await avcs(folders.bob!, "publish", "-m", "caps")).exit, 0);
564− const s = await avcs(folders.alice!, "sync");
570570
571− it("says so when there is nothing to publish", async () => {
573− const r = await main(["publish", "-m", "nothing"], { cwd: folders.alice!, env: ENV, write: () => {} });
573+ const r = await main(["push", "-m", "nothing"], { cwd: folders.alice!, env: ENV, write: () => {} });
575− assert.match(r.stdout, /Nothing to publish: your draft is empty\. Shared is at version 0\./);
577577
578− it("refuses publish without a message", async () => {
580− const r = await avcs(folders.alice!, "publish");
Lines 611–627 at 100 (were 611–627 at 99)
612612
614− const refused = await main(["publish", "-m", "lazy work"], { cwd: folders.lazy!, env: ENV, write: () => {} });
614+ const refused = await main(["push", "-m", "lazy work"], { cwd: folders.lazy!, env: ENV, write: () => {} });
616616 assert.match(refused.stdout, /\.claude\/scheduled_tasks\.lock: local files that should never have been shared/);
617− assert.match(refused.stdout, /Run abso sync, then publish again\./);
618618
620− const s = await avcs(folders[agent]!, "sync");
622622 assert.equal(read(folders[agent]!, LOCK), `lock ${agent}\n`, `${agent}'s lock file is untouched`);
624− const pub = await avcs(folders[agent]!, "publish", "-m", `${agent} work`);
Lines 630–651 at 100 (were 630–651 at 99)
632632
633−describe("named drafts: switch, land and draft-sync", () => {
634634 it("carries work into a new draft, parks and restores it, lands it, and moves it onto shared", async () => {
635635 const { name, folders } = await project({ "a.txt": "a\n", "b.txt": "b\n", "c.txt": "c\n" }, "alice", "bob");
637637
638− // Unpublished work carried into a new draft stays in the folder.
644− assert.equal((await avcs(alice, "publish", "-m", "exp: change a")).exit, 0);
645− assert.equal(shared(name)["a.txt"], "a\n", "publishing into the draft leaves shared alone");
646646
648− write(alice, { "b.txt": "b unpublished in exp\n" });
Lines 659–680 at 100 (were 659–680 at 99)
662− assert.equal(read(alice, "b.txt"), "b unpublished in exp\n", "the parked work came back");
663663
666− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob: change c")).exit, 0);
667− const moved = await avcs(alice, "draft-sync");
671671
673− assert.equal((await avcs(alice, "publish", "-m", "exp: change b")).exit, 0);
677− assert.equal(shared(name)["b.txt"], "b unpublished in exp\n");
679679
Lines 693–699 at 100 (were 693–699 at 99)
696− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob: line two")).exit, 0);
697697
Lines 712–732 at 100 (were 712–732 at 99)
715− const sent = await avcs(folders.lead!, "announce", "Stop", "publishing", "until", "v12", "lands");
715+ const sent = await avcs(folders.lead!, "announce", "Stop", "pushing", "until", "v12", "lands");
718718
720− assert.deepEqual(bob.json.news, ["Announcement from lead (as claimed): Stop publishing until v12 lands"]);
720+ assert.deepEqual(bob.json.news, ["Announcement from lead (as claimed): Stop pushing until v12 lands"]);
723− /\tAnnouncement from lead \(as claimed\): Stop publishing until v12 lands\n$/,
726726
729− assert.match(hooked.stdout, /lead \(as claimed\) told you:\\n {2}Stop publishing until v12 lands/);
729+ assert.match(hooked.stdout, /lead \(as claimed\) told you:\\n {2}Stop pushing until v12 lands/);
731731
Lines 748–754 at 100 (were 748–754 at 99)
751− assert.match(started.stdout, /storm\.ts: builder3 \(1 unpublished change\)/);
753753 assert.match(where.stdout, /Starting on:\n {2}builder6: "Storm cloud art" \(storm\.ts\), since /);
Lines 768–784 at 100 (were 768–784 at 99)
770770 assert.match(status.stdout, /NOT SENT: fuzz\.ts was text and now has a NUL byte at line 3 \(byte 10\)/);
771− const refused = await avcs(alice, "publish", "-m", "oops");
773773 assert.deepEqual(refused.json.turnedBinary, [{ path: "fuzz.ts", why: "a NUL byte", offset: 10, line: 3 }]);
775775
777− assert.equal((await avcs(alice, "publish", "-m", "fixed")).exit, 0);
779779
780780 writeFileSync(join(alice, "fuzz.ts"), Buffer.concat([Buffer.from("ok\n"), Buffer.from([0xc3, 0x28])]));
781− assert.deepEqual((await avcs(alice, "publish", "-m", "bad utf-8")).json.turnedBinary, [
Lines 787–809 at 100 (were 787–809 at 99)
788788 const text = async (cwd: string, ...argv: string[]) => main(argv, { cwd, env: ENV, write: () => {} });
789789
790− it("drops a published version, refuses one others build on, and says so in the log", async () => {
790+ it("drops a pushed version, refuses one others build on, and says so in the log", async () => {
794− assert.equal((await avcs(alice, "publish", "-m", "change a")).exit, 0);
796− assert.equal((await avcs(alice, "publish", "-m", "change a again")).exit, 0);
798− assert.equal((await avcs(alice, "publish", "-m", "change b")).exit, 0);
799− assert.equal((await avcs(bob, "sync")).exit, 0);
800800
806− /Not dropped\.\nLater published versions build on it:\n {2}version 2 by alice: change a again\nPass --with-dependents/,
806+ /Not dropped\.\nLater pushed versions build on it:\n {2}version 2 by alice: change a again\nPass --with-dependents/,
Lines 814–820 at 100 (were 814–820 at 99)
815815
817− assert.equal((await avcs(bob, "sync")).exit, 0);
820820 assert.match(log.stdout, /version 4 by alice, .*: a was wrong\n {2}1 file: a\.txt\n {2}drops versions 1, 2/);
Lines 824–835 at 100 (were 824–835 at 99)
826826
827− it("refuses a publish that builds on lines a drop took out, plainly, with exit 2", async () => {
831− assert.equal((await avcs(alice, "publish", "-m", "shout two")).exit, 0);
832− assert.equal((await avcs(bob, "sync")).exit, 0);
Lines 837–880 at 100 (were 837–880 at 99)
840− /Unpublished work builds on it, and a drop never touches unpublished work:\n {2}agent bob: a\.txt/,
846− const publish = await text(bob, "publish", "-m", "more shouting");
850− /^abso publish: refused: your unpublished changes to a\.txt build on lines a drop took out of shared; restore those files \(abso restore a\.txt\)/,
850+ /^abso push: refused: your unpushed changes to a\.txt build on lines a drop took out of shared; restore those files \(abso restore a\.txt\)/,
853853
854− it("amends the newest publish, and the log keeps the first message", async () => {
858− assert.equal((await avcs(alice, "publish", "-m", "chnage a")).exit, 0);
861861 assert.match(amended.stdout, /^Version 1 of shared now says: change a\n\(It said: chnage a\.\)/);
864− /version 1 by alice, .*: change a\n {2}1 file: a\.txt\n {2}amended; first published as: chnage a/,
864+ /version 1 by alice, .*: change a\n {2}1 file: a\.txt\n {2}amended; first pushed as: chnage a/,
866− assert.match((await text(alice, "show", "1")).stdout, /: change a\n {2}amended; first published as: chnage a/);
866+ assert.match((await text(alice, "show", "1")).stdout, /: change a\n {2}amended; first pushed as: chnage a/);
868868
869− it("labels versions, and a folder that follows a label syncs to it", async () => {
873− assert.equal((await avcs(alice, "publish", "-m", "one")).exit, 0);
877− assert.equal((await avcs(alice, "publish", "-m", "two")).exit, 0);
Lines 892–898 at 100 (were 892–898 at 99)
892892
895− assert.equal((await avcs(bob, "sync")).exit, 0);
897897
898898 assert.equal((await avcs(alice, "label", "stable", "--version", "2", "--remove")).json.versions.join(), "1");
Lines 908–916 at 100 (were 908–916 at 99)
911− assert.equal((await avcs(alice, "publish", "-m", "exp: a")).exit, 0);
913− assert.equal((await avcs(alice, "publish", "-m", "exp: b")).exit, 0);
Lines 919–925 at 100 (were 919–925 at 99)
921921
922− it("blames a named draft, and marks your own unpublished lines with --mine", async () => {
Lines 928–934 at 100 (were 928–934 at 99)
931− assert.match(mine.stdout, /\* not published yet/);
932932 assert.match((await text(alice, "blame", "a.txt")).stdout, /lines 1-2 of 2/, "shared does not have it");
Lines 936–942 at 100 (were 936–942 at 99)
937937
939− assert.equal((await avcs(alice, "publish", "-m", "exp: three")).exit, 0);
Lines 948–958 at 100 (were 948–958 at 99)
948948 const text = async (cwd: string, ...argv: string[]) => main(argv, { cwd, env: ENV, write: () => {} });
950950
951− it("shows a rename as one change in diff, show and sync, and log follows it back", async () => {
951+ it("shows a rename as one change in diff, show and pull, and log follows it back", async () => {
952952 const { name, folders } = await project({ "lib/old.ts": SRC, "keep.ts": "k\n" }, "alice", "bob");
955− assert.equal((await avcs(alice, "publish", "-m", "f returns 2")).exit, 0);
956956
Lines 967–973 at 100 (were 967–973 at 99)
970− assert.equal((await avcs(alice, "publish", "-m", "rename old to new")).exit, 0);
971971 assert.equal(shared(name)["lib/new.ts"], SRC.replace("return 1", "return 2").replace("x = 2", "x = 3"));
972972
Lines 976–982 at 100 (were 976–982 at 99)
976976 /1 file \(1 renamed\), 1 line added, 1 removed\.\nsimilarity index 80%\nrename from lib\/old\.ts\nrename to lib\/new\.ts/,
978978
979− const sync = await avcs(bob, "sync");
982982
Lines 993–1003 at 100 (were 993–1003 at 99)
994994 /: 1 file \(1 renamed\), 0 lines added, 0 removed\.\nsimilarity index 100%\nrename from keep\.ts\nrename to kept\.ts\n$/,
996− assert.equal((await avcs(alice, "publish", "-m", "rename keep")).exit, 0);
997− const synced = await text(bob, "sync");
1000− /Synced to version 3: 0 files updated, 0 deleted, 1 renamed\.\n {2}renamed: keep\.ts -> kept\.ts/,
1000+ /Pulled to version 3: 0 files updated, 0 deleted, 1 renamed\.\n {2}renamed: keep\.ts -> kept\.ts/,
10031003
Lines 1046–1052 at 100 (were 1046–1052 at 99)
10481048
1049−describe("a quieter sync (trial request)", () => {
Lines 1055–1069 at 100 (were 1055–1069 at 99)
1058− assert.equal((await avcs(alice, "publish", "-m", "change all")).exit, 0);
1059− const quiet = await main(["sync"], { cwd: bob, env: ENV, write: () => {} });
1062− "Synced to version 1: 11 files updated, 0 deleted.\n updated: f00.txt, f01.txt, f02.txt, f03.txt, f04.txt, f05.txt, f06.txt, f07.txt, and 3 more\n (abso sync --verbose lists every file)\n",
1062+ "Pulled to version 1: 11 files updated, 0 deleted.\n updated: f00.txt, f01.txt, f02.txt, f03.txt, f04.txt, f05.txt, f06.txt, f07.txt, and 3 more\n (abso pull --verbose lists every file)\n",
1065− assert.equal((await avcs(alice, "publish", "-m", "change back")).exit, 0);
1066− const loud = await main(["sync", "--verbose"], { cwd: bob, env: ENV, write: () => {} });
10671067 assert.equal(loud.stdout.split("\n").filter((l) => l.startsWith(" updated f")).length, 11);
Lines 1239–1245 at 100 (were 1239–1245 at 99)
1242− ` src/re.ts: parse is defined twice, yours (lines 10-12) and bob's from version 7 ("add parse") (lines 3-4). Keep one, then publish.`,
1242+ ` src/re.ts: parse is defined twice, yours (lines 10-12) and bob's from version 7 ("add parse") (lines 3-4). Keep one, then push.`,
Lines 1251–1280 at 100 (were 1251–1280 at 99)
12531253
1254− it("refuses a publish that defines a name another agent defined in the same file", async () => {
12571257 write(alice, { "a.ts": "export const x = 1;\nexport function parseClassSet() {\n return 1;\n}\n" });
1258− assert.equal((await avcs(alice, "publish", "-m", "add parse")).exit, 0);
12591259 write(bob, { "a.ts": "export function parseClassSet() {\n return 2;\n}\nexport const x = 1;\n" });
12601260 // Sync brings alice's parse into bob's view, where it is defined twice: sync lists it, publish refuses.
1261− const synced = await main(["sync"], { cwd: bob, env: ENV, write: () => {} });
1264− /1 collision: a name defined twice needs one definition kept before you publish\.\n/,
12671267 // Where each definition is: the declaration line, or (engine after e94f772) the whole definition.
1270− /a\.ts: parseClassSet is defined twice, yours \((line 1|lines 1-3)\) and alice's from version 1 \("add parse"\) \((line 5|lines 5-7)\)\. Keep one, then publish\./,
1270+ /a\.ts: parseClassSet is defined twice, yours \((line 1|lines 1-3)\) and alice's from version 1 \("add parse"\) \((line 5|lines 5-7)\)\. Keep one, then push\./,
1272− const refused = await main(["publish", "-m", "my parse"], { cwd: bob, env: ENV, write: () => {} });
1272+ const refused = await main(["push", "-m", "my parse"], { cwd: bob, env: ENV, write: () => {} });
1274− assert.match(refused.stdout, /^Not published: 1 collision\.\n {2}a\.ts: parseClassSet is defined twice/);
1274+ assert.match(refused.stdout, /^Not pushed: 1 collision\.\n {2}a\.ts: parseClassSet is defined twice/);
1277− /\nKeep one definition of each name defined twice \(delete yours, or theirs\), then publish again\.\n$/,
1277+ /\nKeep one definition of each name defined twice \(delete yours, or theirs\), then push again\.\n$/,
Lines 1333–1339 at 100 (were 1333–1339 at 99)
13331333 const files = Object.fromEntries([...HOSTILE.map((p) => [p, "pwned\n"] as const), ["fine/new.txt", "fine\n"]]);
1336− const sync = await main(["sync", "--json"], { cwd: bob, env: ENV, write: () => {} });
13391339 assert.deepEqual(json.refused.map((r: { path: string }) => r.path).sort(), [...HOSTILE].sort());
Lines 1345–1351 at 100 (were 1345–1351 at 99)
1348− const text = await main(["sync"], { cwd: folders.carol!, env: ENV, write: () => {} });
Lines 1414–1420 at 100 (were 1414–1420 at 99)
14151415 files: { "CLAUDE~1/settings.json": '{"hooks":"pwned"}\n', "GIT~1/config": "pwned\n", "fine.txt": "fine\n" },
1417− const json = JSON.parse((await main(["sync", "--json"], { cwd: bob, env: ENV, write: () => {} })).stdout);
1417+ const json = JSON.parse((await main(["pull", "--json"], { cwd: bob, env: ENV, write: () => {} })).stdout);
Lines 1446–1474 at 100 (were 1446–1474 at 99)
14481448
1449− it("a write the disk refuses is named, and the rest of the sync still lands", async () => {
1455− const sync = await main(["sync", "--json"], { cwd: bob, env: ENV, write: () => {} });
1461− assert.equal(read(bob, "z.txt"), "z\n", "the rest of the sync still lands");
14621462
14631463 // Remembered (#51): no later sync sends it again, so status and every sync name it until a write works.
1465− /Stale here: a sync couldn't write this file, and no later sync sends it again\. Close whatever holds it, then abso sync --full: block\/x\.txt \(version \d+: [A-Z]+\)/;
1465+ /Stale here: a pull couldn't write this file, and no later pull sends it again\. Close whatever holds it, then abso pull --full: block\/x\.txt \(version \d+: [A-Z]+\)/;
14661466 assert.match((await main(["status"], { cwd: bob, env: ENV, write: () => {} })).stdout, stale);
1467− const again = await main(["sync"], { cwd: bob, env: ENV, write: () => {} });
1471− assert.equal((await main(["sync"], { cwd: bob, env: ENV, write: () => {} })).exit, 0);
14731473 assert.doesNotMatch((await main(["status"], { cwd: bob, env: ENV, write: () => {} })).stdout, /Stale here/);
Lines 1480–1486 at 100 (were 1480–1486 at 99)
1483− const json = JSON.parse((await main(["sync", "--json"], { cwd: bob, env: ENV, write: () => {} })).stdout);
1483+ const json = JSON.parse((await main(["pull", "--json"], { cwd: bob, env: ENV, write: () => {} })).stdout);
14841484 assert.deepEqual(json.refused, [{ path: "up", why: "it links to ../../.ssh, outside this folder" }]);
14861486
Lines 1631–1640 at 100 (were 1631–1640 at 99)
1634− assert.equal((await avcs(alice, "publish", "-m", "two")).exit, 0);
1636− assert.equal((await avcs(alice, "publish", "-m", "three, and new")).exit, 0);
1637− write(alice, { "v.txt": "four, unpublished\n" });
Lines 1648–1654 at 100 (were 1648–1654 at 99)
16491649
1651− assert.equal(now.out, "four, unpublished new -\n");
16541654 assert.match(v1.err, /^abso: running version 1 of shared in the box \(3 files\); your folder is untouched\.\n/);
Lines 1663–1669 at 100 (were 1663–1669 at 99)
16651665
1666− assert.equal(read(alice, "v.txt"), "four, unpublished\n", "the folder is untouched");
Lines 1698–1713 at 100 (were 1698–1713 at 99)
1701− const publish = await main(["publish", "-m", "nothing"], { cwd: alice, env: ENV, write: () => {} });
1701+ const publish = await main(["push", "-m", "nothing"], { cwd: alice, env: ENV, write: () => {} });
1704− /^Recording is paused \(abso resume\): your folder's changes were not sent first\.\nNothing to publish/,
1704+ /^Recording is paused \(abso resume\): your folder's changes were not sent first\.\nNothing to push/,
17071707 assert.match((await main(["resume"], { cwd: alice, env: ENV, write: () => {} })).stdout, /^Recording again\./);
1709− const sent = await main(["publish", "-m", "now"], { cwd: alice, env: ENV, write: () => {} });
1710− assert.match(sent.stdout, /^Recorded first: 2 changed \(a\.txt, b\.txt\)\.\nPublished version 1\./);
1710+ assert.match(sent.stdout, /^Recorded first: 2 changed \(a\.txt, b\.txt\)\.\nPushed version 1\./);
17131713
Lines 1725–1760 at 100 (were 1725–1760 at 99)
17271727
1728−describe("publish and sync say what happened to others' work (#37, the game trial)", () => {
1729− it("a publish on top of versions the folder lacks says nothing was overwritten", async () => {
1732− assert.equal((await avcs(folders.bob!, "publish", "-m", "Pitch five")).exit, 0);
1734− const r = await main(["publish", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
1734+ const r = await main(["push", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
1737− /Published version 2\. It went on top of version 1 \(bob: "Pitch five"\), which your folder doesn't have yet\. Nothing of theirs was overwritten; run abso sync to see both\.\n/,
1737+ /Pushed version 2\. It went on top of version 1 \(bob: "Pitch five"\), which your folder doesn't have yet\. Nothing of theirs was overwritten; run abso pull to see both\.\n/,
17401740
1741− it("lines changed on both sides: sync writes a marker block, publish refuses it, --as-is keeps both (#11)", async () => {
1741+ it("lines changed on both sides: pull writes a marker block, push refuses it, --as-is keeps both (#11)", async () => {
1744− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob")).exit, 0);
1746− const synced = await main(["sync"], { cwd: folders.alice!, env: ENV, write: () => {} });
17471747 assert.match(synced.stdout, /1 collision: where lines changed on both sides, the file now holds a marker block/);
17501750 'one\n<<<<<<< yours (unpublished)\ntwo by alice\n||||||| before (version 0)\ntwo\n=======\nTWO by bob\n>>>>>>> theirs: bob, version 1 "bob"\nthree\n',
1752− const refused = await main(["publish", "-m", "both kept"], { cwd: folders.alice!, env: ENV, write: () => {} });
1752+ const refused = await main(["push", "-m", "both kept"], { cwd: folders.alice!, env: ENV, write: () => {} });
1755− (await avcs(folders.alice!, "publish", "-m", "both kept", "--as-is")).exit,
1757− "--as-is publishes both and settles it",
Lines 1763–1771 at 100 (were 1763–1771 at 99)
17631763 const { folders } = await project({ "a.txt": "one\ntwo\nthree\n", "b.txt": "b\n" }, "alice", "bob");
1766− assert.equal((await avcs(bob, "publish", "-m", "Bob says TWO")).exit, 0);
1768− const synced = await main(["sync"], { cwd: alice, env: ENV, write: () => {} });
17711771 /Box runs fail while markers are in the folder\.\n {2}a\.txt lines 2-8: yours against bob's version 1 \("Bob says TWO"\)\.\n/,
Lines 1773–1785 at 100 (were 1773–1785 at 99)
1776− /\n1 collision to settle before you publish \(keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours\|--theirs\|--both\):\n {2}a\.txt lines 2-8, with bob's version 1 \("Bob says TWO"\)\n/,
1776+ /\n1 collision to settle before you push \(keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours\|--theirs\|--both\):\n {2}a\.txt lines 2-8, with bob's version 1 \("Bob says TWO"\)\n/,
1778− const refused = await main(["publish", "-m", "mine"], { cwd: alice, env: ENV, write: () => {} });
1778+ const refused = await main(["push", "-m", "mine"], { cwd: alice, env: ENV, write: () => {} });
1782− /Not published: a\.txt still has collision markers \(1 block\)\.\n {2}a\.txt lines 2-8: yours against bob's version 1 \("Bob says TWO"\)\.\nSettle each: keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours\|--theirs\|--both\./,
1782+ /Not pushed: a\.txt still has collision markers \(1 block\)\.\n {2}a\.txt lines 2-8: yours against bob's version 1 \("Bob says TWO"\)\.\nSettle each: keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours\|--theirs\|--both\./,
Lines 1803–1809 at 100 (were 1803–1809 at 99)
1806− const published = await main(["publish", "-m", "Alice"], { cwd: alice, env: ENV, write: () => {} });
1806+ const published = await main(["push", "-m", "Alice"], { cwd: alice, env: ENV, write: () => {} });
Lines 1812–1830 at 100 (were 1812–1830 at 99)
1815− /alice settled its collision with your version 1 in a\.txt, publishing version 2: it kept your lines\. abso show 2:a\.txt shows the file\./,
1815+ /alice settled its collision with your version 1 in a\.txt, pushing version 2: it kept your lines\. abso show 2:a\.txt shows the file\./,
18181818
18191819 it("a settle that loses lines both sides had says which, under the Settled line (#37)", async () => {
1822− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob")).exit, 0);
1824− assert.equal((await avcs(folders.alice!, "sync")).exit, 0);
1827− const r = await main(["publish", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
1827+ const r = await main(["push", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
18291829 assert.match(r.stdout, /\n {2}a\.txt: lost 1 line you both had: "shared line"; check abso show 2:a\.txt\n/);
Lines 1832–1843 at 100 (were 1832–1843 at 99)
18321832 it("a marker line left behind after settling is named on its own line, to delete (#11)", async () => {
1835− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob")).exit, 0);
1837− assert.equal((await avcs(folders.alice!, "sync")).exit, 0);
18391839 write(folders.alice!, { "a.txt": 'one\ntwo by alice\n=======\n>>>>>>> theirs: bob, version 1 "bob"\nthree\n' });
1840− const refused = await main(["publish", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
1840+ const refused = await main(["push", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
18421842 assert.match(refused.stdout, /\n {2}a\.txt line 4: a marker line left from a collision; delete it\.\n/);
Lines 1887–1893 at 100 (were 1887–1893 at 99)
18891889
1890− it("screens the box's paths as a sync's: nothing outside the folder, in .git, or a link", async () => {
1890+ it("screens the box's paths as a pull's: nothing outside the folder, in .git, or a link", async () => {
Lines 1917–1923 at 100 (were 1917–1923 at 99)
1920− const synced = await main(["sync"], { cwd: alice, env: ENV, write: () => {} });
19211921 assert.match(synced.stdout, /^Recorded first: 1 changed \(a\.txt\), 2 deleted \(gone1\.ts, gone2\.ts\)\.\n/);
Lines 1935–1956 at 100 (were 1935–1956 at 99)
19371937
1938− it("writes one published version to its own folder, stamped, and leaves the folder and the agent alone", async () => {
1938+ it("writes one pushed version to its own folder, stamped, and leaves the folder and the agent alone", async () => {
1942− assert.equal((await avcs(folders.alice!, "publish", "-m", "v1")).exit, 0);
1944− assert.equal((await avcs(folders.alice!, "publish", "-m", "v2")).exit, 0);
1946− write(tester, { "index.html": "<p>mine, unpublished</p>\n" });
19511951 assert.deepEqual(listAll(out), [".abso-export", ".absoignore", "index.html", "src/game.ts", "src/new.ts"]);
1953− assert.equal(read(out, "index.html"), "<p>v0</p>\n", "published files, not the unpublished edit");
19541954 // One line, no extension: the exported project's own formatter has nothing to say about it.
Lines 1979–1988 at 100 (were 1979–1988 at 99)
19811981 // The folder is untouched, and so is the agent: still on version 0 with its unpublished edit.
1982− assert.equal(read(tester, "index.html"), "<p>mine, unpublished</p>\n");
19841984 const short = await main(["status", "--short"], { cwd: tester, env: ENV, write: () => {} });
1985− assert.equal(short.stdout, "0+unpublished\n");
19871987
19881988 it("refuses a folder with other files in it, and one inside the abso folder that abso would record", async () => {
Lines 2002–2011 at 100 (were 2002–2011 at 99)
20042004
2005− it("status --short is the version alone when the folder holds nothing unpublished", async () => {
2005+ it("status --short is the version alone when the folder holds nothing unpushed", async () => {
2008− assert.equal((await avcs(folders.alice!, "publish", "-m", "v1")).exit, 0);
20092009 assert.equal((await main(["status", "--short"], { cwd: folders.alice!, env: ENV, write: () => {} })).stdout, "1\n");
20102010 assert.equal((await main(["status", "--short"], { cwd: folders.bob!, env: ENV, write: () => {} })).stdout, "0\n");
Lines 2022–2028 at 100 (were 2022–2028 at 99)
20222022 it("a join under an agent name the server already knows writes every file, not only what changed since", async () => {
2025− assert.equal((await avcs(folders.alice!, "publish", "-m", "v1")).exit, 0);
Lines 2032–2038 at 100 (were 2032–2038 at 99)
20342034
2035− it("status names files the folder lacks, files marks them, and sync --full writes them", async () => {
2035+ it("status names files the folder lacks, files marks them, and pull --full writes them", async () => {
Lines 2043–2055 at 100 (were 2043–2055 at 99)
2046− /Everything in this folder is recorded\.\nMissing from this folder though your view has them \(abso sync --full writes them; abso files lists them all\): src\/state\.ts, vite\.config\.ts\n/,
2046+ /Everything in this folder is recorded\.\nMissing from this folder though your view has them \(abso pull --full writes them; abso files lists them all\): src\/state\.ts, vite\.config\.ts\n/,
2052− "Your view holds 5 files: shared at version 0, with your unpublished changes. 2 of them are missing from this folder (abso sync --full writes them).",
2052+ "Your view holds 5 files: shared at version 0, with your unpushed changes. 2 of them are missing from this folder (abso pull --full writes them).",
Lines 2060–2067 at 100 (were 2060–2067 at 99)
20612061 assert.deepEqual((await avcs(bob, "files", "src/**")).json.files, ["src/main.ts", "src/state.ts"]);
2063− assert.equal((await avcs(bob, "sync")).json.written.length, 0);
2064− const full = await avcs(bob, "sync", "--full");
Lines 2069–2088 at 100 (were 2069–2088 at 99)
20712071
2072− it("a file deleted and not yet recorded is not called missing, and sync --full leaves the deletion alone", async () => {
2072+ it("a file deleted and not yet recorded is not called missing, and pull --full leaves the deletion alone", async () => {
2078− await avcs(folders.bob!, "sync", "--full");
2079− assert.equal(existsSync(join(folders.bob!, "tools", "play.mjs")), false, "sync records the deletion first");
2079+ assert.equal(existsSync(join(folders.bob!, "tools", "play.mjs")), false, "pull records the deletion first");
20812081
2085− assert.equal((await avcs(folders.alice!, "publish", "-m", "new")).exit, 0);
20862086 assert.equal((await avcs(folders.bob!, "files", "--version", "0")).json.files.length, 5, "4 files and .absoignore");
20872087 const now = await main(["files", "--draft", "shared"], { cwd: folders.bob!, env: ENV, write: () => {} });
Lines 2090–2114 at 100 (were 2090–2118 at 99)
20922092
2093−describe("lines merged item by item at sync (#37)", () => {
2094− it("names the merged line, so the agent reads it before publishing", async () => {
20952095 const { folders } = await project({ "src/main.ts": "const SYSTEMS = [input, physics, render];\n" }, "alice", "bob");
20962096 write(folders.bob!, { "src/main.ts": "const SYSTEMS = [input, physics, audio, render];\n" });
2097− assert.equal((await avcs(folders.bob!, "publish", "-m", "Audio system")).exit, 0);
20982098 write(folders.alice!, { "src/main.ts": "const SYSTEMS = [input, physics, render, hud];\n" });
2099− const synced = await main(["sync"], { cwd: folders.alice!, env: ENV, write: () => {} });
2102− /\nMerged 1 line that both you and bob changed, item by item\. Check it reads right, then publish:\n {2}src\/main\.ts line 1, with bob's version 1 \("Audio system"\): const SYSTEMS = \[[^\]]*\];\n/,
2102+ /\nMerged 1 line that both you and bob changed, item by item\. Check it reads right, then push:\n {2}src\/main\.ts line 1, with bob's version 1 \("Audio system"\): const SYSTEMS = \[[^\]]*\];\n/,
2107− assert.equal(
2108− (await avcs(folders.alice!, "publish", "-m", "hud")).exit,
2109− 0,
2110− "a merged line does not hold up a publish",
2111− );
2107+ assert.equal((await avcs(folders.alice!, "push", "-m", "hud")).exit, 0, "a merged line does not hold up a push");
21142110
2115−describe("a failing publish --check says whose it is (#36)", () => {
21172113 "const fs = require('fs'); const t = fs.readFileSync('state.txt', 'utf8') + fs.readFileSync('mine.txt', 'utf8'); process.exit(t.includes('bad') ? 1 : 0);\n";
21182114
Lines 2119–2127 at 100 (were 2123–2131 at 99)
2126− assert.equal((await avcs(folders.bob!, "publish", "-m", "Bob breaks the test")).exit, 0);
2128− const theirs = await main(["publish", "-m", "mine", "--check", "node check.cjs"], {
Lines 2134–2142 at 100 (were 2138–2146 at 99)
2141− assert.equal((await avcs(folders.bob!, "publish", "-m", "Bob fixes it")).exit, 0);
2143− const mine = await main(["publish", "-m", "mine", "--check", "node check.cjs"], {
Lines 2158–2194 at 100 (were 2162–2198 at 99)
2165− const r = await main(["publish", ...more], { cwd, env: QENV, write: () => {}, writeErr: (t) => (err += t) });
2161+ const r = await main(["push", ...more], { cwd, env: QENV, write: () => {}, writeErr: (t) => (err += t) });
21682164
2169− it("publish waits for its publish to land, or to be pulled with the check's output", async () => {
2165+ it("push waits for its push to land, or to be turned back with the check's output", async () => {
2176− "Recorded first: 1 changed (state.txt).\nPublished version 1: it passed the project's check in the merge queue.\n",
2172+ "Recorded first: 1 changed (state.txt).\nPushed version 1: it passed the project's check in the merge queue.\n",
2180− /^abso: Queued as publish 1: it lands once the project's check passes on it in the merge queue\. Waiting up to 100 s for it \(--no-wait returns at once\)\.\n/,
2176+ /^abso: Queued as push 1: it lands once the project's check passes on it in the merge queue\. Waiting up to 100 s for it \(--no-wait returns at once\)\.\n/,
21822178 assert.doesNotMatch(landed.stdout, /landed as version/, "the outcome is said once, not again as news");
21832179
2184− await avcs(folders.bob!, "sync");
2190− `Recorded first: 1 changed (state.txt).\nNot published: your queued publish "breaks it" was pulled: the project's check failed on it on top of version 1. Its changes are still in your draft; fix them, then publish again.\n`,
2186+ `Recorded first: 1 changed (state.txt).\nNot pushed: your queued push "breaks it" was turned back: the project's check failed on it on top of version 1. Its changes are still in your draft; fix them, then push again.\n`,
21922188 assert.equal((await avcs(folders.bob!, "status")).json.version, 1, "shared stayed at version 1");
21942190
2195− it("--done takes the start note back only once the queued publish lands", async () => {
21982194 /Starting on:/.test((await main(["where"], { cwd: folders.alice!, env: QENV, write: () => {} })).stdout);
Lines 2200–2208 at 100 (were 2204–2212 at 99)
2207− /\nYour start note stays \(--done\): publish 1 hasn't landed yet\. Once it has, abso start --done takes the note back and abso issue <N> --done closes the issue it names\.\n$/,
2203+ /\nYour start note stays \(--done\): push 1 hasn't landed yet\. Once it has, abso start --done takes the note back and abso issue <N> --done closes the issue it names\.\n$/,
2209− assert.equal(await noted(), true, "a queued publish may yet be pulled");
22102206 assert.equal((await main(["unqueue"], { cwd: folders.alice!, env: QENV, write: () => {} })).exit, 0);
Lines 2211–2228 at 100 (were 2215–2232 at 99)
2218− assert.equal(await noted(), true, "a pulled publish leaves the note");
2224− /\nPublished version 1: it passed the project's check in the merge queue\.\nYour start note is taken back \(--done\): this work is finished\.\n$/,
2220+ /\nPushed version 1: it passed the project's check in the merge queue\.\nYour start note is taken back \(--done\): this work is finished\.\n$/,
22282224
2229− it("--no-wait and --wait, status shows the queue, unqueue takes it back, and a collision names the queued publish", async () => {
2225+ it("--no-wait and --wait, status shows the queue, unqueue takes it back, and a collision names the queued push", async () => {
Lines 2231–2243 at 100 (were 2235–2247 at 99)
2238− /^Recorded first: 1 changed \(other\.txt\)\.\nQueued as publish 1: it lands once the project's check passes on it in the merge queue\.\nNot waiting \(--no-wait\)\. The outcome comes as news on your next edit; abso status shows the queue, and abso unqueue takes it back\.\n$/,
2234+ /^Recorded first: 1 changed \(other\.txt\)\.\nQueued as push 1: it lands once the project's check passes on it in the merge queue\.\nNot waiting \(--no-wait\)\. The outcome comes as news on your next edit; abso status shows the queue, and abso unqueue takes it back\.\n$/,
22402236 const status = await main(["status"], { cwd: folders.alice!, env: QENV, write: () => {} });
22432239 (await main(["status", "--short"], { cwd: folders.alice!, env: QENV, write: () => {} })).stdout,
2244− "0+unpublished+queued\n",
Lines 2254–2260 at 100 (were 2258–2264 at 99)
2261− /^Your publish 1 \("two"\) is in the merge queue: [^\n]+\.\nIt lands or is pulled once the project's check runs on it; the outcome comes as news, and abso unqueue takes it back\.\nNo open asks of alice\.\n$/,
2257+ /^Your push 1 \("two"\) is in the merge queue: [^\n]+\.\nIt lands or is turned back once the project's check runs on it; the outcome comes as news, and abso unqueue takes it back\.\nNo open asks of alice\.\n$/,
Lines 2264–2270 at 100 (were 2268–2274 at 99)
2271− assert.match(refused.stdout, /theirs, by alice in queued publish 1 \(not landed yet\) \("two"\)/);
2267+ assert.match(refused.stdout, /theirs, by alice in queued push 1 \(not landed yet\) \("two"\)/);
22722268 assert.match(refused.stdout, /\nSome of theirs are still in the merge queue, not in shared: once they land/);
22732269
Lines 2272–2287 at 100 (were 2276–2294 at 99)
2279− /^Recorded first: 1 changed \(state\.txt\)\.\nStill queued after 1 s: publish 2 is waiting, 1 publish ahead of it\. The outcome comes as news/,
2275+ /^Recorded first: 1 changed \(state\.txt\)\.\nStill queued after 1 s: push 2 is waiting, 1 push ahead of it\. The outcome comes as news/,
2283− /^abso: Queued as publish 2, 1 publish ahead of it: [^\n]*\nabso: your publish is waiting, 1 publish ahead of it\.\n/,
2279+ /^abso: Queued as push 2, 1 push ahead of it: [^\n]*\nabso: your push is waiting, 1 push ahead of it\.\n/,
22852281
2288− assert.equal(
2289− back.stdout,
2290− "Took back queued publishes 1, 2: their changes are still in your draft, unpublished.\n",
2291− );
2284+ assert.equal(back.stdout, "Took back queued pushes 1, 2: their changes are still in your draft, unpushed.\n");
Lines 2291–2317 at 100 (were 2298–2324 at 99)
22992292
2301− const news = `Your queued publish "breaks it" was pulled: the project's check failed on it on top of version 1:\n== check\n== check exited 1\n. Its changes are still in your draft.`;
2294+ const news = `Your queued push "breaks it" was turned back: the project's check failed on it on top of version 1:\n== check\n== check exited 1\n. Its changes are still in your draft.`;
2304− `The check's output ends:\n== check\n== check exited 1\nNot published: your queued publish "breaks it" was pulled: the project's check failed on it on top of version 1. Its changes are still in your draft; fix them, then publish again.`,
2297+ `The check's output ends:\n== check\n== check exited 1\nNot pushed: your queued push "breaks it" was turned back: the project's check failed on it on top of version 1. Its changes are still in your draft; fix them, then push again.`,
2308− 'Your queued publish "x" was pulled: it builds on queued publish 3, which was pulled. Its changes are still in your draft.',
2301+ 'Your queued push "x" was turned back: it builds on queued push 3, which was turned back. Its changes are still in your draft.',
2310− 'Not published: your queued publish "x" was pulled: it builds on queued publish 3, which was pulled. Its changes are still in your draft; fix them, then publish again.',
2303+ 'Not pushed: your queued push "x" was turned back: it builds on queued push 3, which was turned back. Its changes are still in your draft; fix them, then push again.',
23132306
2314− it("--check alone skipped for a queue that is only in the draft says the publish landed directly, unchecked", async () => {
2307+ it("--check alone skipped for a queue that is only in the draft says the push landed directly, unchecked", async () => {
23152308 const { folders } = await project({ "avcs.json": '{"check": "node -e 0"}\n', "a.txt": "a\n" }, "alice");
2321− /\nPublished version 1\.\nIt landed directly, with no check: your avcs\.json says "queue": true, but shared's doesn't yet, so the merge queue isn't on and --check alone was skipped\./,
2314+ /\nPushed version 1\.\nIt landed directly, with no check: your avcs\.json says "queue": true, but shared's doesn't yet, so the merge queue isn't on and --check alone was skipped\./,
23242317
Lines 2324–2330 at 100 (were 2331–2337 at 99)
2334− /^Recorded first: 1 changed \(other\.txt\)\.\nThe merge queue runs the project's check on what lands, so --check alone was skipped\.\nPublished version 1: /,
2327+ /^Recorded first: 1 changed \(other\.txt\)\.\nThe merge queue runs the project's check on what lands, so --check alone was skipped\.\nPushed version 1: /,
Lines 2338–2344 at 100 (were 2345–2351 at 99)
2348− writeFileSync(lock, JSON.stringify({ pid: holder.pid, time: Date.now() - 60_000, what: "sync" }));
2341+ writeFileSync(lock, JSON.stringify({ pid: holder.pid, time: Date.now() - 60_000, what: "pull" }));
Lines 2346–2352 at 100 (were 2353–2359 at 99)
2356− `another abso command \\(sync, process ${holder.pid}, since [0-9:]+ UTC\\) is changing this folder's records; run this again when it has finished\\. If none is running, delete \\.avcs/lock\\.`,
2349+ `another abso command \\(pull, process ${holder.pid}, since [0-9:]+ UTC\\) is changing this folder's records; run this again when it has finished\\. If none is running, delete \\.avcs/lock\\.`,
23592352 const hooked = await hook(root, "Write", { file_path: join(root, "a.txt"), content: "two\n" });
Lines 2370–2379 at 100 (were 2377–2386 at 99)
23772370
23782371 it("the mod's check: a lock renewed in the last 2 minutes is held, and so is one it can't read", () => {
2380− assert.equal(lockHeld(JSON.stringify({ pid: 1, time: now - 5_000, what: "sync" }), now), true);
2381− assert.equal(lockHeld(JSON.stringify({ pid: 1, time: now - 100_000, what: "sync" }), now), true);
2373+ assert.equal(lockHeld(JSON.stringify({ pid: 1, time: now - 5_000, what: "pull" }), now), true);
2374+ assert.equal(lockHeld(JSON.stringify({ pid: 1, time: now - 100_000, what: "pull" }), now), true);
2383− lockHeld(JSON.stringify({ pid: 1, time: now - 3 * 60_000, what: "sync" }), now),
Lines 2398–2404 at 100 (were 2405–2411 at 99)
24072400 // A running process's id (this one's), but not renewed for 3 minutes: left behind, as when a pid is reused.
2408− writeFileSync(lock, JSON.stringify({ pid: process.pid, time: Date.now() - 3 * 60_000, what: "sync" }));
2401+ writeFileSync(lock, JSON.stringify({ pid: process.pid, time: Date.now() - 3 * 60_000, what: "pull" }));
Lines 2411–2417 at 100 (were 2418–2424 at 99)
24192412
2421− it("are recorded after init, and a sync brings another agent's change to one", async () => {
Lines 2427–2435 at 100 (were 2434–2442 at 99)
24342427
24362429 assert.deepEqual((await avcs(folders.bob!, "status")).json.unrecorded, ["package-lock.json"]);
2437− const published = await main(["publish", "-m", "lock two"], { cwd: folders.bob!, env: ENV, write: () => {} });
2430+ const published = await main(["push", "-m", "lock two"], { cwd: folders.bob!, env: ENV, write: () => {} });
2439− const synced = await main(["sync"], { cwd: folders.alice!, env: ENV, write: () => {} });
Lines 2453–2461 at 100 (were 2460–2468 at 99)
2463− assert.equal((await run(folders.alice!, "publish", "-m", "check two")).exit, 0);
2465− assert.equal((await run(folders.alice!, "publish", "-m", "and three", "--done")).exit, 0);
24662459
Lines 2480–2486 at 100 (were 2487–2493 at 99)
2490− assert.equal((await run(folders.alice!, "publish", "-m", `p${i}`)).exit, 0);
Lines 2626–2632 at 100 (were 2633–2639 at 99)
26352628
2636− it("waits for a publish and a land as long as the server may work on them, past the base timeout", async () => {
2629+ it("waits for a push and a land as long as the server may work on them, past the base timeout", async () => {
26372630 assert.ok(PUBLISH_TIMEOUT_MS > 120_000, "longer than the server's 2 minutes for one request");
Lines 2662–2669 at 100 (were 2669–2676 at 99)
26692662 it("abso note leaves a note on the lines as your folder shows them, and replies and closing work", async () => {
2672− assert.equal((await run(folders.alice!, "publish", "-m", "two")).exit, 0);
2673− await run(folders.bob!, "sync");
26762669 const noted = await run(folders.bob!, "note", "a.ts:4", "the state isn't checked", "--object");
Lines 2752–2762 at 100 (were 2759–2769 at 99)
2762− for (const name of ["status", "log", "diff", "why", "publish", "check_ignore", "unqueue"])
2766− assert.ok("message" in tools.find((t) => t.name === "publish")!.inputSchema.properties);
27672760
Lines 2768–2777 at 100 (were 2775–2784 at 99)
27762769
2778− name: "publish",
2781− assert.match(published.result.content[0].text, /Published version 1\./);
27822775 const shown = await server.call("tools/call", { name: "show", arguments: { args: ["1"] } });
27832776 assert.match(shown.result.content[0].text, /^version 1 of shared by alice, [0-9 :-]+ UTC: two, through MCP\n/);
27842777 const bad = await server.call("tools/call", { name: "show", arguments: { args: ["nope"] } });
Lines 2784–2800 at 100 (were 2791–2807 at 99)
27922785
2794− assert.deepEqual(argvFor("publish", { message: "why", "as-is": true, check: "", args: [] }), [
2795− "publish",
28002793 assert.deepEqual(argvFor("log", { args: ["-weird.txt"], limit: "3" }), ["log", "--limit=3", "--", "-weird.txt"]);
28012794 // An input can't add a flag of its own: a value stays one entry, and a free word comes after --.
2802− const argv = argvFor("publish", { message: "--server=x", args: ["--server=x"] });
2803− assert.deepEqual(argv, ["publish", "--message=--server=x", "--", "--server=x"]);
2804− const parsed = parseArgs("publish", argv.slice(1), commandTable().publish!.flags);
Lines 2854–2868 at 100 (were 2861–2875 at 99)
28632856
2864− it("publish --done takes the start note back once it is published", async () => {
2868− const r = await main(["publish", "-m", "two", "--done"], { cwd: folders.alice!, env: ENV, write: () => {} });
2861+ const r = await main(["push", "-m", "two", "--done"], { cwd: folders.alice!, env: ENV, write: () => {} });
2872− /\nPublished version 1\.\nYour start note is taken back \(--done\): this work is finished\.\n$/,
Lines 2871–2904 at 100 (were 2878–2911 at 99)
28802873
2881−describe("a publish whose answer is lost (a storage reset after the publish landed)", () => {
2882− it("looks at shared before saying it failed, and never publishes again by itself", async () => {
2886− const landed = await main(["publish", "-m", "lands anyway"], { cwd: folders.alice!, env: ENV, write: () => {} });
2879+ const landed = await main(["push", "-m", "lands anyway"], { cwd: folders.alice!, env: ENV, write: () => {} });
2890− /\nPublished version 1\. The server's answer was lost \(POST \/a\/alice\/publish answered 500: Internal error in Durable Object storage caused object to be reset\.?\), but shared's log shows your publish landed\.\n$/,
2883+ /\nPushed version 1\. The server's answer was lost \(POST \/a\/alice\/publish answered 500: Internal error in Durable Object storage caused object to be reset\.?\), but shared's log shows your push landed\.\n$/,
28922885
2895− const lost = await main(["publish", "-m", "never landed"], { cwd: folders.alice!, env: ENV, write: () => {} });
2888+ const lost = await main(["push", "-m", "never landed"], { cwd: folders.alice!, env: ENV, write: () => {} });
2899− /\nNot published: POST \/a\/alice\/publish answered 500: [^\n]*\. Shared's newest versions and the merge queue don't have it, so it's safe to publish again\.\n$/,
2892+ /\nNot pushed: POST \/a\/alice\/publish answered 500: [^\n]*\. Shared's newest versions and the merge queue don't have it, so it's safe to push again\.\n$/,
2901− assert.equal((await avcs(folders.alice!, "status")).json.version, 1, "nothing was published again by itself");
2894+ assert.equal((await avcs(folders.alice!, "status")).json.version, 1, "nothing was pushed again by itself");
29022895 // The same message as an earlier publish doesn't count when it's an older version: only this attempt's.
2903− assert.equal((await avcs(folders.alice!, "publish", "-m", "never landed")).exit, 0);
29062899
2908− it("tries a connection that never opened once more, and says nothing reached the server and how far publish got", async () => {
2901+ it("tries a connection that never opened once more, and says nothing reached the server and how far push got", async () => {
Lines 2915–2923 at 100 (were 2922–2930 at 99)
29232916 /Can't reach http:\/\/127\.0\.0\.1:\d+: .*Tried twice, the second time IPv4 first; the connection never opened, so nothing reached the server\. Check your connection; abso doctor checks the rest\.\n$/,
2925− const plain = await main(["publish", "-m", "x"], { cwd: folders.alice!, env: ENV, write: () => {} });
2926− assert.match(plain.stderr, /nothing reached the server\. Nothing was published\. Run the same command again\.\n$/);
2927− const checked = await main(["publish", "-m", "x", "--check", "node -e 0"], {
2918+ const plain = await main(["push", "-m", "x"], { cwd: folders.alice!, env: ENV, write: () => {} });
2919+ assert.match(plain.stderr, /nothing reached the server\. Nothing was pushed\. Run the same command again\.\n$/);
Lines 2925–2931 at 100 (were 2932–2938 at 99)
2935− /nothing reached the server\. Nothing was published, and the check didn't run\. Run the same command again\.\n$/,
2928+ /nothing reached the server\. Nothing was pushed, and the check didn't run\. Run the same command again\.\n$/,
Lines 2979–2985 at 100 (were 2986–2992 at 99)
2989− /\nNo abso.json written: package\.json gives no check or build to guess, so CI has nothing to run on each new version\. To give it a check, publish an abso.json like \{"check": "npm test"\}/,
2982+ /\nNo abso.json written: package\.json gives no check or build to guess, so CI has nothing to run on each new version\. To give it a check, push an abso.json like \{"check": "npm test"\}/,
29912984 // --as-is (an import, #58): the folder goes up exactly as it is, with nothing of avcs's own added.
Lines 2995–3001 at 100 (were 3002–3008 at 99)
30042997
3005− it("publish --check alone runs the check in the draft's avcs.json, wherever --check sits", async () => {
2998+ it("push --check alone runs the check in the draft's avcs.json, wherever --check sits", async () => {
30062999 const CHECK = "process.exit(require('fs').readFileSync('state.txt', 'utf8').includes('bad') ? 1 : 0);\n";
Lines 3004–3010 at 100 (were 3011–3017 at 99)
3014− const bad = await main(["publish", "--check", "-m", "breaks it"], {
Lines 3022–3028 at 100 (were 3029–3035 at 99)
3032− const ok = await main(["publish", "-m", "a new check", "--check"], {
Lines 3036–3042 at 100 (were 3043–3049 at 99)
3046− const broken = await main(["publish", "-m", "breaks the build", "--check"], {
Lines 3046–3056 at 100 (were 3053–3063 at 99)
30553048
3056− it("publish --check alone refuses when there is no check to run", async () => {
30583051 assert.equal(existsSync(join(folders.alice!, "avcs.json")), false, "nothing to guess: no avcs.json");
3060− const missing = await main(["publish", "-m", "x", "--check"], {
Lines 3062–3068 at 100 (were 3069–3075 at 99)
30693062 /--check alone runs the project's check, but there is no abso.json\. Set "check" in abso.json/,
3072− const none = await main(["publish", "-m", "x", "--check"], {
Lines 3074–3094 at 100 (were 3081–3101 at 99)
30813074 /--check alone runs the project's check, but avcs\.json has no "check"\. Set "check" in avcs\.json/,
3084− const broken = await main(["publish", "-m", "x", "--check"], {
3091− assert.equal((await avcs(folders.alice!, "status")).json.version, 0, "nothing was published");
30933086
30943087 it("status says whether shared is green or red, log marks shared versions, and abso ci shows a job (#39)", async () => {
3098− assert.equal((await avcs(folders.bob!, "publish", "-m", `step ${n}`)).exit, 0);
31013094 assert.doesNotMatch(plain.stdout, /Shared is|checked|Preview/, "a server without CI adds nothing");
Lines 3230–3238 at 100 (were 3237–3245 at 99)
32373230
3240− assert.equal(parseArgs("publish", ["--check", "npm test", "-m", "x"], spec).flags.get("check"), "npm test");
3241− assert.equal(parseArgs("publish", ["--check", "-m", "x"], spec).flags.get("check"), "");
3242− assert.equal(parseArgs("publish", ["-m", "x", "--check"], spec).flags.get("check"), "");
3233+ assert.equal(parseArgs("push", ["--check", "npm test", "-m", "x"], spec).flags.get("check"), "npm test");
32453238
Lines 3272–3281 at 100 (were 3279–3288 at 99)
32803273
3282− it("a file a script made, which no hook saw, is listed as new at publish", async () => {
32843277 write(folders.alice!, { "a.txt": "a, edited\n", "tests/made-by-a-script.test.ts": "test\n" });
3285− const r = await main(["publish", "-m", "x"], { cwd: folders.alice!, env: ENV, write: () => {} });
3278+ const r = await main(["push", "-m", "x"], { cwd: folders.alice!, env: ENV, write: () => {} });
32873280 assert.match(r.stdout, /^Recorded first: 1 new \(tests\/made-by-a-script\.test\.ts\), 1 changed \(a\.txt\)\.\n/);
Lines 3348–3360 at 100 (were 3355–3367 at 99)
33573350
3358− it("publish --check refuses when the box has no prep and the project has a package-lock", async () => {
3351+ it("push --check refuses when the box has no prep and the project has a package-lock", async () => {
3364− const r = await main(["publish", "-m", "x", "--check", "node ok.cjs"], {
Lines 3363–3373 at 100 (were 3370–3380 at 99)
3373− /Not published: your box has no prep, so the check ran without node_modules and its result can't be trusted\. Run abso prep 'npm ci --ignore-scripts' once/,
3366+ /Not pushed: your box has no prep, so the check ran without node_modules and its result can't be trusted\. Run abso prep 'npm ci --ignore-scripts' once/,
3377− const again = await main(["publish", "-m", "x", "--check", "node ok.cjs"], {
Lines 3376–3386 at 100 (were 3383–3393 at 99)
3386− /Not published: your box has no prep, so a check would run without node_modules .*\(Nothing was run: this folder's last run in that box said it had no prep\.\)/,
3379+ /Not pushed: your box has no prep, so a check would run without node_modules .*\(Nothing was run: this folder's last run in that box said it had no prep\.\)/,
3390− const other = await main(["publish", "-m", "x", "--check", "node ok.cjs", "--box", "b2"], {
Lines 3390–3404 at 100 (were 3397–3411 at 99)
33993392
3400−describe("abso bisect and publish --check (#37)", () => {
34013394 const CHECK = "const t = require('fs').readFileSync('state.txt', 'utf8'); process.exit(t.includes('bad') ? 1 : 0);\n";
34023395
34043397 const { folders } = await project({ "state.txt": "ok 0\n", "check.cjs": CHECK }, "alice", "bob");
3406− await avcs(folders[who]!, "sync");
3408− assert.equal((await avcs(folders[who]!, "publish", "-m", text.trim())).exit, 0);
Lines 3426–3432 at 100 (were 3433–3439 at 99)
34333426 const { folders } = await project({ "state.txt": "ok 0\n", "check.cjs": SKIPPING }, "alice");
3436− assert.equal((await avcs(folders.alice!, "publish", "-m", s)).exit, 0);
Lines 3450–3462 at 100 (were 3457–3469 at 99)
34593452
3460− it("publish --check says when shared moved during the check, and paths the sync didn't write don't block it", async () => {
3453+ it("push --check says when shared moved during the check, and paths the pull didn't write don't block it", async () => {
34623455 const { folders } = await project({ "a.txt": "a\n", "b.txt": "b\n", "wait.cjs": WAIT }, "alice", "bob");
3466− const publishing = main(["publish", "-m", "alice", "--check", "node wait.cjs"], {
Lines 3466–3510 at 100 (were 3473–3517 at 99)
34743467 for (let i = 0; i < 200 && fake.runStarts.length === started; i++) await new Promise((r) => setTimeout(r, 10));
3476− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob meanwhile")).exit, 0);
3479− assert.match(err, /abso: the sync didn't write these: \.\.\/outside\.txt; the check runs without them\./);
3472+ assert.match(err, /abso: the pull didn't write these: \.\.\/outside\.txt; the check runs without them\./);
34803473 assert.match(r.stdout, /\nShared moved during the check: version 1 merged in without being checked\.\n/);
34823475
3483− it("publish --check publishes only when the check passes on the draft with newest shared", async () => {
3476+ it("push --check pushes only when the check passes on the draft with newest shared", async () => {
3486− const refused = await main(["publish", "-m", "breaks it", "--check", "node check.cjs"], {
3493− assert.match(refused.stdout, /Not published: the check failed \(exit 1\)/);
3496− const ok = await main(["publish", "-m", "fine", "--check", "node check.cjs"], {
3503− assert.match(ok.stdout, /Published version 1\./);
35063499
3508− it("sync and diff print the news their record took, --json carries it, a command that records nothing leaves it waiting, and it prints once", async () => {
3501+ it("pull and diff print the news their record took, --json carries it, a command that records nothing leaves it waiting, and it prints once", async () => {
35113504 const say = async (text: string) => assert.equal((await avcs(alice, "announce", text)).exit, 0);
3514− const synced = await main(["sync"], { cwd: bob, env: ENV, write: () => {} });
35173510 /\nNews:\n {2}alice \(as claimed\) told you:\n {4}Ruling: playtest builds come from v40 only\.\n$/,
Lines 3528–3560 at 100 (were 3535–3567 at 99)
35373530
3538−describe("wishlist: publish clarity, who, fix-eol, one-version hint (#37)", () => {
3539− it("an empty publish says shared already has the file and who changed it, not that work vanished", async () => {
3532+ it("an empty push says shared already has the file and who changed it, not that work vanished", async () => {
3542− assert.equal((await avcs(folders.builder2!, "publish", "-m", "Mute audio in look")).exit, 0);
3545− assert.equal((await avcs(folders.artist!, "sync")).exit, 0);
3546− const r = await main(["publish", "-m", "mute"], { cwd: folders.artist!, env: ENV, write: () => {} });
3539+ const r = await main(["push", "-m", "mute"], { cwd: folders.artist!, env: ENV, write: () => {} });
3550− /Nothing published: shared already has the file you changed as you have it, so nothing of yours is lost\. Last changed in tools\/look\.mjs \(version 1, builder2: "Mute audio in look"\)\./,
3543+ /Nothing pushed: shared already has the file you changed as you have it, so nothing of yours is lost\. Last changed in tools\/look\.mjs \(version 1, builder2: "Mute audio in look"\)\./,
35533546
35543547 it("who names the last change, the drafts, and the starting notes for a file", async () => {
3557− assert.equal((await avcs(folders.alice!, "publish", "-m", "alice a1")).exit, 0);
35613554 const r = await main(["who", "a.txt", "b.txt"], { cwd: folders.alice!, env: ENV, write: () => {} });
3564− /^a\.txt:\n {2}last changed in version 1 by alice, .*: alice a1\n {2}bob has unpublished changes at lines 1, last at .*\n {2}bob started "tidy the texts", .*\nb\.txt:\n {2}last changed in version 0 by .*\n {2}nobody has unpublished changes in it\n {2}bob started "tidy the texts"/,
3557+ /^a\.txt:\n {2}last changed in version 1 by alice, .*: alice a1\n {2}bob has unpushed changes at lines 1, last at .*\n {2}bob started "tidy the texts", .*\nb\.txt:\n {2}last changed in version 0 by .*\n {2}nobody has unpushed changes in it\n {2}bob started "tidy the texts"/,
35673560
Lines 3635–3642 at 100 (were 3642–3649 at 99)
3645− assert.equal((await avcs(folders.bob!, "publish", "-m", "a2")).exit, 0);
3646− assert.equal((await avcs(root, "sync")).exit, 0);
Lines 3669–3675 at 100 (were 3676–3682 at 99)
3679− /It is a reader: status, sync, log, show, files and export work, and nothing it does is recorded or published\./,
3672+ /It is a reader: status, pull, log, show, files and export work, and nothing it does is recorded or pushed\./,
36823675 // Edits: the command hook stands down, record and publish refuse here, sync skips its record step.
Lines 3677–3694 at 100 (were 3684–3701 at 99)
3687− assert.match(recorded.stdout + recorded.stderr, /this folder is a reader: it records and publishes nothing/);
3688− assert.equal((await main(["publish", "-m", "x"], { cwd: dir, env: ENV, write: () => {} })).exit, 1);
3680+ assert.match(recorded.stdout + recorded.stderr, /this folder is a reader: it records and pushes nothing/);
3681+ assert.equal((await main(["push", "-m", "x"], { cwd: dir, env: ENV, write: () => {} })).exit, 1);
3690− assert.equal((await avcs(folders.alice!, "publish", "-m", "alice")).exit, 0);
3691− assert.equal((await avcs(dir, "sync")).exit, 0);
3698− /This folder is rep, a reader \(it records and publishes nothing\)/,
Lines 3702–3713 at 100 (were 3709–3720 at 99)
3712− assert.equal((await avcs(dir, "publish", "-m", "rep writes")).exit, 0);
37143707
3715− it("reader on is refused while the agent has unpublished work, and changes nothing here", async () => {
3708+ it("reader on is refused while the agent has unpushed work, and changes nothing here", async () => {
3717− write(folders.alice!, { "a.txt": "a, unpublished\n" });
37193712 const on = await main(["reader", "on"], { cwd: folders.alice!, env: ENV, write: () => {} });
Lines 3771–3782 at 100 (were 3778–3789 at 99)
3781− assert.equal((await avcs(folders[who]!, "publish", "-m", `${who} ${text.trim()}`)).exit, 0);
3782− await avcs(folders[who]!, "sync");
3786− await avcs(folders.alice!, "sync");
Lines 3820–3826 at 100 (were 3827–3833 at 99)
3830− /\nEverything in this folder is recorded\.\nAdded to your draft by an earlier record and deleted since, so they never reach shared; the next record \(sync, publish, run\) takes them out of your draft: _ab\/x\.ts, tools\/_perf\.sh\n/,
3823+ /\nEverything in this folder is recorded\.\nAdded to your draft by an earlier record and deleted since, so they never reach shared; the next record \(pull, push, run\) takes them out of your draft: _ab\/x\.ts, tools\/_perf\.sh\n/,
38333826 assert.deepEqual((await avcs(alice, "diff")).json.files, [], "the next record clears the draft");
Lines 3971–3984 at 100 (were 3978–3991 at 99)
39793972
3981− it("sync and publish drop new ones from the draft and keep them on disk; a file shared has stays", async () => {
3974+ it("pull and push drop new ones from the draft and keep them on disk; a file shared has stays", async () => {
39843977 // What a mod without nested ignore files does: the files reach the draft, then out/.avcsignore says "*".
3988− const synced = await main(["sync"], { cwd: alice, env: ENV, write: () => {} });
39913984 /Dropped from your draft, kept on disk \(your ignore rules leave it out; abso check-ignore says which line\): out\/cards\.mjs\n/,
Lines 3995–4001 at 100 (were 4002–4008 at 99)
4005− const published = await avcs(alice, "publish", "-m", "keep");
Lines 4149–4170 at 100 (were 4156–4177 at 99)
41574150
4159− it('are files: a Write of "" empties a file without deleting it, and sync brings empty files', async () => {
4152+ it('are files: a Write of "" empties a file without deleting it, and pull brings empty files', async () => {
41644157 assert.equal((await avcs(alice, "record")).json.sent, 0, "the hook kept the known copies in step");
4165− assert.equal((await avcs(alice, "publish", "-m", "empty two files")).exit, 0);
41684161
4170− assert.equal((await avcs(bob, "sync")).exit, 0);
4174− assert.equal((await avcs(bob, "publish", "-m", "remove the empty file")).exit, 0);
Lines 4195–4201 at 100 (were 4202–4208 at 99)
42034196
4205− const synced = await avcs(alice, "sync");
42074200 assert.deepEqual(JSON.parse(read(alice, ".avcs/modes.json")), { "run.sh": { exec: true } });
Lines 4211–4217 at 100 (were 4218–4224 at 99)
42194212
4221− assert.equal((await avcs(alice, "sync")).exit, 0);
42234216 assert.equal((await avcs(alice, "record")).json.sent, 0, "the link (or its stand-in) matches what the server has");
Lines 4233–4239 at 100 (were 4240–4246 at 99)
4243− assert.equal((await avcs(alice, "publish", "-m", "point the link at b")).exit, 0);
Lines 4243–4249 at 100 (were 4250–4256 at 99)
4253− assert.equal((await avcs(folders.alice!, "publish", "-m", "add a link")).exit, 0);
Lines 4272–4278 at 100 (were 4279–4285 at 99)
42804273
4282− it("shows unpublished changes line by line, the versions, one version, and a file at a version", async () => {
4275+ it("shows unpushed changes line by line, the versions, one version, and a file at a version", async () => {
42834276 const { folders } = await project({ "a.txt": "one\ntwo\nthree\n", "b.txt": "b\n" }, "alice", "bob");
Lines 4292–4298 at 100 (were 4299–4305 at 99)
4302− /^Your unpublished changes to a\.txt in shared \(on version 0\): 1 file, 1 line added, 1 removed\.\n--- a\/a\.txt/,
4295+ /^Your unpushed changes to a\.txt in shared \(on version 0\): 1 file, 1 line added, 1 removed\.\n--- a\/a\.txt/,
43044297
Lines 4300–4306 at 100 (were 4307–4313 at 99)
4310− /^alice's recorded, unpublished changes to a\.txt in shared \(on version 0\): 1 file, 1 line added, 1 removed\.\n--- a\/a\.txt\n\+\+\+ b\/a\.txt\n@@ -1,3 \+1,3 @@\n one\n-two\n\+TWO\n three/,
4303+ /^alice's recorded, unpushed changes to a\.txt in shared \(on version 0\): 1 file, 1 line added, 1 removed\.\n--- a\/a\.txt\n\+\+\+ b\/a\.txt\n@@ -1,3 \+1,3 @@\n one\n-two\n\+TWO\n three/,
43124305 assert.deepEqual((await avcs(folders.bob!, "diff", "--agent", "alice")).json.files.map((f: any) => f.path).sort(), [
Lines 4308–4314 at 100 (were 4315–4321 at 99)
43174310 (await main(["diff", "--agent", "bob"], { cwd: folders.bob!, env: ENV, write: () => {} })).stdout,
4318− /^bob has no recorded, unpublished changes in shared/,
43204313 const nobody = await main(["diff", "--agent", "carol"], { cwd: folders.bob!, env: ENV, write: () => {} });
Lines 4318–4326 at 100 (were 4325–4333 at 99)
43274320
4328− assert.equal((await avcs(alice, "publish", "-m", "alice: shout two, add c")).exit, 0);
4330− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob: change b")).exit, 0);
43314324
Lines 4371–4377 at 100 (were 4378–4384 at 99)
4381− assert.equal((await avcs(alice, "publish", "-m", "change src and top")).exit, 0);
43824375
43844377 assert.deepEqual(between.json.files.map((f: any) => f.path).sort(), ["src/a.ts", "src/deep/b.ts"]);
Lines 4411–4417 at 100 (were 4418–4424 at 99)
4421− assert.equal((await avcs(alice, "publish", "-m", "exp: a")).exit, 0);
Lines 4457–4466 at 100 (were 4464–4473 at 99)
44654458
44664459describe("renames that change only case", { skip: !caseInsensitiveDisk() && "this disk is case-sensitive" }, () => {
4467− it("records the rename, and a sync brings it in without deleting the file", async () => {
44684461 const { name, folders } = await project({ "a.ts": "one\n", "b.ts": "b\n" }, "alice", "bob");
4470− assert.equal((await avcs(folders.alice!, "publish", "-m", "rename a.ts to A.ts")).exit, 0);
Lines 4468–4493 at 100 (were 4475–4500 at 99)
44774470
4478− const synced = await avcs(folders.bob!, "sync");
4485− assert.equal((await avcs(folders.bob!, "record")).json.sent, 0, "the known copy matches after the sync");
4478+ assert.equal((await avcs(folders.bob!, "record")).json.sent, 0, "the known copy matches after the pull");
44884481
4490− it("abso mv changes a file's case and moves a file, keeping its history, and others sync it in", async () => {
4483+ it("abso mv changes a file's case and moves a file, keeping its history, and others pull it in", async () => {
44914484 const { name, folders } = await project({ "readme.md": "one\ntwo\n", "src/a.ts": "a\n" }, "alice", "bob");
44924485 const run = (cwd: string, ...argv: string[]) => main(argv, { cwd, env: ENV, write: () => {} });
4497− "Moved readme.md to README.md in your draft; its lines keep their history. It reaches shared with your next publish.\n",
4490+ "Moved readme.md to README.md in your draft; its lines keep their history. It reaches shared with your next push.\n",
44994492 assert.ok(readdirSync(folders.alice!).includes("README.md"), readdirSync(folders.alice!).join(", "));
Lines 4498–4508 at 100 (were 4505–4515 at 99)
4508− assert.equal((await avcs(folders.alice!, "publish", "-m", "renames")).exit, 0);
45094502 assert.deepEqual(Object.keys(shared(name)).sort(), [".absoignore", "README.md", "lib/a.ts"]);
4512− assert.equal((await avcs(folders.bob!, "sync")).exit, 0);
45134506 assert.ok(readdirSync(folders.bob!).includes("README.md"), readdirSync(folders.bob!).join(", "));
45154508
Lines 4590–4601 at 100 (were 4597–4608 at 99)
45994592 assert.match(where.stdout, /src\/a\.txt\n {4}alice: lines 2, at shared lines 2; 1 change/);
4600− assert.equal((await avcs(folders.alice!, "publish", "-m", "alice changes two")).exit, 0);
4602− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob changes two")).exit, 2);
4603− await avcs(folders.bob!, "sync");
4605− assert.equal((await avcs(folders.bob!, "publish", "-m", "settle two")).exit, 0);
46064599
Lines 4618–4624 at 100 (were 4625–4631 at 99)
4628− /^Nobody has unpublished changes\. Shared is at version 2\./,
Lines 4667–4673 at 100 (were 4674–4680 at 99)
46744667 assert.equal(gitMarkerLine(mine), undefined, "abso's own blocks are settled with abso settle");
46764669
4677− it("record and publish say so, once, and still send the file", async () => {
46804673 writeFileSync(join(dir, "a.txt"), "a\n<<<<<<< HEAD\nmine\n=======\ntheirs\n>>>>>>> feature\n");
- MCP
- compare on this site's /mcp
- CLI
- abso diff 99 100 client/test/client.test.ts --json
- JSON
- /christopher/abso-core/compare/99..100?file=client%2Ftest%2Fclient.test.ts&format=json