diff --git a/META-INF/plugin.xml b/META-INF/plugin.xml
index 4428e2d..decae61 100644
--- a/META-INF/plugin.xml
+++ b/META-INF/plugin.xml
@@ -2,7 +2,7 @@
Git Flow Integration
Gitflow
Git Flow Integration
- 0.3.7.2
+ 0.3.9
VCS Integration
Opher Vishnia
diff --git a/README.md b/README.md
index 7545d48..32ba425 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Huge shoutout [to Kirill Likhodedov](https://github.com/klikh), who wrote much o
The plugin is available via the IntelliJ plugin manager. Just search for "Git Flow Integration" to get the latest version!
-(The plugin requires that you have [Vanilla Git Flow](https://github.com/nvie/gitflow) \ [AVH edition](https://github.com/petervanderdoes/gitflow) installed)
+(The plugin requires that you have gitflow installed. I *highly* recommend using the [AVH edition](https://github.com/petervanderdoes/gitflow), rather than [Vanilla Git Flow](https://github.com/nvie/gitflow) since the original isn't being maintained anymore)
**Mac/Linux users:**
diff --git a/src/gitflow/GitflowConfigurable.java b/src/gitflow/GitflowConfigurable.java
index 4d8a01d..7a81b6b 100644
--- a/src/gitflow/GitflowConfigurable.java
+++ b/src/gitflow/GitflowConfigurable.java
@@ -15,6 +15,8 @@
*/
public class GitflowConfigurable implements Configurable {
+ public static final String GITFLOW_FEATURE_KEEP_REMOTE = "Gitflow.featureKeepRemote";
+
public static final String GITFLOW_PUSH_ON_FINISH_RELEASE = "Gitflow.pushOnFinishRelease";
public static final String GITFLOW_PUSH_ON_FINISH_HOTFIX = "Gitflow.pushOnFinishHotfix";
public static final String GITFLOW_DONT_TAG_RELEASE = "Gitflow.dontTagRelease";
@@ -36,22 +38,23 @@ public GitflowConfigurable(Project project)
this.project = project;
}
+ /* feature */
+
+ public static boolean featureKeepRemote(Project project) {
+ return PropertiesComponent.getInstance(project).getBoolean(GitflowConfigurable.GITFLOW_FEATURE_KEEP_REMOTE, false);
+ }
+
+ /* release */
+
public static boolean pushOnReleaseFinish(Project project) {
return PropertiesComponent.getInstance(project).getBoolean(GitflowConfigurable.GITFLOW_PUSH_ON_FINISH_RELEASE, false);
}
- public static boolean pushOnHotfixFinish(Project project) {
- return PropertiesComponent.getInstance(project).getBoolean(GitflowConfigurable.GITFLOW_PUSH_ON_FINISH_HOTFIX, false);
- }
public static boolean dontTagRelease(Project project) {
return PropertiesComponent.getInstance(project).getBoolean(GitflowConfigurable.GITFLOW_DONT_TAG_RELEASE, false);
}
- public static boolean dontTagHotfix(Project project) {
- return PropertiesComponent.getInstance(project).getBoolean(GitflowConfigurable.GITFLOW_DONT_TAG_HOTFIX, false);
- }
-
/* finish release custom commit message */
public static boolean useCustomTagCommitMessage(Project project) {
@@ -67,6 +70,17 @@ public static String getCustomTagCommitMessage(Project project) {
}
}
+ /*hotfix*/
+
+ public static boolean pushOnHotfixFinish(Project project) {
+ return PropertiesComponent.getInstance(project).getBoolean(GitflowConfigurable.GITFLOW_PUSH_ON_FINISH_HOTFIX, false);
+ }
+
+ public static boolean dontTagHotfix(Project project) {
+ return PropertiesComponent.getInstance(project).getBoolean(GitflowConfigurable.GITFLOW_DONT_TAG_HOTFIX, false);
+ }
+
+
/* finish hotfix custom commit message */
public static boolean useCustomHotfixTagCommitMessage(Project project) {
return PropertiesComponent.getInstance(project).getBoolean(GitflowConfigurable.GITFLOW_USE_CUSTOM_HOTFIX_TAG_COMMIT_MESSAGE, false);
@@ -103,12 +117,15 @@ public JComponent createComponent() {
@Override
public boolean isModified() {
- return PropertiesComponent.getInstance(project).getBoolean(GITFLOW_PUSH_ON_FINISH_RELEASE, false) != gitflowOptionsForm.isPushOnFinishRelease() ||
- PropertiesComponent.getInstance(project).getBoolean(GITFLOW_PUSH_ON_FINISH_HOTFIX, false) != gitflowOptionsForm.isPushOnFinishHotfix() ||
+ return PropertiesComponent.getInstance(project).getBoolean(GITFLOW_FEATURE_KEEP_REMOTE, false) != gitflowOptionsForm.isFeatureKeepRemote() ||
+
+ PropertiesComponent.getInstance(project).getBoolean(GITFLOW_PUSH_ON_FINISH_RELEASE, false) != gitflowOptionsForm.isPushOnFinishRelease() ||
PropertiesComponent.getInstance(project).getBoolean(GITFLOW_DONT_TAG_RELEASE, false) != gitflowOptionsForm.isDontTagRelease() ||
- PropertiesComponent.getInstance(project).getBoolean(GITFLOW_DONT_TAG_HOTFIX, false) != gitflowOptionsForm.isDontTagHotfix() ||
PropertiesComponent.getInstance(project).getBoolean(GITFLOW_USE_CUSTOM_TAG_COMMIT_MESSAGE, false) != gitflowOptionsForm.isUseCustomTagCommitMessage() ||
PropertiesComponent.getInstance(project).getValue(GITFLOW_CUSTOM_TAG_COMMIT_MESSAGE, DEFAULT_TAG_COMMIT_MESSAGE).equals(gitflowOptionsForm.getCustomTagCommitMessage())==false ||
+
+ PropertiesComponent.getInstance(project).getBoolean(GITFLOW_PUSH_ON_FINISH_HOTFIX, false) != gitflowOptionsForm.isPushOnFinishHotfix() ||
+ PropertiesComponent.getInstance(project).getBoolean(GITFLOW_DONT_TAG_HOTFIX, false) != gitflowOptionsForm.isDontTagHotfix() ||
PropertiesComponent.getInstance(project).getBoolean(GITFLOW_USE_CUSTOM_HOTFIX_TAG_COMMIT_MESSAGE, false) != gitflowOptionsForm.isUseCustomHotfixComitMessage() ||
PropertiesComponent.getInstance(project).getValue(GITFLOW_CUSTOM_HOTFIX_TAG_COMMIT_MESSAGE, DEFAULT_TAG_HOTFIX_COMMIT_MESSAGE).equals(gitflowOptionsForm.getCustomHotfixCommitMessage())==false
;
@@ -116,26 +133,30 @@ public boolean isModified() {
@Override
public void apply() throws ConfigurationException {
+ PropertiesComponent.getInstance(project).setValue(GITFLOW_FEATURE_KEEP_REMOTE, Boolean.toString(gitflowOptionsForm.isFeatureKeepRemote()));
+
PropertiesComponent.getInstance(project).setValue(GITFLOW_PUSH_ON_FINISH_RELEASE, Boolean.toString(gitflowOptionsForm.isPushOnFinishRelease()));
- PropertiesComponent.getInstance(project).setValue(GITFLOW_PUSH_ON_FINISH_HOTFIX, Boolean.toString(gitflowOptionsForm.isPushOnFinishHotfix()));
PropertiesComponent.getInstance(project).setValue(GITFLOW_DONT_TAG_RELEASE, Boolean.toString(gitflowOptionsForm.isDontTagRelease()));
- PropertiesComponent.getInstance(project).setValue(GITFLOW_DONT_TAG_HOTFIX, Boolean.toString(gitflowOptionsForm.isDontTagHotfix()));
PropertiesComponent.getInstance(project).setValue(GITFLOW_USE_CUSTOM_TAG_COMMIT_MESSAGE, Boolean.toString(gitflowOptionsForm.isUseCustomTagCommitMessage()));
PropertiesComponent.getInstance(project).setValue(GITFLOW_CUSTOM_TAG_COMMIT_MESSAGE, gitflowOptionsForm.getCustomTagCommitMessage());
+ PropertiesComponent.getInstance(project).setValue(GITFLOW_PUSH_ON_FINISH_HOTFIX, Boolean.toString(gitflowOptionsForm.isPushOnFinishHotfix()));
+ PropertiesComponent.getInstance(project).setValue(GITFLOW_DONT_TAG_HOTFIX, Boolean.toString(gitflowOptionsForm.isDontTagHotfix()));
PropertiesComponent.getInstance(project).setValue(GITFLOW_USE_CUSTOM_HOTFIX_TAG_COMMIT_MESSAGE, Boolean.toString(gitflowOptionsForm.isUseCustomHotfixComitMessage()));
PropertiesComponent.getInstance(project).setValue(GITFLOW_CUSTOM_HOTFIX_TAG_COMMIT_MESSAGE, gitflowOptionsForm.getCustomHotfixCommitMessage());
}
@Override
public void reset() {
+ gitflowOptionsForm.setFeatureKeepRemote(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_FEATURE_KEEP_REMOTE, false));
+
gitflowOptionsForm.setPushOnFinishRelease(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_PUSH_ON_FINISH_RELEASE, false));
- gitflowOptionsForm.setPushOnFinishHotfix(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_PUSH_ON_FINISH_HOTFIX, false));
gitflowOptionsForm.setDontTagRelease(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_DONT_TAG_RELEASE, false));
- gitflowOptionsForm.setDontTagHotfix(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_DONT_TAG_HOTFIX, false));
gitflowOptionsForm.setUseCustomTagCommitMessage(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_USE_CUSTOM_TAG_COMMIT_MESSAGE, false));
gitflowOptionsForm.setCustomTagCommitMessage(PropertiesComponent.getInstance(project).getValue(GITFLOW_CUSTOM_TAG_COMMIT_MESSAGE,DEFAULT_TAG_COMMIT_MESSAGE));
+ gitflowOptionsForm.setPushOnFinishHotfix(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_PUSH_ON_FINISH_HOTFIX, false));
+ gitflowOptionsForm.setDontTagHotfix(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_DONT_TAG_HOTFIX, false));
gitflowOptionsForm.setUseCustomHotfixCommitMessage(PropertiesComponent.getInstance(project).getBoolean(GITFLOW_USE_CUSTOM_HOTFIX_TAG_COMMIT_MESSAGE, false));
gitflowOptionsForm.setCustomHotfixCommitMessage(PropertiesComponent.getInstance(project).getValue(GITFLOW_CUSTOM_HOTFIX_TAG_COMMIT_MESSAGE,DEFAULT_TAG_HOTFIX_COMMIT_MESSAGE));
}
diff --git a/src/gitflow/GitflowImpl.java b/src/gitflow/GitflowImpl.java
index a34839b..58f8506 100644
--- a/src/gitflow/GitflowImpl.java
+++ b/src/gitflow/GitflowImpl.java
@@ -126,13 +126,18 @@ public GitCommandResult startFeature(@NotNull GitRepository repository,
public GitCommandResult finishFeature(@NotNull GitRepository repository,
@NotNull String featureName,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
h.addParameters("feature");
h.addParameters("finish");
+
+ if (GitflowConfigurable.featureKeepRemote(repository.getProject())) {
+ h.addParameters("--keepremote");
+ }
+
h.addParameters(featureName);
for (GitLineHandlerListener listener : listeners) {
@@ -145,7 +150,7 @@ public GitCommandResult finishFeature(@NotNull GitRepository repository,
public GitCommandResult publishFeature(@NotNull GitRepository repository,
@NotNull String featureName,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
@@ -166,7 +171,7 @@ public GitCommandResult pullFeature(@NotNull GitRepository repository,
@NotNull String featureName,
@NotNull GitRemote remote,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
h.addParameters("feature");
@@ -184,7 +189,7 @@ public GitCommandResult trackFeature(@NotNull GitRepository repository,
@NotNull String featureName,
@NotNull GitRemote remote,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
h.addParameters("feature");
@@ -220,7 +225,7 @@ public GitCommandResult finishRelease(@NotNull GitRepository repository,
@NotNull String releaseName,
@NotNull String tagMessage,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
@@ -250,7 +255,7 @@ public GitCommandResult finishRelease(@NotNull GitRepository repository,
public GitCommandResult publishRelease(@NotNull GitRepository repository,
@NotNull String releaseName,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
@@ -268,7 +273,7 @@ public GitCommandResult publishRelease(@NotNull GitRepository repository,
public GitCommandResult trackRelease(@NotNull GitRepository repository,
@NotNull String releaseName,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
@@ -305,7 +310,7 @@ public GitCommandResult finishHotfix(@NotNull GitRepository repository,
@NotNull String hotfixName,
@NotNull String tagMessage,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
@@ -335,7 +340,7 @@ public GitCommandResult finishHotfix(@NotNull GitRepository repository,
public GitCommandResult publishHotfix(@NotNull GitRepository repository,
@NotNull String hotfixName,
@Nullable GitLineHandlerListener... listeners) {
- final GitLineHandlerPasswordRequestAware h = new GitLineHandlerPasswordRequestAware(repository.getProject(), repository.getRoot(), GitflowCommand());
+ final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitflowCommand());
setUrl(h, repository);
h.setSilent(false);
@@ -350,7 +355,7 @@ public GitCommandResult publishHotfix(@NotNull GitRepository repository,
return run(h);
}
- private void setUrl (GitLineHandlerPasswordRequestAware h, GitRepository repository){
+ private void setUrl (GitLineHandler h, GitRepository repository){
ArrayList remotes = new ArrayList(repository.getRemotes());
//make sure a remote repository is available
diff --git a/src/gitflow/ui/GitflowOptionsForm.form b/src/gitflow/ui/GitflowOptionsForm.form
index 9ef8839..46aa43a 100644
--- a/src/gitflow/ui/GitflowOptionsForm.form
+++ b/src/gitflow/ui/GitflowOptionsForm.form
@@ -1,22 +1,22 @@
diff --git a/src/gitflow/ui/GitflowOptionsForm.java b/src/gitflow/ui/GitflowOptionsForm.java
index cb33206..a4b2c6d 100644
--- a/src/gitflow/ui/GitflowOptionsForm.java
+++ b/src/gitflow/ui/GitflowOptionsForm.java
@@ -9,15 +9,18 @@
* @author Opher Vishnia (opherv@gmail.com)
*/
public class GitflowOptionsForm implements ItemListener {
- private JCheckBox pushOnFinishRelease;
private JPanel contentPane;
- private JCheckBox pushOnFinishHotfix;
+ private JCheckBox featureKeepRemote;
+
+ private JCheckBox pushOnFinishRelease;
private JCheckBox dontTagRelease;
private JCheckBox useCustomTagCommitMessage;
private JTextField customTagCommitMessage;
- private JTextField customHotfixCommitMessage;
- private JCheckBox useCustomHotfixCommitMessage;
+
+ private JCheckBox pushOnFinishHotfix;
private JCheckBox dontTagHotfix;
+ private JCheckBox useCustomHotfixCommitMessage;
+ private JTextField customHotfixCommitMessage;
public JPanel getContentPane() {
dontTagRelease.addItemListener(this);
@@ -83,6 +86,8 @@ else if (source == dontTagHotfix) {
}
+ // getters/setters
+
public boolean isPushOnFinishRelease()
{
return pushOnFinishRelease.isSelected();
@@ -93,23 +98,11 @@ public void setPushOnFinishRelease(boolean selected)
pushOnFinishRelease.setSelected(selected);
}
- public boolean isPushOnFinishHotfix() {
- return pushOnFinishHotfix.isSelected();
- }
-
- public void setPushOnFinishHotfix(boolean selected) {
- pushOnFinishHotfix.setSelected(selected);
- }
-
public boolean isDontTagRelease() { return dontTagRelease.isSelected(); }
- public boolean isDontTagHotfix() { return dontTagHotfix.isSelected(); }
-
- public void setDontTagRelease(boolean selected) {
- dontTagRelease.setSelected(selected);
- }
+ public boolean isFeatureKeepRemote() { return featureKeepRemote.isSelected(); }
- public void setDontTagHotfix(boolean selected) { dontTagHotfix.setSelected(selected); }
+ public void setFeatureKeepRemote(boolean selected) { featureKeepRemote.setSelected(selected); }
/* custom finish release tag commit message */
@@ -130,6 +123,23 @@ public void setCustomTagCommitMessage(String message) {
customTagCommitMessage.setText(message);
}
+
+
+ public boolean isPushOnFinishHotfix() { return pushOnFinishHotfix.isSelected(); }
+
+ public void setPushOnFinishHotfix(boolean selected) { pushOnFinishHotfix.setSelected(selected); }
+
+
+ public boolean isDontTagHotfix() { return dontTagHotfix.isSelected(); }
+
+ public void setDontTagRelease(boolean selected) {
+ dontTagRelease.setSelected(selected);
+ }
+
+ public void setDontTagHotfix(boolean selected) { dontTagHotfix.setSelected(selected); }
+
+
+
/* custom finish hotfix commit message */
public boolean isUseCustomHotfixComitMessage(){