141 Commits
Author SHA1 Message Date
Erich Gubler cd0db4cbae Bug 2029030 - refactor(hg): s/-m/--message for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D292527
2026-06-04 15:29:48 +00:00
Erich Gubler 055b54ed27 Bug 2029030 - refactor(hg): s/-a/--all for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291897
2026-06-04 15:29:45 +00:00
Erich Gubler 174ea61b9e Bug 2029030 - refactor(jj): s/-n/--limit for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291896
2026-06-04 15:29:43 +00:00
Erich Gubler 3e7869d813 Bug 2029030 - refactor(jj): s/-m/--message for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291895
2026-06-04 15:29:41 +00:00
Erich Gubler 03e9a48ff5 Bug 2029030 - refactor(jj): s/-r/--revision[s] for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291894
2026-06-04 15:29:38 +00:00
Erich Gubler a80b77cc7a Bug 2029030 - refactor(jj): s/-T/--template for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291893
2026-06-04 15:29:36 +00:00
Atila Butkovits 0f3d277685 Revert "Bug 2029829 - fix(jj): correct broken clean_directory impl. r=sfink" for causing failures at test_push_to_try.py.
This reverts commit 355055f73c.

Revert "Bug 2029030 - refactor(hg): s/-m/--message for clarity r=sfink"

This reverts commit ee6da071d2.

Revert "Bug 2029030 - refactor(hg): s/-a/--all for clarity r=sfink"

This reverts commit bd57f50d99.

Revert "Bug 2029030 - refactor(jj): s/-n/--limit for clarity r=sfink"

This reverts commit b64c2400e0.

Revert "Bug 2029030 - refactor(jj): s/-m/--message for clarity r=sfink"

This reverts commit d4722092f6.

Revert "Bug 2029030 - refactor(jj): s/-r/--revision[s] for clarity r=sfink"

This reverts commit 7fb02f02ef.

Revert "Bug 2029030 - refactor(jj): s/-T/--template for clarity r=sfink"

This reverts commit c9c6498fdf.
2026-06-04 13:57:49 +00:00
Erich Gubler ee6da071d2 Bug 2029030 - refactor(hg): s/-m/--message for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D292527
2026-06-04 13:38:23 +00:00
Erich Gubler bd57f50d99 Bug 2029030 - refactor(hg): s/-a/--all for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291897
2026-06-04 13:38:20 +00:00
Erich Gubler b64c2400e0 Bug 2029030 - refactor(jj): s/-n/--limit for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291896
2026-06-04 13:38:18 +00:00
Erich Gubler d4722092f6 Bug 2029030 - refactor(jj): s/-m/--message for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291895
2026-06-04 13:38:16 +00:00
Erich Gubler 7fb02f02ef Bug 2029030 - refactor(jj): s/-r/--revision[s] for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291894
2026-06-04 13:38:14 +00:00
Erich Gubler c9c6498fdf Bug 2029030 - refactor(jj): s/-T/--template for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291893
2026-06-04 13:38:12 +00:00
Andrew Halberstadt 82d8fe66d6 Bug 2042926 - [mozversioncontrol] Adjust branch prefix used when pushing to Git try, r=ahochheiden
We decided to namespace user branches under `user/<username>/`

Differential Revision: https://phabricator.services.mozilla.com/D303074
2026-05-28 23:44:05 +00:00
Andrew Halberstadt 7e845fb55f Bug 2042926 - [mozversioncontrol] Namespace try branches under a <username>/ prefix, r=ahochheiden
With dozens to potentially hundreds of developers all pushing to the
same repo, namespacing branches will help avoid conflicts and gives us a
point of contact if we ever need to find a branch's owner.

Differential Revision: https://phabricator.services.mozilla.com/D302867
2026-05-28 03:23:32 +00:00
Andrew Halberstadt 4c4932b749 Bug 2041426 - [tryselect] Create bookmark if necessary when pushing with jj, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D302086
2026-05-27 21:58:05 +00:00
Andrew Halberstadt 727a3c7fbe Bug 2041426 - [mozversioncontrol] Consolidate try push logic into 'push_to_try' method, r=ahochheiden
This allows consumers like `mach try` to call into a single entrypoint
regardless of which vcs type is being pushed to.

Differential Revision: https://phabricator.services.mozilla.com/D302380
2026-05-27 21:58:02 +00:00
Andrew Halberstadt d318d6be1e Bug 2041426 - [mozversioncontrol] Resolve jj refs to commit ids when dest_branch exists, r=ahochheiden
This way if ref happens to be a change id, it'll be converted to
something Git understands. If it's a bookmark, it's fine to convert it
to a commit sha regardless as the dest_branch was explicitly provided.

Differential Revision: https://phabricator.services.mozilla.com/D302084
2026-05-26 19:34:44 +00:00
Andrew Halberstadt 89cdd810e8 Bug 2041426 - [mozversioncontrol] Use closest remote bookmark when printing list of changes pushed to try with Jujutsu, r=ahochheiden
If you pushed a branch not based on `trunk()`, this would result in many
unrelated commits (possibly hundreds) to your terminal. The new revset
finds the closest remote bookmark and compares off of that.

Differential Revision: https://phabricator.services.mozilla.com/D301888
2026-05-26 19:34:40 +00:00
Andrew Halberstadt 4fab5b98ea Bug 2041432 - Skip mozversioncontrol hg tests when hg is unavailable, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D301887
2026-05-21 21:33:39 +00:00
Andrew Halberstadt 7543e1eb70 Bug 2028208 - [mozversioncontrol] Defer to git implementation for jj push, r=ahochheiden
I really wanted to implement this using native jj commands, but I came
to the conclusion we should just defer to Git for two reasons:

1. Jujutsu decouples safety checks from the actual push operation,
   making it a real pain to use this push function. E.g, you need to
   make sure a bookmark exists, is tracked on the remote. Moving it
   requires `--allow-backwards`. All this needs to happen before push
   time, which doesn't work well with the mozversioncontrol model here.
   It puts all that complexity on the shoulders of the user.

2. For `./mach try` we need to be able to push arbitrary Git refs,
   namely `refs/notes/decision-parameters`. This simply isn't supported by Jujutsu yet,
   which means we'd need to defer to the underlying Git implementation
   anyway.

Initially that's what I did, but after a few frustrating days, I
realized that if I just always deferred to Git, all the annoying pain
points of trying to use my `mach try` prototype with Jujutsu simply went
away.

Differential Revision: https://phabricator.services.mozilla.com/D295618
2026-04-21 19:40:36 +00:00
Andrew Halberstadt 9e3ca3e3aa Bug 2028208 - [mozversioncontrol] Implement add_note for git and jj, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D294178
2026-04-21 19:40:29 +00:00
Andrew Halberstadt 719ae3ef46 Bug 2028208 - [mozversioncontrol] Rename 'head_ref' -> 'head_rev', r=ahochheiden
Currently `vcs.head_ref` is actually the revision for hg and git, but
the change id for jj. This inconsistency makes it tricky to find the
right thing across all three.

In reality, this property is simply wrong for Git and Hg. A ref is not a
revision.

To clear things up, this renames `head_ref` -> `head_rev` (implementing
it for jj). Then adds new implementations for `head_ref` that actually
return a ref. This is basically the same as `vcs.branch` but with a
fallback if no branch or bookmark is active.

Differential Revision: https://phabricator.services.mozilla.com/D294177
2026-04-21 19:40:26 +00:00
Silaghi d6a1a5d3fa Revert "Bug 2029030 - refactor(jj): s/-b/--bookmark for clarity r=sfink" for causing vcs failures at python/mozversioncontrol
This reverts commit dd2036e988.

Revert "Bug 2029030 - refactor(hg): s/-a/--all for clarity r=sfink"

This reverts commit 75acc19ac5.

Revert "Bug 2029030 - refactor(jj): s/-n/--limit for clarity r=sfink"

This reverts commit 439d715e14.

Revert "Bug 2029030 - refactor(jj): s/-m/--message for clarity r=sfink"

This reverts commit 3e7b5c64fc.

Revert "Bug 2029030 - refactor(jj): s/-r/--revision for clarity r=sfink"

This reverts commit 639a2ed9fe.

Revert "Bug 2029030 - refactor(jj): s/-T/--template for clarity r=sfink"

This reverts commit 972c08d340.
2026-04-06 23:26:24 +00:00
Erich Gubler 75acc19ac5 Bug 2029030 - refactor(hg): s/-a/--all for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291897
2026-04-06 23:09:32 +00:00
Erich Gubler 439d715e14 Bug 2029030 - refactor(jj): s/-n/--limit for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291896
2026-04-06 23:09:28 +00:00
Erich Gubler 3e7b5c64fc Bug 2029030 - refactor(jj): s/-m/--message for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291895
2026-04-06 23:09:25 +00:00
Erich Gubler 639a2ed9fe Bug 2029030 - refactor(jj): s/-r/--revision for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291894
2026-04-06 23:09:21 +00:00
Erich Gubler 972c08d340 Bug 2029030 - refactor(jj): s/-T/--template for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291893
2026-04-06 23:09:18 +00:00
Silaghi 52e27e5c6f Revert "Bug 2029030 - refactor(jj): s/-b/--bookmark for clarity r=sfink" for casuing vcs failures at python/mozversioncontrol
This reverts commit 184b695bf5.

