Skip to content

Add --email option to export command for email-style patch formatting#981

Open
VishalGawade1 wants to merge 2 commits into
facebook:mainfrom
VishalGawade1:main
Open

Add --email option to export command for email-style patch formatting#981
VishalGawade1 wants to merge 2 commits into
facebook:mainfrom
VishalGawade1:main

Conversation

@VishalGawade1

Copy link
Copy Markdown

Summary of Changes:
Fixes #318

New Flag: Adds the --email flag to format output with email headers.
Email Headers: Generates headers like From, Date, Subject, and Message-Id for each patch to create an email-style format.
Commit Message and Diff: Includes the full commit message, followed by diffstat and the full diff for each revision.
Default Behavior: If --email is not specified, the command falls back to its standard export functionality without email formatting.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@VishalGawade1 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@williewillus

Copy link
Copy Markdown

Are you sure you didn't commit stuff by mistake? There's 1862 changed files but the functional change is only in one of them.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@VishalGawade1 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@VishalGawade1

Copy link
Copy Markdown
Author

Are you sure you didn't commit stuff by mistake? There's 1862 changed files but the functional change is only in one of them.

Ahh, Apologies for the oversight; I'm not sure how the /venv files ended up getting committed.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@VishalGawade1 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@quark-zju

quark-zju commented Nov 11, 2024

Copy link
Copy Markdown
Contributor

There was a Mercurial "patchbomb" extension: https://wiki.mercurial-scm.org/PatchbombExtension

We deleted it since it has no internal use-cases but it can be re-added. If we backport the code, we can maintain a command-line UI familiar to Mercurial users. What do you think?

@zzl0 zzl0 mentioned this pull request Nov 14, 2024
@VishalGawade1

Copy link
Copy Markdown
Author

Really sorry for being little inactive. Re-adding the 'patchbomb' extension sounds like a good to me. It would provide the email functionality in a way that's familiar to Mercurial users.
I can start looking into backporting the 'patchbomb' extension and see how it can be adapted for Sapling. It might take me a while though but any recommendations on how to proceed would be grateful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants