10 Commits
Author SHA1 Message Date
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 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
Steve Fink b6686114be Bug 1985174 - Give jj.py its own diff_stream() implementation to prevent mach clang-format from trying to reformat every file in the tree when a patch stack contains a conflict. r=ahochheiden
The problem is that a jj change with a conflict is represented as a dummy git patch with a set of empty directories. When `git diff HEAD` processes a branch containing such a commit, it thinks that every file in the repo was changed.

With this patch, things still won't go well if you try to run `mach clang-format` when your patch stack is based on a conflict, but that's a kind of weird thing to do. (It's reasonable to get a conflict, `jj new <conflict>`, fix it, then run `mach clang-format` with the intention of reformatting the fixed tree, which previously broke.)

Differential Revision: https://phabricator.services.mozilla.com/D262707
2025-09-05 17:54:37 +00:00
Steve Fink 995cf85fc2 Bug 1962882 - Rename get_branch_nodes -> get_commits r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D246860
2025-05-19 23:36:27 +00:00
Sandor Molnar 9bdf73c546 Revert "Bug 1962882 - Make mozversioncontrol.repo.Repository into a real abstract base class r=ahal" for causing spider-monkey failures.
This reverts commit 44edde46c2.

Revert "Bug 1962882 - Rename get_branch_nodes -> get_commits r=ahal"

This reverts commit e2766c67f6.
2025-05-17 14:14:27 +00:00
Steve Fink e2766c67f6 Bug 1962882 - Rename get_branch_nodes -> get_commits r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D246860
2025-05-17 13:49:55 +00:00
Mike Hommey 6a29083f11 Bug 1500188 - Change the API to create a try commit. r=releng-reviewers,sheehan,ahal
Currently, the caller potentially prepares files, add them to the VCS,
and then calls the function to create the commit, does whatever it wants
to do with it, then undoes it.

With the ultimate goal of not doing local changes to the work tree to
act on that try commit (for a push), this change in API makes it so
that everything except what do do with the commit is handled by one
function, that now takes paths and file contents for the files that were
previously created by the caller.

Differential Revision: https://phabricator.services.mozilla.com/D214214
2024-06-24 23:07:29 +00:00
Connor Sheehan eee70aada3 Bug 1869733: consider all official remotes when finding base ref and patches r=zeid
A previous patch added parsing `git remote -v`, preferring
`mozilla-unified` as the official upstream remote and falling
back to the first official-looking remote if unified was not
found. We assumed that a developer is either using mozilla-unified,
or is using a single-headed repo like central. This overlooks
the fact that it is possible to clone from central, and then
pull other repos in, creating a repo with multiple official
remotes.

Update the `get_upstream_remote` function to find all official
looking remotes instead of a single official remote, and change
the `get_remote_arg` function to return a list of `--remotes`
arguments to be passed to various Git commands. This allows
Git to take all official remotes into consideration and more
precisely find the commits which are not present on any official
upsteams.

Add a test for `get_mozilla_remote_args` while we are here.

Differential Revision: https://phabricator.services.mozilla.com/D199637
2024-01-25 20:04:09 +00:00
Joel Maher 93a74ef1b8 Bug 1869430 - Batch 19.2 convert python unittest .ini -> .toml. r=gbrown,taskgraph-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D196124
2023-12-12 17:40:03 +00:00