Revert "Bug 2029030 - refactor(hg): s/-a/--all for clarity r=sfink"

This reverts commit e2c0f953aa.

Revert "Bug 2029030 - refactor(jj): s/-n/--limit for clarity r=sfink"

This reverts commit 3e422e23aa.

Revert "Bug 2029030 - refactor(jj): s/-m/--message for clarity r=sfink"

This reverts commit f8e55d4f94.

Revert "Bug 2029030 - refactor(jj): s/-r/--revision for clarity r=sfink"

This reverts commit 59a6bf0ea9.

Revert "Bug 2029030 - refactor(jj): s/-T/--template for clarity r=sfink"

This reverts commit d09b99bfcc.
2026-04-06 21:59:47 +00:00
Erich Gubler e2c0f953aa Bug 2029030 - refactor(hg): s/-a/--all for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291897
2026-04-06 21:37:48 +00:00
Erich Gubler 3e422e23aa Bug 2029030 - refactor(jj): s/-n/--limit for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291896
2026-04-06 21:37:44 +00:00
Erich Gubler f8e55d4f94 Bug 2029030 - refactor(jj): s/-m/--message for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291895
2026-04-06 21:37:41 +00:00
Erich Gubler 59a6bf0ea9 Bug 2029030 - refactor(jj): s/-r/--revision for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291894
2026-04-06 21:37:38 +00:00
Erich Gubler d09b99bfcc Bug 2029030 - refactor(jj): s/-T/--template for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D291893
2026-04-06 21:37:34 +00:00
Steve Fink 128c3180fa Bug 2025807 - Use --no-graph in favor of -G r=ErichDonGubler
For backwards compatibility as well as understandability.

Differential Revision: https://phabricator.services.mozilla.com/D291891
2026-04-03 00:16:11 +00:00
Steve Fink a585dfb914 Bug 2025807 - For jj, output the (mutable) changes being pushed to try r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D291350
2026-04-01 21:45:36 +00:00
Steve Fink cce0123b98 Bug 2025807 - Suppress snapshotting output, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D290529
2026-04-01 21:45:34 +00:00
Andrew Halberstadt 3b4e166848 Bug 2021009 - [tryselect] Ensure temporary commit is pushed as well, r=ahochheiden
In Git, we were creating a temporary commit, then pushing the current
branch. But the temporary commit was a detached head and so wasn't
included in the push.

This ensures the temporary commit is included by adding the ability for
`vcs.push` to push a source ref to a separate destination branch.

Differential Revision: https://phabricator.services.mozilla.com/D288981
2026-03-24 06:22:26 +00:00
Andrew Halberstadt fe86045f74 Bug 2024214 - Ensure mach try uses --force when pushing directly to a Git repository, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D288436
2026-03-20 18:49:41 +00:00
Steve Fink 361177a3c4 Bug 2023740 - Stop using jj debug snapshot r=ahochheiden
Instead of switching to `jj util snapshot`, this patch uses `jj log -n0 -T'"snapshot: ...message..."'` so that `jj op log` shows the purpose of the explicit snapshots. That's a personal preference; feel free to disagree.

Differential Revision: https://phabricator.services.mozilla.com/D288092
2026-03-17 00:26:20 +00:00
Andrew Halberstadt f129bf445f Bug 2022653 - [mozversioncontrol] Translate remote url to name in JujutsuRepository.push, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D287214
2026-03-12 22:42:47 +00:00
Andrew Halberstadt 021cb4edd6 Bug 2019074 - [tryselect] Support pushing to configurable try repositories, r=releng-reviewers,bhearsum
Currently there is a single try repo (hg.mozilla.org/try) that is
supported. By default we push commits to Lando, but there's an option to
push directly with VCS (using git-cinnabar if on a Git repo).

But for forks of Firefox, we are planning to setup bespoke try
repositories in Github for those forks specifically.

This means we need to configure try repos on a per project basis. E.g,
`mozilla-firefox/firefox` will have `hg.mozilla.org/try` configured. But
`mozilla/enterprise-firefox`, might have
`github.com/mozilla/enterprise-try` configured.

We also need to avoid using `git-cinnabar` for the latter case, so we'll
be using the newly added `push` API from mozversioncontrol.

