Skip to content

Conversation

@laanwj
Copy link
Member

@laanwj laanwj commented Feb 2, 2017

Some minor github-merge improvements I've made over time:

User interface:

  • Print merge details again before signing off, to refresh your memory - usually at least I'll have done lots of different things in the shell so this will have scrolled out a long time ago.

  • Require a valid answer on the prompts. One of the requested answers must be typed, if not, the prompt will re-ask. This prevents accidentally rejecting.

Efficiency:

  • Condense "accept merge" and "sign off" prompts. There's no reason to have this as two separate prompts, both are just opportunities to skip out on the merge, no action is performed in between.

Merging:

  • Strip spaces from github title. This avoids redundant spaces surrounding it from getting into the commit message.

@maflcko
Copy link
Member

maflcko commented Feb 2, 2017

This is not a dev script, so it might be better located in the maintainer repo. OTOH, this is probably the most critical maintainer script, so keeping it here to have more eyes watching it is a good thing.

@maflcko
Copy link
Member

maflcko commented Feb 2, 2017

utACK 90f97df regardless.

@fanquake
Copy link
Member

fanquake commented Feb 3, 2017

NACK moving this to another repo.

utACK changes.

@laanwj
Copy link
Member Author

laanwj commented Feb 3, 2017

This is not a dev script, so it might be better located in the maintainer repo. OTOH, this is probably the most critical maintainer script, so keeping it here to have more eyes watching it is a good thing.

Yes I've thought about that. We could have the main development copy in the maintainer-tools repo, and sync it to Bitcoin Core once in a while.

I use the tool with a few different repositories so I have it installed system-wide and hardly ever use the one in the Bitcoin Core tree.

@maflcko
Copy link
Member

maflcko commented Mar 9, 2017

Needs rebase

Copy link
Contributor

@JeremyRubin JeremyRubin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utack 90f97df.

A couple suggestions on further improvements, but those are addressable in another PR if desired.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe a bit nicer with some python3 isms

print('{color_pr}#{pr}{nocolor} {title}{color_pr} into {branch}{nocolor}'.format(color_pr = ATTR_RESET+ATTR_PR, nocolor=ATTR_RESET, **locals()))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, but I didn't change this code in this pull only moved it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be nice to change this to be "type the remote and branch to confirm" so that you are forced to actually read where you're pushing it :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a similar vein, may be good to also add an additional confirm if the branch is prefixed with a +, ie, a force push.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be nice to change this to be "type the remote and branch to confirm" so that you are forced to actually read where you're pushing it :)

Not sure this will help much. I don't think I've ever pushed something to the wrong place with this script after I made it take the target branch from the pull metadata on github.

in a similar vein, may be good to also add an additional confirm if the branch is prefixed with a +, ie, a force push.

We don't support force-pushing from this script, and force pushes to master and all the version branches are disabled on github.

Some minor github-merge improvements I've made over time:

User interface:

- Print merge details again before signing off, to refresh your memory -
  usually I'll have done lots of different things in the shell so this
  will have scrolled out a long time ago.

- Require a valid answer on the prompts. One of the requested answers
  must be typed, if not, the prompt will re-ask. This prevents
  accidentally rejecting.

Efficiency:

- Condense "accept merge" and "sign off" prompts. There's no reason to
  have this as two separate prompts, both are just opportunities to skip
  out on the merge, no action is performed in between.

Merging:

- Strip spaces from github title. This avoids redundant spaces
  surrounding it from getting into the commit message.
@laanwj laanwj force-pushed the 2017_01_ghmerge_update branch from 90f97df to b508424 Compare April 21, 2017 15:01
@laanwj laanwj merged commit b508424 into bitcoin:master Apr 26, 2017
laanwj added a commit that referenced this pull request Apr 26, 2017
b508424 contrib: github-merge improvements (Wladimir J. van der Laan)

Tree-SHA512: 56a34e887716bf6bfcd1b6520f6b9a1bb742e1ad17e75618caf982af71fceb75d50caec1bf4279cb9a2f7a74319f1bcec4c824682841bd6e994acc0991616451
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request May 20, 2019
b508424 contrib: github-merge improvements (Wladimir J. van der Laan)

Tree-SHA512: 56a34e887716bf6bfcd1b6520f6b9a1bb742e1ad17e75618caf982af71fceb75d50caec1bf4279cb9a2f7a74319f1bcec4c824682841bd6e994acc0991616451
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants