Last modified: 2014-04-17 10:36:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65995, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63995 - Provide search operator "is:mergeable" in Gerrit
Provide search operator "is:mergeable" in Gerrit
Status: NEW
Product: Wikimedia
Classification: Unclassified
Git/Gerrit (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-16 11:30 UTC by Tim Landscheidt
Modified: 2014-04-17 10:36 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Landscheidt 2014-04-16 11:30:02 UTC
According to http://stackoverflow.com/questions/23095496/how-to-search-for-changesets-in-gerrit-than-need-to-be-rebased/, Gerrit 2.9 introduces the search operator "is:mergeable" which indicates whether a changeset needs a manual rebase or not.  This would allow for easy searches for "all changesets that I need to rebase".
Comment 1 Tim Landscheidt 2014-04-16 13:01:58 UTC
Until then a short script to determine whether a branch is rebaseable according to Gerrit:

| COMMITID="$(git log -1 --format=format:%B "$1" | sed -ne 's/^Change-Id: //p;')"
| MERGEABLE="$(curl -s "https://gerrit.wikimedia.org/r/changes/$COMMITID" | sed -e 1d | jq '.mergeable')"

| if [ "true" = "$MERGEABLE" ]; then
|     exit 0
| fi

| if [ "false" = "$MERGEABLE" ]; then
|     exit 1
| fi

| echo "Unknown result: $MERGEABLE"
| exit 2

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links