private static void reportNonExistentEntry(Change<?> change) { throw new ChangeConflictException("non-existent file/directory: " + change); }
private static void reportNonExistentEntry(Change<?> change) { throw new ChangeConflictException("non-existent file/directory: " + change); }
private static void reportNonExistentEntry(Change<?> change) { throw new ChangeConflictException("non-existent file/directory: " + change); }
private Revision blockingCommit( Revision baseRevision, long commitTimeMillis, Author author, String summary, String detail, Markup markup, Iterable<Change<?>> changes, boolean allowEmptyCommit) { requireNonNull(baseRevision, "baseRevision"); final CommitResult res; rwLock.writeLock().lock(); try { if (closePending.get() != null) { throw closePending.get().get(); } final Revision normBaseRevision = normalizeNow(baseRevision); final Revision headRevision = cachedHeadRevision(); if (headRevision.major() != normBaseRevision.major()) { throw new ChangeConflictException( "invalid baseRevision: " + baseRevision + " (expected: " + headRevision + " or equivalent)"); } res = commit0(headRevision, headRevision.forward(1), commitTimeMillis, author, summary, detail, markup, changes, allowEmptyCommit); this.headRevision = res.revision; } finally { rwLock.writeLock().unlock(); } // Note that the notification is made while no lock is held to avoid the risk of a dead lock. notifyWatchers(res.revision, res.parentTreeId, res.treeId); return res.revision; }
private Revision blockingCommit( Revision baseRevision, long commitTimeMillis, Author author, String summary, String detail, Markup markup, Iterable<Change<?>> changes, boolean allowEmptyCommit) { requireNonNull(baseRevision, "baseRevision"); final CommitResult res; rwLock.writeLock().lock(); try { if (closePending.get() != null) { throw closePending.get().get(); } final Revision normBaseRevision = normalizeNow(baseRevision); final Revision headRevision = cachedHeadRevision(); if (headRevision.major() != normBaseRevision.major()) { throw new ChangeConflictException( "invalid baseRevision: " + baseRevision + " (expected: " + headRevision + " or equivalent)"); } res = commit0(headRevision, headRevision.forward(1), commitTimeMillis, author, summary, detail, markup, changes, allowEmptyCommit); this.headRevision = res.revision; } finally { rwLock.writeLock().unlock(); } // Note that the notification is made while no lock is held to avoid the risk of a dead lock. notifyWatchers(res.revision, res.parentTreeId, res.treeId); return res.revision; }
private Revision blockingCommit( Revision baseRevision, long commitTimeMillis, Author author, String summary, String detail, Markup markup, Iterable<Change<?>> changes, boolean allowEmptyCommit) { requireNonNull(baseRevision, "baseRevision"); final CommitResult res; rwLock.writeLock().lock(); try { if (closePending.get() != null) { throw closePending.get().get(); } final Revision normBaseRevision = normalizeNow(baseRevision); final Revision headRevision = cachedHeadRevision(); if (headRevision.major() != normBaseRevision.major()) { throw new ChangeConflictException( "invalid baseRevision: " + baseRevision + " (expected: " + headRevision + " or equivalent)"); } res = commit0(headRevision, headRevision.forward(1), commitTimeMillis, author, summary, detail, markup, changes, allowEmptyCommit); this.headRevision = res.revision; } finally { rwLock.writeLock().unlock(); } // Note that the notification is made while no lock is held to avoid the risk of a dead lock. notifyWatchers(res.revision, res.parentTreeId, res.treeId); return res.revision; }
throw new ChangeConflictException("target directory exists already: " + change);
throw new ChangeConflictException("target directory exists already: " + change);
throw new ChangeConflictException("target directory exists already: " + change);
break; case REVISION_EXISTS: convertedCause = new ChangeConflictException(message, false); break; case ENTRY_NOT_FOUND: break; case CHANGE_CONFLICT: convertedCause = new ChangeConflictException(message, false); break; case QUERY_FAILURE:
break; case REVISION_EXISTS: convertedCause = new ChangeConflictException(message, false); break; case ENTRY_NOT_FOUND: break; case CHANGE_CONFLICT: convertedCause = new ChangeConflictException(message, false); break; case QUERY_FAILURE:
break; case REVISION_EXISTS: convertedCause = new ChangeConflictException(message, false); break; case ENTRY_NOT_FOUND: break; case CHANGE_CONFLICT: convertedCause = new ChangeConflictException(message, false); break; case QUERY_FAILURE:
throw new ChangeConflictException("a file exists at the target path: " + change); newJsonNode = JsonPatch.fromJson((JsonNode) change.content()).apply(oldJsonNode); } catch (Exception e) { throw new ChangeConflictException("failed to apply JSON patch: " + change, e); throw new ChangeConflictException("failed to apply text patch: " + change, e);
throw new ChangeConflictException("a file exists at the target path: " + change); newJsonNode = JsonPatch.fromJson((JsonNode) change.content()).apply(oldJsonNode); } catch (Exception e) { throw new ChangeConflictException("failed to apply JSON patch: " + change, e); throw new ChangeConflictException("failed to apply text patch: " + change, e);
throw new ChangeConflictException("a file exists at the target path: " + change); newJsonNode = JsonPatch.fromJson((JsonNode) change.content()).apply(oldJsonNode); } catch (Exception e) { throw new ChangeConflictException("failed to apply JSON patch: " + change, e); throw new ChangeConflictException("failed to apply text patch: " + change, e);