repoactive 0.3.1.dev2__tar.gz → 0.3.1.dev3__tar.gz

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.
Files changed (25) hide show
  1. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/PKG-INFO +1 -1
  2. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/pyproject.toml +1 -1
  3. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/jj.py +12 -1
  4. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/runner.py +15 -0
  5. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/.gitignore +0 -0
  6. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/LICENSE +0 -0
  7. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/README.md +0 -0
  8. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/__init__.py +0 -0
  9. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/boxquote.py +0 -0
  10. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/cli.py +0 -0
  11. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/config.py +0 -0
  12. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/constants.py +0 -0
  13. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/graph.py +0 -0
  14. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/jobtree.py +0 -0
  15. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/lock.py +0 -0
  16. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/platforms/__init__.py +0 -0
  17. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/platforms/base.py +0 -0
  18. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/platforms/github.py +0 -0
  19. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/platforms/gitlab.py +0 -0
  20. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/progress.py +0 -0
  21. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/selection.py +0 -0
  22. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/settings.py +0 -0
  23. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/trailers.py +0 -0
  24. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/ui.py +0 -0
  25. {repoactive-0.3.1.dev2 → repoactive-0.3.1.dev3}/src/repoactive/updates.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: repoactive
3
- Version: 0.3.1.dev2
3
+ Version: 0.3.1.dev3
4
4
  Summary: Script-driven code changes with automated merge requests
5
5
  License-Expression: GPL-3.0-or-later
6
6
  License-File: LICENSE
@@ -10,7 +10,7 @@ only-include = ["src"]
10
10
 
11
11
  [project]
12
12
  name = "repoactive"
13
- version = "0.3.1.dev2"
13
+ version = "0.3.1.dev3"
14
14
  description = "Script-driven code changes with automated merge requests"
15
15
  readme = "README.md"
16
16
  requires-python = ">=3.11"
@@ -286,10 +286,21 @@ class JJ:
286
286
  return next((b.change_id for b in self.bookmark_list() if b.name == name), None)
287
287
 
288
288
  def rebase_revision(self, revision: str, *onto: str) -> None:
289
- """Rebase a specific revision onto ``onto`` without touching ``@``."""
289
+ """Rebase a specific revision onto ``onto`` without touching ``@``.
290
+
291
+ Uses ``-r``: only ``revision`` moves. Any existing descendant of
292
+ ``revision`` is left behind, refilled onto ``revision``'s old
293
+ parent(s) instead of following it to ``onto`` (jj's own "-r" gap-fill
294
+ behaviour) — use ``rebase_source`` when descendants must follow.
295
+ """
290
296
  onto_args = [arg for parent in onto for arg in ("--onto", parent)]
291
297
  self._run("rebase", "-r", revision, *onto_args)
292
298
 
299
+ def rebase_source(self, revision: str, *onto: str) -> None:
300
+ """Rebase ``revision`` and all its descendants onto ``onto`` without touching ``@``."""
301
+ onto_args = [arg for parent in onto for arg in ("--onto", parent)]
302
+ self._run("rebase", "-s", revision, *onto_args)
303
+
293
304
  def describe_revision(self, revision: str, message: str) -> None:
294
305
  """Set the commit message of a specific revision without touching ``@``."""
295
306
  self._run("describe", "-r", revision, "--message", message)
@@ -1065,6 +1065,21 @@ def _absorb_results(ctx: RunContext) -> None:
1065
1065
  repo.get_description(old_change_id)
1066
1066
  ) != _strip_boxquote_and_trailers(message):
1067
1067
  repo.describe_revision(old_change_id, message)
1068
+ # old_change_id now holds the canonical content (restored above, or
1069
+ # already matching new_change_id). Rebase new_change_id -- and any
1070
+ # of its descendants -- onto it *before* abandoning: a
1071
+ # not-yet-absorbed dependent job in this same run may still be
1072
+ # parented on new_change_id (a stacked phase-1 fresh commit), and
1073
+ # rebase_source's "-s" brings such a descendant along to
1074
+ # old_change_id's content. This is a content no-op for
1075
+ # new_change_id itself (old_change_id's tree already equals it),
1076
+ # so it only redirects where such a descendant lands. Plain "-r"
1077
+ # (rebase_revision) will NOT do: it leaves descendants behind,
1078
+ # refilled onto new_change_id's old parent (canonical_parents) --
1079
+ # exactly the corruption this call prevents. Without this call,
1080
+ # the abandon below has the same "-r"-like gap-fill behaviour,
1081
+ # silently dropping this job's diff from the descendant.
1082
+ repo.rebase_source(new_change_id, old_change_id)
1068
1083
  repo.abandon_revision(new_change_id)
1069
1084
  # No bookmark_set needed: the bookmark follows old_change_id through
1070
1085
  # the rewrites above (jj moves local bookmarks with the commit).
File without changes