Stop watching the upstream attribute of subscribed manifest
The plugin will no longer update projects that are pegged to a specific
rev/hash with an upstream attribute. Previously, the plugin will update
the snapshot manifest base on the upstream attribute even though the
manifest being monitored is pegged at a specific rev.
Change-Id: I5f36c27671872093b9a8d5c55cb921e17e9c6e83
diff --git a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/ManifestSubscription.java b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/ManifestSubscription.java
index 9cc0a7b..ed72252 100644
--- a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/ManifestSubscription.java
+++ b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/ManifestSubscription.java
@@ -284,9 +284,9 @@
try {
manifest = cManifest.getCanonicalManifest(path);
- VersionedManifests.affixManifest(gitRepoManager, manifest, lookup);
-
watchCanonicalManifest(manifest, store, bp, projectName);
+
+ VersionedManifests.affixManifest(gitRepoManager, manifest, lookup);
//save manifest
//TODO added the m/ to the ref to to work around LOCK_FAILURE error of creating master/bla/bla
//TODO (because default master ref already exists) better solution?
@@ -339,10 +339,8 @@
continue;
}
- // Make sure revision is branch ref w/o refs/heads
String branch = project.getRevision() == null ?
- defaultBranch : (project.getUpstream() != null ?
- project.getUpstream() : project.getRevision());
+ defaultBranch : project.getRevision();
pbKey = new ProjectBranchKey(project.getName(),
Repository.shortenRefName(branch));