Page MenuHomeFreeBSD

git-mfc: A script to merge commits and find things to merge
Needs ReviewPublic

Authored by imp on May 9 2023, 4:44 PM.
Tags
None
Referenced Files
F82866526: D40022.diff
Fri, May 3, 8:55 AM
Unknown Object (File)
Jan 19 2024, 6:16 AM
Unknown Object (File)
Dec 20 2023, 3:42 AM
Unknown Object (File)
Aug 14 2023, 10:24 PM
Unknown Object (File)
Jun 18 2023, 3:00 PM
Unknown Object (File)
May 9 2023, 4:50 PM

Details

Summary

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 51398
Build 48289: arc lint + arc unit

Event Timeline

imp requested review of this revision.May 9 2023, 4:44 PM
imp created this revision.

Nice!

Running this with no arguments results in an exception that I can't really parse:

git (main) markj@nuc> git mfc
Current branch main

Traceback (most recent call last):
  File "/home/markj/bin/git-mfc", line 343, in <module>
    sys.exit(main())
  File "/home/markj/bin/git-mfc", line 288, in main
    (stable, mfc) = get_branches(current_branch)
  File "/home/markj/bin/git-mfc", line 197, in get_branches
    raise GitError('Cannot determine stable / mfc branches from %s' % current)
__main__.GitError: Cannot determine stable / mfc branches from main
tools/tools/git/git-mfc
28

Hmm, what's the purpose of this? Just having an executable git-mfc in my $PATH is enough for git to treat it like a builtin command. Is there some difference?

185

Missing a docstring? It's not really obvious to me what this function is doing.

212

Should this be commented out?

248

Would it be possible to include some example usages in the epilogue?

322
331
tools/tools/git/git-mfc
18

Which commits are included in "Your MFCs" here?

25

I'm curious about the use of mfcXX (presumably e.g. mfc13) -- why wouldn't these just be staged in your local stable/13?

205

This leaves the author unchanged?

thanks for the suggestions. This is kinda green, but enough folks have asked for it...

tools/tools/git/git-mfc
18

The ones you select on the command line. I'll update this a bit.

25

because I accumulate things in my stable/mfc13 branch and push that to HEAD:stable/13 A weird quirk

28

It's what's typically done in other tools so this doesn't need to be in $PATH.

Also, more importantly, it lets me more easily look for things that aren't in stable/13 yet by keeping it pure... though typing this I'm not 100% that's completely necessary.

185

good idea. It's trying to sort out where these changes will land...

205

Yes. On purpose.

212

likely not. That snuck in because I needed this to be a warning while editing this file within the tree.

248

that's a good idea.

Nice!

Running this with no arguments results in an exception that I can't really parse:

git (main) markj@nuc> git mfc
Current branch main

Yea, that should give a usage, but doesn't.

I've tried using this a bit. What exactly is the purpose of the stable/mfc13 branch - what's wrong with cherry-picking directly into stable/13?

I've tried using this a bit. What exactly is the purpose of the stable/mfc13 branch - what's wrong with cherry-picking directly into stable/13?

I'd thought I'd need a second branch since I usually cherry pick things to the stable/mfc13 branch which I then rebase forward over time and push when it's ready.

I'm not sure, however, that it is required to do that.

In D40022#912070, @imp wrote:

I've tried using this a bit. What exactly is the purpose of the stable/mfc13 branch - what's wrong with cherry-picking directly into stable/13?

I'd thought I'd need a second branch since I usually cherry pick things to the stable/mfc13 branch which I then rebase forward over time and push when it's ready.

I'm not sure, however, that it is required to do that.

It's not required, but it's probably safer to use a separate branch even if that's a bit more work. I was just surprised when I tried using it.

It'd be a bit handier if git-mfc handled rebasing and pushing the branch for you as well.