aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2011-07-28 11:52:21 (EDT)
committerAndrew Niefer2011-07-28 11:52:21 (EDT)
commit755bc5a1f4ddcdf989a65b06de2fa53a349e922f (patch)
tree111c95a7ee0e918e26c8f84e16917111421e7a3e
parent12c5ed61606591a5f22d827f04da390fab5801da (diff)
downloadegit-pde-755bc5a1f4ddcdf989a65b06de2fa53a349e922f.zip
egit-pde-755bc5a1f4ddcdf989a65b06de2fa53a349e922f.tar.gz
egit-pde-755bc5a1f4ddcdf989a65b06de2fa53a349e922f.tar.bz2
Support project and repo specific fetch override tagsrefs/changes/38/3938/1
-rw-r--r--org.eclipse.egit.fetchfactory/src/org/eclipse/egit/internal/fetchfactory/GITFetchTaskFactory.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/org.eclipse.egit.fetchfactory/src/org/eclipse/egit/internal/fetchfactory/GITFetchTaskFactory.java b/org.eclipse.egit.fetchfactory/src/org/eclipse/egit/internal/fetchfactory/GITFetchTaskFactory.java
index 370e1a8..1a53729 100644
--- a/org.eclipse.egit.fetchfactory/src/org/eclipse/egit/internal/fetchfactory/GITFetchTaskFactory.java
+++ b/org.eclipse.egit.fetchfactory/src/org/eclipse/egit/internal/fetchfactory/GITFetchTaskFactory.java
@@ -436,8 +436,18 @@ public class GITFetchTaskFactory implements IFetchFactory {
// add entries to the entryInfo map here instead of inside the loop
// to avoid contaminating entryInfos
- final String overrideTag = overrideTags != null ? overrideTags
- .getProperty(OVERRIDE_TAG) : null;
+ String overrideTag = null;
+ if (overrideTags != null) {
+ // Check for overrides first for the project, then for the repo, and
+ // finally for Git in general.
+ overrideTag = overrideTags.getProperty((String) entryInfos
+ .get(KEY_ELEMENT_NAME));
+ if (overrideTag == null)
+ overrideTag = overrideTags.getProperty(table.get(KEY_REPO));
+ if (overrideTag == null)
+ overrideTag = overrideTags.getProperty(OVERRIDE_TAG);
+ }
+
entryInfos
.put(IFetchFactory.KEY_ELEMENT_TAG, (overrideTag != null
&& overrideTag.trim().length() != 0 ? overrideTag