facebook / sapling

A Scalable, User-Friendly Source Control System.
https://sapling-scm.com
GNU General Public License v2.0
6.18k stars 285 forks source link

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

Open VishalGawade1 opened 1 week ago

VishalGawade1 commented 1 week ago

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 commented 1 week ago

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

facebook-github-bot commented 1 week ago

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

facebook-github-bot commented 1 week ago

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

williewillus commented 1 week ago

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 commented 1 week ago

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

facebook-github-bot commented 1 week ago

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

VishalGawade1 commented 1 week ago

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 commented 1 week ago

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

facebook-github-bot commented 1 week ago

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

quark-zju commented 1 week ago

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?

VishalGawade1 commented 1 day ago

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.