Ejemplo n.º 1
0
 private static void addOldStillExistingTags(
     @NotNull Set<VcsRef> allRefs,
     @NotNull Set<String> currentTags,
     @NotNull Set<VcsRef> previousRefs) {
   for (VcsRef ref : previousRefs) {
     if (!allRefs.contains(ref) && currentTags.contains(ref.getName())) {
       allRefs.add(ref);
     }
   }
 }
  private static void addToGroup(
      final RefGroup refGroup, TreeMap<String, TreeSet<String>> groupToAdd) {
    TreeSet<String> existingGroup = groupToAdd.get(refGroup.getName());

    TreeSet<String> actions = new TreeSet<String>();
    for (VcsRef ref : refGroup.getRefs()) {
      actions.add(ref.getName());
    }

    if (existingGroup == null) {
      groupToAdd.put(refGroup.getName(), actions);
    } else {
      for (String action : actions) {
        existingGroup.add(action);
      }
    }
  }
Ejemplo n.º 3
0
 @Override
 public boolean equals(@NotNull VcsRef ref1, @NotNull VcsRef ref2) {
   return ref1.getName().equals(ref2.getName()) && ref1.getType().equals(ref2.getType());
 }
Ejemplo n.º 4
0
 @Override
 public int computeHashCode(@NotNull VcsRef ref) {
   return 31 * ref.getName().hashCode() + ref.getType().hashCode();
 }
Ejemplo n.º 5
0
 @Override
 public String fun(VcsRef ref) {
   return ref.getType() == GitRefManager.TAG ? ref.getName() : null;
 }