Twenga / twgit

Twgit is a free and open source assisting tools for managing features, hotfixes and releases on Git repositories. It provides simple, high-level commands to adopt the branching model describes in our documentation. Supported OS: Debian/Ubuntu Linux, Mac OS X 10.8 (Mountain Lion) or lower.
http://twgit.twenga.com/
Other
111 stars 34 forks source link

Bug on twgit release list #157

Open geoffroy-aubry opened 9 years ago

geoffroy-aubry commented 9 years ago

Thx to Nassima & Mamady for your feedback :-)

Incorrect result of twgit release list when a feature has diverged and only one version is merged into the release.

Data set:

twgit='/path/to/twgit-1.16.0' \
  && cd /tmp && rm -rf /tmp/twgit \
  && mkdir -p /tmp/twgit/parent /tmp/twgit/local1 \
  && cd /tmp/twgit/parent && git init \
  && cd /tmp/twgit/local1 && $twgit init 1.0.0 /tmp/twgit/parent \
  && $twgit release start -I \
  && $twgit feature start 1 \
  && git clone /tmp/twgit/parent /tmp/twgit/local2 \
  && git commit --allow-empty -m "empty1" && git push origin feature-1 \
  && $twgit feature merge-into-release 1 \
  && cd /tmp/twgit/local2 && git checkout feature-1 \
  && $twgit release list \
  && git commit --allow-empty -m "empty2" && git pull --no-edit origin feature-1 && git push origin feature-1 \
  && $twgit release list

Graph projection 1:

image

Graph projection 2:

v1.0.0
   |
---o------->         stable
    \   \
     \   o---C--->   release 1.1.0
      \     /
       o---A---D---> feature-1
        \     /
         B----

Result in C, OK:

$ twgit release list
Release: origin/release-1.1.0 (from v1.0.0) 
commit b84ab30b6a96076438c98823652ec6743ba30ce3
Features:
    - origin/feature-1 [merged] Add twgit init

Result in D, NOT OK:

$ twgit release list
Release: origin/release-1.1.0 (from v1.0.0) 
commit b84ab30b6a96076438c98823652ec6743ba30ce3
Features:
    - No such branch exists.

Expected result in D:

$ twgit release list
Release: origin/release-1.1.0 (from v1.0.0) 
commit b84ab30b6a96076438c98823652ec6743ba30ce3
Features:
    - origin/feature-1 /!\ merged, then in progress.