Skip to content

Commit

Permalink
Merge branch 'release/0.3.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
OpherV committed Apr 4, 2014
2 parents 3572dab + 4375422 commit 639eb67
Show file tree
Hide file tree
Showing 22 changed files with 132 additions and 131 deletions.
4 changes: 2 additions & 2 deletions META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<name>Git Flow Integration</name>
<id>Gitflow</id>
<description>Git Flow Integration</description>
<version>0.3.4</version>
<version>0.3.5</version>
<category>VCS Integration</category>
<vendor url="http://www.opherv.com">Opher Vishnia</vendor>

<depends>com.intellij.modules.vcs</depends>
<depends>Git4Idea</depends>

<idea-version since-build="129" until-build="133.999999"/>
<idea-version since-build="129" until-build="135.999999"/>

<actions>
<action id="Gitflow.InitRepo" class="gitflow.actions.InitRepoAction" text="Initialize Gitflow Repository"></action>
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ The plugin is available via the IntelliJ plugin manager. Just search for "Git Fl

(The plugin requires that you have [Vanilla Git Flow](https://github.com/nvie/gitflow) \ [AVH edition](https://github.com/petervanderdoes/gitflow) installed)

**Mac/Linux users:**

If you're running into issues like getting
`Gitflow is not installed`
or
`git: 'flow' is not a git command. See 'git --help'.`

Please be sure to check out [this thread](https://github.com/OpherV/gitflow4idea/issues/7)


## Caveats

Expand All @@ -47,7 +56,7 @@ I have worked hard on this plugin on my spare time. If you feel it is useful to
## License

This plugin is under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html).
Copyright 2013, Opher Vishnia.
Copyright 2013-2014, Opher Vishnia.


[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/OpherV/gitflow4idea/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
2 changes: 0 additions & 2 deletions src/gitflow/Gitflow.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
*
*
Expand Down
1 change: 0 additions & 1 deletion src/gitflow/GitflowComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.intellij.dvcs.DvcsUtil;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
import com.intellij.openapi.vcs.VcsListener;
import com.intellij.openapi.vcs.VcsRoot;
Expand Down
28 changes: 14 additions & 14 deletions src/gitflow/GitflowConfigUtil.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package gitflow;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.project.Project;
import git4idea.branch.GitBranchUtil;
import git4idea.config.GitConfigUtil;
import git4idea.repo.GitRepository;
import git4idea.util.GitUIUtil;
import gitflow.ui.NotifyUtil;

/**
*
Expand Down Expand Up @@ -35,7 +35,7 @@ public static String getMasterBranch(Project project){
masterBranch = GitConfigUtil.getValue(project, root, BRANCH_MASTER);
}
catch (VcsException e) {
GitUIUtil.notifyError(project,"Config error",null,false,e);
NotifyUtil.notifyError(project, "Config error", e);
}

return masterBranch;
Expand All @@ -50,7 +50,7 @@ public static String getDevelopBranch(Project project){
developBranch = GitConfigUtil.getValue(project, root, BRANCH_DEVELOP);
}
catch (VcsException e) {
GitUIUtil.notifyError(project,"Config error",null,false,e);
NotifyUtil.notifyError(project, "Config error", e);
}

return developBranch;
Expand All @@ -66,7 +66,7 @@ public static String getFeaturePrefix(Project project){
featurePrefix = GitConfigUtil.getValue(project,root,PREFIX_FEATURE);
}
catch (VcsException e) {
GitUIUtil.notifyError(project,"Config error",null,false,e);
NotifyUtil.notifyError(project, "Config error", e);
}
return featurePrefix;
}
Expand All @@ -81,7 +81,7 @@ public static String getReleasePrefix(Project project){
releasePrefix = GitConfigUtil.getValue(project,root,PREFIX_RELEASE);
}
catch (VcsException e) {
GitUIUtil.notifyError(project,"Config error",null,false,e);
NotifyUtil.notifyError(project, "Config error", e);
}
return releasePrefix;
}
Expand All @@ -96,7 +96,7 @@ public static String getHotfixPrefix(Project project){
hotfixPrefix = GitConfigUtil.getValue(project,root,PREFIX_HOTFIX);
}
catch (VcsException e) {
GitUIUtil.notifyError(project,"Config error",null,false,e);
NotifyUtil.notifyError(project, "Config error", e);
}
return hotfixPrefix;
}
Expand Down Expand Up @@ -128,7 +128,7 @@ public static void setMasterBranch(Project project, String branchName)
try {
GitConfigUtil.setValue(project, root, BRANCH_MASTER, branchName);
} catch (VcsException e) {
GitUIUtil.notifyError(project, "Config error", null, false, e);
NotifyUtil.notifyError(project, "Config error", e);
}
}

Expand All @@ -139,7 +139,7 @@ public static void setDevelopBranch(Project project, String branchName) {
try {
GitConfigUtil.setValue(project, root, BRANCH_DEVELOP, branchName);
} catch (VcsException e) {
GitUIUtil.notifyError(project, "Config error", null, false, e);
NotifyUtil.notifyError(project, "Config error", e);
}
}

Expand All @@ -150,7 +150,7 @@ public static void setReleasePrefix(Project project, String prefix) {
try {
GitConfigUtil.setValue(project, root, PREFIX_RELEASE, prefix);
} catch (VcsException e) {
GitUIUtil.notifyError(project, "Config error", null, false, e);
NotifyUtil.notifyError(project, "Config error", e);
}
}

Expand All @@ -161,7 +161,7 @@ public static void setFeaturePrefix(Project project, String prefix) {
try {
GitConfigUtil.setValue(project, root, PREFIX_FEATURE, prefix);
} catch (VcsException e) {
GitUIUtil.notifyError(project, "Config error", null, false, e);
NotifyUtil.notifyError(project, "Config error", e);
}
}

Expand All @@ -172,7 +172,7 @@ public static void setHotfixPrefix(Project project, String prefix) {
try {
GitConfigUtil.setValue(project, root, PREFIX_HOTFIX, prefix);
} catch (VcsException e) {
GitUIUtil.notifyError(project, "Config error", null, false, e);
NotifyUtil.notifyError(project, "Config error", e);
}
}

Expand All @@ -183,7 +183,7 @@ public static void setSupportPrefix(Project project, String prefix) {
try {
GitConfigUtil.setValue(project, root, PREFIX_SUPPORT, prefix);
} catch (VcsException e) {
GitUIUtil.notifyError(project, "Config error", null, false, e);
NotifyUtil.notifyError(project, "Config error", e);
}
}

Expand All @@ -194,7 +194,7 @@ public static void setVersionPrefix(Project project, String prefix) {
try {
GitConfigUtil.setValue(project, root, PREFIX_VERSIONTAG, prefix);
} catch (VcsException e) {
GitUIUtil.notifyError(project, "Config error", null, false, e);
NotifyUtil.notifyError(project, "Config error", e);
}
}
}
3 changes: 2 additions & 1 deletion src/gitflow/GitflowImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@ public GitCommandResult finishRelease(@NotNull GitRepository repository,
else{
h.addParameters("-m");
h.addParameters(tagMessage);
h.addParameters(releaseName);
}

h.addParameters(releaseName);

for (GitLineHandlerListener listener : listeners) {
h.addLineListener(listener);
}
Expand Down
14 changes: 6 additions & 8 deletions src/gitflow/actions/FinishFeatureAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import git4idea.branch.GitBranchUtil;
import git4idea.commands.GitCommandResult;
import git4idea.merge.GitMerger;
import git4idea.util.GitUIUtil;
import gitflow.GitflowConfigUtil;
import gitflow.ui.NotifyUtil;
import org.jetbrains.annotations.NotNull;

public class FinishFeatureAction extends GitflowAction {
Expand Down Expand Up @@ -49,17 +49,15 @@ public void run(@NotNull ProgressIndicator indicator) {
GitCommandResult result = myGitflow.finishFeature(repo,featureName,errorLineHandler);


if (result.success()){
if (result.success()) {
String finishedFeatureMessage = String.format("The feature branch '%s%s' was merged into '%s'", featurePrefix, featureName, developBranch);
GitUIUtil.notifySuccess(myProject, featureName, finishedFeatureMessage);
NotifyUtil.notifySuccess(myProject, featureName, finishedFeatureMessage);
}
else if(errorLineHandler.hasMergeError){

}
else {

GitUIUtil.notifyError(myProject,"Error","Please have a look at the Version Control console for more details");

NotifyUtil.notifyError(myProject, "Error", "Please have a look at the Version Control console for more details");
}

}
Expand Down Expand Up @@ -93,8 +91,8 @@ public void onSuccess() {
try {
gitMerger.mergeCommit(gitMerger.getMergingRoots());
} catch (VcsException e1) {
GitUIUtil.notifyError(myProject,"Error","Error committing merge result");
e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
NotifyUtil.notifyError(myProject, "Error", "Error committing merge result");
e1.printStackTrace();
}

FinishFeatureAction completeFinishFeatureAction = new FinishFeatureAction(featureName);
Expand Down
10 changes: 5 additions & 5 deletions src/gitflow/actions/FinishHotfixAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import com.intellij.openapi.ui.Messages;
import git4idea.branch.GitBranchUtil;
import git4idea.commands.GitCommandResult;
import git4idea.util.GitUIUtil;
import gitflow.GitflowConfigUtil;
import gitflow.GitflowConfigurable;
import gitflow.ui.NotifyUtil;
import org.jetbrains.annotations.NotNull;

public class FinishHotfixAction extends GitflowAction {
Expand Down Expand Up @@ -41,12 +41,12 @@ public void actionPerformed(AnActionEvent e) {
public void run(@NotNull ProgressIndicator indicator) {
GitCommandResult result= myGitflow.finishHotfix(repo, hotfixName, tagMessage, errorLineHandler);

if (result.success()){
if (result.success()) {
String finishedHotfixMessage = String.format("The hotfix branch '%s%s' was merged into '%s' and '%s'", hotfixPrefix, hotfixName, developBranch, masterBranch);
GitUIUtil.notifySuccess(myProject, hotfixName, finishedHotfixMessage);
NotifyUtil.notifySuccess(myProject, hotfixName, finishedHotfixMessage);
}
else{
GitUIUtil.notifyError(myProject,"Error","Please have a look at the Version Control console for more details");
else {
NotifyUtil.notifyError(myProject, "Error", "Please have a look at the Version Control console for more details");
}

repo.update();
Expand Down
10 changes: 5 additions & 5 deletions src/gitflow/actions/FinishReleaseAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import com.intellij.openapi.ui.Messages;
import git4idea.branch.GitBranchUtil;
import git4idea.commands.GitCommandResult;
import git4idea.util.GitUIUtil;
import gitflow.GitflowConfigUtil;
import gitflow.GitflowConfigurable;
import gitflow.ui.NotifyUtil;
import org.jetbrains.annotations.NotNull;

public class FinishReleaseAction extends GitflowAction {
Expand Down Expand Up @@ -57,12 +57,12 @@ public void actionPerformed(AnActionEvent e) {
public void run(@NotNull ProgressIndicator indicator) {
GitCommandResult result = myGitflow.finishRelease(repo, releaseName, tagMessage, errorLineHandler);

if (result.success()){
if (result.success()) {
String finishedReleaseMessage = String.format("The release branch '%s%s' was merged into '%s' and '%s'", featurePrefix, releaseName, developBranch, masterBranch);
GitUIUtil.notifySuccess(myProject, releaseName, finishedReleaseMessage);
NotifyUtil.notifySuccess(myProject, releaseName, finishedReleaseMessage);
}
else{
GitUIUtil.notifyError(myProject,"Error","Please have a look at the Version Control console for more details");
else {
NotifyUtil.notifyError(myProject, "Error", "Please have a look at the Version Control console for more details");
}


Expand Down
22 changes: 3 additions & 19 deletions src/gitflow/actions/GitflowActions.java
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
package gitflow.actions;

import com.intellij.ide.DataManager;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.Task;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vfs.VirtualFileManager;
import git4idea.GitVcs;
import git4idea.branch.GitBranchUtil;
import git4idea.commands.GitCommandResult;
import git4idea.merge.GitMerger;
import git4idea.repo.GitRemote;
import git4idea.repo.GitRepository;
import git4idea.util.GitUIUtil;
import git4idea.validators.GitNewBranchNameValidator;
import gitflow.*;
import gitflow.ui.GitflowBranchChooseDialog;
import gitflow.Gitflow;
import gitflow.GitflowBranchUtil;
import gitflow.GitflowConfigUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.Iterator;

/**
* All actions associated with Gitflow
Expand Down
10 changes: 5 additions & 5 deletions src/gitflow/actions/GitflowErrorsListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import git4idea.util.GitUIUtil;
import gitflow.ui.NotifyUtil;

public class GitflowErrorsListener extends GitflowLineHandler{

Expand All @@ -14,11 +14,11 @@ public class GitflowErrorsListener extends GitflowLineHandler{

@Override
public void onLineAvailable(String line, Key outputType) {
if (line.contains("'flow' is not a git command")){
GitUIUtil.notifyError(myProject, "Error", "Gitflow is not installed");
if (line.contains("'flow' is not a git command")) {
NotifyUtil.notifyError(myProject, "Error", "Gitflow is not installed");
}
if (line.contains("Not a gitflow-enabled repo yet")){
GitUIUtil.notifyError(myProject,"Error","Not a gitflow-enabled repo yet. Please init git flow");
if (line.contains("Not a gitflow-enabled repo yet")) {
NotifyUtil.notifyError(myProject, "Error", "Not a gitflow-enabled repo yet. Please init git flow");
}
if (line.contains("There were merge conflicts")){
hasMergeError=true;
Expand Down
14 changes: 3 additions & 11 deletions src/gitflow/actions/InitRepoAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.Task;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.util.Key;
import git4idea.branch.GitBranchUtil;
import git4idea.commands.GitCommandResult;
import git4idea.repo.GitRepository;
import git4idea.util.GitUIUtil;
import gitflow.GitflowInitOptions;
import gitflow.actions.GitflowAction;
import gitflow.actions.GitflowErrorsListener;
import gitflow.actions.GitflowLineHandler;
import gitflow.ui.GitflowInitOptionsDialog;
import gitflow.ui.NotifyUtil;
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;

public class InitRepoAction extends GitflowAction {

InitRepoAction() {
Expand All @@ -43,9 +35,9 @@ public void run(@NotNull ProgressIndicator indicator) {

if (result.success()) {
String publishedFeatureMessage = String.format("Initialized gitflow repo");
GitUIUtil.notifySuccess(myProject, publishedFeatureMessage, "");
NotifyUtil.notifySuccess(myProject, publishedFeatureMessage, "");
} else {
GitUIUtil.notifyError(myProject, "Error", "Please have a look at the Version Control console for more details");
NotifyUtil.notifyError(myProject, "Error", "Please have a look at the Version Control console for more details");
}

repo.update();
Expand Down
Loading

0 comments on commit 639eb67

Please sign in to comment.