Page MenuHomeFreeBSD

Add tools/tools/git/arc-patch
Needs ReviewPublic

Authored by arichardson on Jan 25 2021, 7:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 12 2024, 5:06 AM
Unknown Object (File)
Dec 24 2023, 11:25 PM
Unknown Object (File)
Dec 20 2023, 2:18 AM
Unknown Object (File)
Nov 9 2023, 1:20 PM
Unknown Object (File)
Nov 3 2023, 11:33 AM
Unknown Object (File)
Oct 8 2023, 8:41 PM
Unknown Object (File)
Oct 8 2023, 12:15 PM
Unknown Object (File)
Aug 18 2023, 8:21 AM
Subscribers

Details

Reviewers
markj
jhb
lwhsu
emaste
imp
Group Reviewers
phabric-admin
Summary

This is a thin wrapper around arc patch that attempts to produce
a commit message that more closely resembles the commit template.
This can also be done by patching the phabricator installation (this
has been done e.g. by LLVM), but a separate script seems like the
simpler solution.

Updating the commit message is done by a separate script, arcfilter.sh
which could also be used by git-arc. That script is a copy of
llvm/utils/git/arcfilter.sh in the LLVM repository with a few minor
changes (such as adding tabs after the tags).

Test Plan

seemed to mostly work for my last few commits. It still leaves empty lines between the tags. I'm sure that can be fixed with more sed/awk magic but I'm not very good at either.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37156
Build 34045: arc lint + arc unit

Event Timeline

Can you describe the workflow where this is useful? I use git-arc to generate revisions from git instead of the other way around, which is what this seems to be for. Is it useful to upload patches to phabricator without having an associated git commit?

Can you describe the workflow where this is useful? I use git-arc to generate revisions from git instead of the other way around, which is what this seems to be for. Is it useful to upload patches to phabricator without having an associated git commit?

I generally develop on one machine/git worktree, submit reviews from there using arc diff HEAD^. When reviews are accepted, I tend to apply them to another machine/worktree using arc patch --nobranch DXXXXX, run another build test to check that commits in between haven't broken my patch. Then I use git commit --amend to remove all the unnecessary phabricator tags and replace a few spaces with tabs. This wrapper script allows me to mostly skip the last step.

Can you describe the workflow where this is useful? I use git-arc to generate revisions from git instead of the other way around, which is what this seems to be for. Is it useful to upload patches to phabricator without having an associated git commit?

I generally develop on one machine/git worktree, submit reviews from there using arc diff HEAD^. When reviews are accepted, I tend to apply them to another machine/worktree using arc patch --nobranch DXXXXX, run another build test to check that commits in between haven't broken my patch. Then I use git commit --amend to remove all the unnecessary phabricator tags and replace a few spaces with tabs. This wrapper script allows me to mostly skip the last step.

It might be nice to fold this functionality into git-arc. There is already a "git arc patch" which simply wraps "arc patch"; my vague plan is to extend it to fetch a full chain of patches using the parent/child pointers, so that it's straightforward to fetch an entire patch series if a reviewer wants to test something. OTOH I don't see any problem with simply committing these scripts as-is.

tools/tools/git/arcfilter.sh
10

"Reviewed by:" is also used.

add "Reviewed by" (although I believe phabricator won't add that) and use a single sed command

arichardson edited the summary of this revision. (Show Details)