Differential Revision: https://phabricator.services.mozilla.com/D285087
2026-03-09 17:47:46 +00:00
Andrew Halberstadt 6708632dc0 Bug 2019074 - [mozversioncontrol] Add new 'get_remote_url' method, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D285086
2026-03-09 17:47:44 +00:00
Andrew Halberstadt df71b4febf Bug 2019074 - [mozversioncontrol] Add new 'repo.push' method, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D285085
2026-03-09 17:47:41 +00:00
Andrew Halberstadt 34e343b374 Bug 2021113 - [ci] Bump Jujutsu toolchain to version 0.38.0, r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D286347
2026-03-05 23:53:44 +00:00
Ben Hearsum 7e56ee8b91 Bug 2008824: add support for separating try push setup/cleanup in mozversioncontrol r=releng-reviewers,firefox-build-system-reviewers,ahal,ahochheiden
Essentially, rework the existing `try_commit` methods to do prep and return a cleanup function, rather than both as a context manager. The original `try_commit` methods remain functionally equivalent, and simply farm work out to the new `prepare_try_push` methods.

This is a necessary refactor to enable measuring prep, push, and clean times separately.

Differential Revision: https://phabricator.services.mozilla.com/D278172
2026-01-16 14:44:44 +00:00
Alex Hochheiden 02333707ab Bug 2006716 - Reformat entire repo with ruff-format (black replacement) r=ahal,sylvestre,linter-reviewers,perftest-reviewers,mozperftest-reviewers,geckoview-reviewers,extension-reviewers,media-playback-reviewers,webrtc-reviewers,releng-reviewers,sessionstore-reviewers,win-reviewers,dom-storage-reviewers,translations-reviewers,omc-reviewers,android-reviewers,home-newtab-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,layout-reviewers,dom-worker-reviewers,geckodriver-reviewers,Sasha,emz,fchasen,sthompson,dholbert,sparky,padenot,emilio,Gijs,mconley,tcampbell,mjf,emcminn,willdurand,gstoll,jgraham,asuth
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D276894
2026-01-08 21:15:53 +00:00
Atila Butkovits ce6aff66e2 Revert "Bug 2006716 - Remove unused default_bindir() from ruff.py r=ahal,linter-reviewers" for causing failures at tp5n-pageset.manifest.
This reverts commit a198379dd7.

Revert "Bug 2006716 - Add `ruff-format` linter r=ahal,linter-reviewers"

This reverts commit 8e2f1e924b.

Revert "Bug 2006716 - Remove `black` linter r=ahal,linter-reviewers"

This reverts commit 857218c417.

Revert "Bug 2006716 - Fix `ruff` linter `stderr` callback broken in D190696 r=ahal,linter-reviewers"

This reverts commit da4a569cfb.

Revert "Bug 2006716 - Update `ruff` to version `0.14.9` and use consistent versions in `lint.txt` and `python-test.txt` r=ahal,linter-reviewers"

This reverts commit 0781186b2e.

Revert "Bug 2006716 - Reformat entire repo with `ruff-format` (`black` replacement) r=ahal,sylvestre,linter-reviewers,perftest-reviewers,mozperftest-reviewers,geckoview-reviewers,extension-reviewers,media-playback-reviewers,webrtc-reviewers,releng-reviewers,sessionstore-reviewers,win-reviewers,dom-storage-reviewers,translations-reviewers,omc-reviewers,android-reviewers,home-newtab-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,layout-reviewers,dom-worker-reviewers,geckodriver-reviewers,Sasha,emz,fchasen,sthompson,dholbert,sparky,padenot,emilio,Gijs,mconley,tcampbell,mjf,emcminn,willdurand,gstoll,jgraham,asuth"

This reverts commit b2b8db2859.
2026-01-07 21:34:31 +00:00
Alex Hochheiden b2b8db2859 Bug 2006716 - Reformat entire repo with ruff-format (black replacement) r=ahal,sylvestre,linter-reviewers,perftest-reviewers,mozperftest-reviewers,geckoview-reviewers,extension-reviewers,media-playback-reviewers,webrtc-reviewers,releng-reviewers,sessionstore-reviewers,win-reviewers,dom-storage-reviewers,translations-reviewers,omc-reviewers,android-reviewers,home-newtab-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,layout-reviewers,dom-worker-reviewers,geckodriver-reviewers,Sasha,emz,fchasen,sthompson,dholbert,sparky,padenot,emilio,Gijs,mconley,tcampbell,mjf,emcminn,willdurand,gstoll,jgraham,asuth
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D276894
2026-01-07 18:08:27 +00:00