add blog entry

This commit is contained in:
2026-08-13 18:53:18 -07:00
parent 4729b974cc
commit c0cbdac8af
9577 changed files with 2301587 additions and 3557 deletions
+24
View File
@@ -108,6 +108,30 @@ class GitRepositoryTests(unittest.TestCase):
result = self.repository.push(state)
self.assertEqual(SYNCED, result.sync_state)
def test_dirty_worktree_publish_commits_and_pushes(self) -> None:
(self.work / "local.txt").write_text("publish me\n", encoding="utf-8")
state = self.repository.refresh()
changes = self.repository.publishing_changes()
self.assertTrue(state.can_publish)
self.assertIn("local.txt", changes)
result = self.repository.publish(state, "Publish local change", changes)
self.assertEqual(SYNCED, result.sync_state)
self.assertEqual("Publish local change", self.git(self.work, "log", "-1", "--format=%s").stdout.strip())
self.assertTrue((self.other / "local.txt").exists() is False)
self.git(self.other, "pull", "--ff-only")
self.assertEqual("publish me\n", (self.other / "local.txt").read_text(encoding="utf-8"))
def test_publish_stops_if_changes_differ_from_confirmation(self) -> None:
(self.work / "first.txt").write_text("first\n", encoding="utf-8")
state = self.repository.refresh()
changes = self.repository.publishing_changes()
(self.work / "second.txt").write_text("second\n", encoding="utf-8")
with self.assertRaisesRegex(GitRepositoryError, "changed after confirmation"):
self.repository.publish(state, "Should not publish", changes)
self.assertEqual("Initial", self.git(self.work, "log", "-1", "--format=%s").stdout.strip())
def test_remote_ahead_and_fast_forward_pull(self) -> None:
self.push_other_commit()
state = self.repository.refresh()
+1 -1
View File
@@ -194,7 +194,7 @@ class ProjectEditorTests(unittest.TestCase):
guidance = corrective_guidance(source)
for phrase in (
"git clone",
"Copy the standalone devlog_editor.py",
"Copy scripts/devlog_editor.py",
"python devlog_editor.py",
"Initialize Devlog",
"Create and save",