diff options
author | Stefan Lay | 2011-04-14 15:33:02 +0000 |
---|---|---|
committer | Matthias Sohn | 2011-04-20 13:41:10 +0000 |
commit | 6c7add7a9a296ea9e1989b89f4a7b11b23ee47a2 (patch) | |
tree | b1270fbf7f3c329bab216cec26932b5904d714a5 /org.eclipse.egit.ui.test | |
parent | c10f9ff2553f475c98e8312d90b01c9a3582725f (diff) | |
download | egit-6c7add7a9a296ea9e1989b89f4a7b11b23ee47a2.tar.gz egit-6c7add7a9a296ea9e1989b89f4a7b11b23ee47a2.tar.xz egit-6c7add7a9a296ea9e1989b89f4a7b11b23ee47a2.zip |
Enhance Change-Id configuration
Replace Change-Id preference by git configuration parameter
"gerrit.createchangeid" to allow for more flexible configuration.
Automatically enable gerrit.createchangeid from Gerrit configuration
page in clone wizard.
Depends on JGit change I22fc46dff6cc5dfd975f6e82161d265781778cde.
Change-Id: I66ef6ac34e1340d473091b4923213b3768d8010c
Signed-off-by: Stefan Lay <stefan.lay@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r-- | org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java index 1061148628..af3af2393d 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java @@ -20,14 +20,13 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.egit.core.op.BranchOperation; import org.eclipse.egit.core.op.TagOperation; -import org.eclipse.egit.ui.Activator; import org.eclipse.egit.ui.JobFamilies; -import org.eclipse.egit.ui.UIPreferences; import org.eclipse.egit.ui.UIText; import org.eclipse.egit.ui.common.LocalRepositoryTestCase; import org.eclipse.egit.ui.test.ContextMenuHelper; import org.eclipse.egit.ui.test.TestUtil; import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.TagBuilder; @@ -117,9 +116,9 @@ public class CommitActionTest extends LocalRepositoryTestCase { @Test public void testAmendWithChangeIdPreferenceOff() throws Exception { - Activator.getDefault() - .getPreferenceStore() - .setValue(UIPreferences.COMMIT_DIALOG_CREATE_CHANGE_ID, true); + Repository repo = lookupRepository(repositoryFile); + repo.getConfig().setBoolean(ConfigConstants.CONFIG_GERRIT_SECTION, + null, ConfigConstants.CONFIG_KEY_CREATECHANGEID, true); setTestFileContent("Another Change"); clickOnCommit(); SWTBotShell commitDialog = bot.shell(UIText.CommitDialog_CommitChanges); @@ -142,9 +141,8 @@ public class CommitActionTest extends LocalRepositoryTestCase { Job.getJobManager().join(JobFamilies.COMMIT, null); clickOnCommit(); - Activator.getDefault() - .getPreferenceStore() - .setValue(UIPreferences.COMMIT_DIALOG_CREATE_CHANGE_ID, false); + repo.getConfig().setBoolean(ConfigConstants.CONFIG_GERRIT_SECTION, + null, ConfigConstants.CONFIG_KEY_CREATECHANGEID, false); bot.shell(UIText.CommitAction_noFilesToCommit).bot().button( IDialogConstants.YES_LABEL).click(); commitDialog = bot.shell(UIText.CommitDialog_CommitChanges); |