This is an archive of the discontinued LLVM Phabricator instance.

utils/release: Add merge-git.sh
ClosedPublic

Authored by tstellar on Jun 4 2018, 9:45 PM.

Details

Summary

This script allows you to use git to backport a commit to a stable
branch while generating the exact same commit message (ignoring
whitespace) that you would get from using the merge.sh script with svn.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellar created this revision.Jun 4 2018, 9:45 PM
hans added a subscriber: hans.Jun 4 2018, 11:42 PM

Cool!

utils/release/merge-git.sh
2 ↗(On Diff #149905)

"Test the ..." doesn't really apply, but I see we have it in the old script too :-/

62 ↗(On Diff #149905)

$proj doesn't seem to be used below. Is this assuming the monorepo? Or that the user is in the repository of the project they want to merge to/from?

Maybe the comment on the top of the file could have a short info about the expectations, i.e. where the script expects to be run, how the git repository was set up, etc?

67 ↗(On Diff #149905)

If this first invocation is only to rebuild the map, maybe don't store it into git_hash?

hans edited reviewers, added: hans; removed: hansw.Jun 4 2018, 11:43 PM
hans removed a subscriber: hans.
tstellar updated this revision to Diff 150249.Jun 6 2018, 8:38 PM
tstellar marked an inline comment as done.

Remove unused options and document how to use the script.

hans accepted this revision.Jun 6 2018, 11:39 PM

lgtm, just some comments on the comments

utils/release/merge-git.sh
11 ↗(On Diff #150249)

s/patch/script/ ?

15 ↗(On Diff #150249)

The checkout must be in one of the per-project git repositories, or does this also work in the monorepo?

18 ↗(On Diff #150249)

and 3) git-svn dcommit?

This revision is now accepted and ready to land.Jun 6 2018, 11:39 PM
This revision was automatically updated to reflect the committed changes.
tstellar marked 3 inline comments as done.