Twenga/twgit

release finish dot not remove always features

Closed this issue · 4 comments

Sometimes when we made twgit release finish, some features are not removed !!!

This appear when the stable branch is not up to date when we finish the release. (for example if we made pull origin we are ahead of 1 commit),

It's not very easy to reproduce this bug, but we have the same bug when we merge demo in release.

Need test set, because I can't reproduce it :-/

This is an old test set you can recycle:

mkdir /tmp/a && cd /tmp/a && git init
mkdir /tmp/b && cd /tmp/b && twgit init 0.0.1 /tmp/a

twgit feature start f2
echo arf > toto
git add .
git commit -am 'add toto'
git push origin feature-f2

twgit feature start f3
echo atchoum > toto
git add .
git commit -am 'add toto'
git push origin feature-f3

twgit demo start d2
twgit demo merge-feature f2
twgit demo merge-feature f3
vi toto
git add toto
git commit -a
git push origin demo-d2

twgit release start
git merge demo-d2
git push origin
twgit release list
twgit release finish

The bug appears if two users use the repository (it's difficult to reproduce with unit test) and one user is not up to date on stable version

User1 : stable version is (v1.0.1)

User2 : (stable version v1.0.5)
User2 : create release
User2 : merge feature into release

User1 : finish release
=> sometimes bug

or second possibility

User1 : git pull origin (so ahead of 1 commit)
User1 : finish release
=> sometimes bug

Two users can simply be simulated with two git directories having one same third as remote. Please see again the above example.

A test set is really required as a lot of unit tests are already covering release finish action…