OpherV / gitflow4idea

Git Flow Integration plugin for IntelliJ
Apache License 2.0
504 stars 139 forks source link

Unable to finish feature/hotfix branch #218

Closed patric-eberle closed 5 years ago

patric-eberle commented 5 years ago
10:51:45.706: [livique] git -c core.quotepath=false -c log.showSignature=false checkout hotfix/3.4.1 --
Switched to branch 'hotfix/3.4.1'
M   package.json
M   src/core/script-foot.js
M   src/core/script-head.js
M   src/index/style-guide.less
M   src/style.less
M   templates/pages/index.hbs
10:52:01.306: [livique] git -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- src/core/script-foot.js src/core/script-head.js src/index/style-guide.less templates/pages/index.hbs package.json src/style.less
10:52:01.334: [livique] git -c core.quotepath=false -c log.showSignature=false commit -F /private/var/folders/kz/4qqfdq8s0nd3cpy1yf3dymb80000gn/T/git-commit-msg-.txt --
[hotfix/3.4.1 b3ac24a6] Raises version number to 3.4.1.
 6 files changed, 6 insertions(+), 6 deletions(-)
10:52:07.803: [livique] git -c core.quotepath=false -c log.showSignature=false flow hotfix finish -m "Tagging hotfix 3.4.1" 3.4.1
Fatal: Branch 'hotfix/hotfix' does not exist and is required.
  1. Open IntelliJ
  2. Create a new feature or hotfix branch with the plugin menu.
  3. Apply changes and commit/push.
  4. Chose Finish hotfix/feature from plugin menu.

An exception happens.

The feature/hotfix branch is merged to master/development and deleted.

rvdsteege commented 5 years ago

Experiencing the same issue and did some tests with the command.

git -c core.quotepath=false -c log.showSignature=false flow hotfix finish -m "Tagging hotfix 2.1.5" 2.1.5

Fatal: Branch 'hotfix/hotfix' does not exist and is required.

git -c core.quotepath=false -c log.showSignature=false flow hotfix finish -m "Tagging version 2.1.5." 2.1.5

Fatal: Branch 'hotfix/version' does not exist and is required.

✅ empty commit message » git -c core.quotepath=false -c log.showSignature=false flow hotfix finish -m "" 2.1.5

✅ only version number as commit message » git -c core.quotepath=false -c log.showSignature=false flow hotfix finish -m 2.1.5 2.1.5

✅ commit message as last argument » git -c core.quotepath=false -c log.showSignature=false flow hotfix finish 2.1.5 -m "Tagging hotfix 2.1.5"

OpherV commented 5 years ago

@patric-eberle @rvdsteege I'm unable to reproduce on my end.. Is there something special in the branch names or prefixes you're using?

sponsfreixes commented 5 years ago

@OpherV I'm experiencing the same issue and the branch names are something like release/myproject.v1.40.0 or hotfix/myproject.v1.40.3.

patric-eberle commented 5 years ago

@OpherV I just retried it on a new repository, where I first had to enable GitFlow. Then I created a hotfix branch hotfix/3.4.1 from develop. Finishing the branch still results in an error, but the message is a different one:

13:59:55.078: [verstaerker.github.io] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false flow hotfix finish -m "Tagging hotfix hotfix/3.4.1" hotfix/3.4.1
fatal: Not a valid object name hotfix/hotfix^{}
fatal: ambiguous argument 'hotfix/hotfix^{}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'hotfix/hotfix^{}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name hotfix/hotfix^{}
Fatal: The hotfix branch 'hotfix/hotfix' has no common ancestor with branch 'master'
OpherV commented 5 years ago

@patric-eberle you're creating a hotfix from develop? according to gitflow hotfixes are meant to be created from master (which now I realize means there shouldn't be a branch select there). What's the use case?

patric-eberle commented 5 years ago

@OpherV sorry, my fault. Yes, hotfixes should be started from the master. So I retried this but was still not able to finish the hotfix:

16:08:44.232: [verstaerker.github.io] git -c core.quotepath=false -c log.showSignature=false checkout master --
Your branch is up to date with 'origin/master'.
Switched to branch 'master'
16:09:26.316: [verstaerker.github.io] git -c core.quotepath=false -c log.showSignature=false flow hotfix start test master
Switched to a new branch 'hotfix/test'
16:09:40.884: [verstaerker.github.io] git -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- gbssg/index.html
16:09:40.914: [verstaerker.github.io] git -c core.quotepath=false -c log.showSignature=false commit -F /private/var/folders/kz/4qqfdq8s0nd3cpy1yf3dymb80000gn/T/git-commit-msg-.txt --
[hotfix/test b93af17] Changes html language.
 1 file changed, 1 insertion(+), 1 deletion(-)
16:09:48.191: [verstaerker.github.io] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false flow hotfix finish -m "Tagging hotfix test" test
Fatal: Branch 'hotfix/hotfix' does not exist and is required.

Please note, that at the same time there seems to be some issue with initializing and opening an existing project with GitFlow. Maybe this is related?

I'm on Git Flow Integration 0.6.9 and PHPStorm 2019.2 in the meantime.

update failed for ActionGroup: Track Feature (null)[Track Feature]

java.lang.NullPointerException
    at java.base/java.lang.String.contains(String.java:2036)
    at gitflow.GitflowBranchUtil.getRemoteBranchesWithPrefix(GitflowBranchUtil.java:166)
    at gitflow.actions.AbstractTrackAction.isActionAllowedForBranch(AbstractTrackAction.java:31)
    at gitflow.actions.AbstractBranchAction.update(AbstractBranchAction.java:39)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:176)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:378)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$null$1(ActionUpdater.java:78)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:106)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$2(ActionUpdater.java:79)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:364)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:231)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:215)
    at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1609)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:215)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:139)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:131)
    at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:50)
    at com.intellij.ui.popup.ActionStepBuilder.appendActionsFromGroup(ActionStepBuilder.java:112)
    at com.intellij.ui.popup.ActionStepBuilder.buildGroup(ActionStepBuilder.java:69)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.getActionItems(PopupFactoryImpl.java:268)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.createStep(PopupFactoryImpl.java:249)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.<init>(PopupFactoryImpl.java:189)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.<init>(PopupFactoryImpl.java:173)
    at gitflow.ui.GitflowWidget.getPopupStep(GitflowWidget.java:115)
    at com.intellij.openapi.wm.impl.status.IdeStatusBarImpl$MultipleTextValuesPresentationWrapper$1.onClick(IdeStatusBarImpl.java:652)
    at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:59)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6651)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
    at java.desktop/java.awt.Component.processEvent(Component.java:6416)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:873)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:818)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:461)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:460)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
OpherV commented 5 years ago

@patric-eberle I did some refactoring that might have resolved this for now with 0.7.0 so I'm closing. If you still get this, feel free to re-open