@Override protected Result doLink(String target) throws IOException { try { RefData.Builder d = RefData.newBuilder(oldData); clearRefData(d); updateSequence(d); d.setSymref(target); newData = d.build(); boolean r = db.ref().compareAndPut(refKey, oldData, newData); if (r) { getRefDatabase().stored(dstRef.getName(), newData); if (getRef().getStorage() == Ref.Storage.NEW) return Result.NEW; return Result.FORCED; } else { getRefDatabase().clearCache(); return Result.LOCK_FAILURE; } } catch (TimeoutException e) { return Result.IO_FAILURE; } }
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.RefData other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.RefData.getDefaultInstance()) return this; if (other.hasSequence()) { setSequence(other.getSequence()); } if (other.hasSymref()) { setSymref(other.getSymref()); } if (other.hasTarget()) { mergeTarget(other.getTarget()); } if (other.hasIsPeeled()) { setIsPeeled(other.getIsPeeled()); } if (other.hasPeeled()) { mergePeeled(other.getPeeled()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@Override protected Result doLink(String target) throws IOException { try { RefData.Builder d = RefData.newBuilder(oldData); clearRefData(d); updateSequence(d); d.setSymref(target); newData = d.build(); boolean r = db.ref().compareAndPut(refKey, oldData, newData); if (r) { getRefDatabase().stored(dstRef.getName(), newData); if (getRef().getStorage() == Ref.Storage.NEW) return Result.NEW; return Result.FORCED; } else { getRefDatabase().clearCache(); return Result.LOCK_FAILURE; } } catch (TimeoutException e) { return Result.IO_FAILURE; } }
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.RefData other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.RefData.getDefaultInstance()) return this; if (other.hasSequence()) { setSequence(other.getSequence()); } if (other.hasSymref()) { setSymref(other.getSymref()); } if (other.hasTarget()) { mergeTarget(other.getTarget()); } if (other.hasIsPeeled()) { setIsPeeled(other.getIsPeeled()); } if (other.hasPeeled()) { mergePeeled(other.getPeeled()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }