@NotNull
  public static String format(@NotNull String path, @Nullable Revision pegRevision) {
    StringBuilder builder = new StringBuilder(path);

    boolean hasAtSymbol = path.contains("@");
    boolean hasPegRevision = pegRevision != null &&
                             !Revision.UNDEFINED.equals(pegRevision) &&
                             !Revision.WORKING.equals(pegRevision) &&
                             pegRevision.isValid();

    if (hasPegRevision || hasAtSymbol) {
      // add '@' to correctly handle paths that contain '@' symbol
      builder.append("@");
    }
    if (hasPegRevision) {
      builder.append(format(pegRevision));
    }

    return builder.toString();
  }
@NotNull
  public static String format(@NotNull String path, @Nullable Revision pegRevision)