pmem / issues

Old issues repo for PMDK.
http://pmem.io
13 stars 7 forks source link

check_sdk_version compares with master #1120

Closed kilobyte closed 5 years ago

kilobyte commented 5 years ago

utils/check_sdk_version.py checks the difference between HEAD and master. This worked so far only because this script is a couple of months old, and hasn't yet been on a branch that receives pull requests not targetted at master. But, once we release 1.7...

Thus, it needs to somehow guess what branch we're on. And, a commit that changes master → stable-1.7 won't work well as it'd need to be undone on master, and merging/cherry-picking isn't reliable when such changes go back and forth. Then, someone may want to send a pull request towards a topic branch...

kilobyte commented 5 years ago

Here's an idea: let's check if the HEAD commit is a merge. If it is, we can compare its parents (there will be two unless someone plays with octopus — which is not used within our workflow). Otherwise, we're building an unmerged branch, and in this case we can compare with the last merge.

In other words:

kilobyte commented 5 years ago

As you can see from the messages triggered by a private branch, this works for me.