Skip to content
martyone edited this page Jun 14, 2019 · 8 revisions

Welcome to the sailfish-qtcreator wiki!

Branching / committing policy

Please take care to separate any changes touching upstream code. Keep these in separate commits.

You can learn which code is "our" by comparing master branch to mer-x.y. The mer-x.y branch is basically the upstream x.y branch with our changes to upstream code collected on top of it by the mean of cherry-picking (ch-p) appropriate commits from the master branch.

sailfish/master <--merge-- sailfish/mer-x.y <--merge-- qt/x.y
sailfish/master ---ch-p--> sailfish/mer-x.y ---ch-p--> qt/x.y

New upstream is merged by

  1. reseting the mer-x.y branch to the newer upstream (utilizing the ours strategy of git-merge),
  2. cherry-picking our commits discarded with the reset, resolving possible conflicts and discarding commits which are no more needed
  3. then merging the mer-x.y branch back to master, often using next branch as a staging area.

This way we

  1. keep our changes to upstream code as a minimal patch set x.y..mer-x.y and
  2. avoid conflicts resolution in a single huge merge commit

The following command provides a nice overview of the process.

gitk --simplify-by-decoration sailfish/master ^v4.0.1 ^sdk-1608

The git-lltb tool is able to provide a transformed view of the mer-x.y branch, with the original commits between each pair of consecutive tags represented as patch files added by single commit. This allows to inspect the commits as an evolving patch set. Use either the version from your platform SDK chroot or download the latest version from https://github.com/sailfishos/sdk-setup/blob/master/sdk-setup/src/git-lltb. (In order to use gitk to visualize the transformed history, run the tool outside the SDK chroot.)

git-lltb patch-view --tool gitk mer-x.y qt/master

The following command helps deciding which changes should be cherry-picked to a mer-x.y branch - we aim to minimize the diff:

git diff mer-X.Y..master -- * ':(exclude)'{\
src/plugins/mer,\
doc,\
src/plugins/qmldesigner/jollaplugin,\
share/qtcreator/sfdk,\
share/qtcreator/templates/wizards/sailfishos-qtquick2app,\
share/qtcreator/translations/sfdk_modules_tr.pro,\
dist/gdb,\
src/tools/{merssh,sdktool/*mer*,sfdk},\
tests/manual/mer,\
*.ts\
}
Clone this wiki locally