Development guidelines

Back to main page

Please read the Development section of official documentation before contributing any code into this project. This wiki page now focuses only on the guidelines regarding submitting issues and related workflow.

Submitting issues

  • For new issues use english language
  • Fill in as many issue meta information as possible
  • Use issue references in Git commits to assign them to appropriate issues

Issue workflow

  • Current workflow requires either email notifications to be turned on, or frequent checking of the Redmine interface.
  • Assignee owns the issue and it is the person, that is currently supposed to work on that.
  • When work of another person is required, change the assignee to that person.
  • When feedback of another person is required, change status to feedback and the assignee to that person.
  • When the issue is resolved, change status to resolved and the assignee to Pavel Kácha.
  • Only the project manager may use statuses closed or rejected.
  • Issue priority has following meaning:
    • low - Things, that are planned for particular version, but can be dealt with at proper time.
    • normal - Things, that are planned for particular version and should be considered every time next work is being planed.
    • high - Without regard to actual issue severity, all issues that are currently really being worked on should have this priority.
    • urgent - This priority should be used for bugs, that are showing on production system and should be resolved quickly (it is worth stopping current work).
    • immediate - Immediate action must be taken, production system is burning and turning into ruins.
  • Issues, that will not be currently worked on and are being put aside for a moment, must be commented enough to enable continuation and moved to version Future.

Development cheat sheet

Usefull Git commands

# Number of commits between two commits/versions:
$ git rev-list --count v2.2.0..v2.3.0
110

# Total changes between two commits/versions:
$ git log --numstat --pretty="%H" v2.2.0..v2.3.0 | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
+16114, -13074

# Total changes in last week:
$ git log --numstat --pretty="%H" --since=1.weeks | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
+5827, -1622

Remove unwanted files from repository

Use case: There are files or directories in the Git repository (either by mistake, or because of some legacy policy), that should definitely not be there.
Resources: link

  1. Make sure your local repository copy is up to date, in case anything goes south
  2. Use different local copy of remote repository to make actual changes

Now execute following commands from within git repository:

# Remove DIRECTORY_NAME from all commits, then remove the refs to the old commits
# (repeat these two commands for as many directories that you want to remove)
git filter-branch --tree-filter 'rm -rf DIRECTORY_NAME' --prune-empty HEAD
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d

# Now make sure this does not happen again
echo DIRECTORY_NAME/ >> .gitignore
git add .gitignore
git commit -m 'Removing DIRECTORY_NAME from git history'

# Clean garbage and rewrite upstream repository
git gc
git push origin master --force

Back to main page