Update JGit to 0.11.3.113-ga490afe
Change-Id: Ia89bdd8eebddf1bb060edfb4cf6a398a445197a6 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -35,15 +35,15 @@ import com.google.inject.Singleton;
|
|||||||
import org.eclipse.jgit.errors.RepositoryNotFoundException;
|
import org.eclipse.jgit.errors.RepositoryNotFoundException;
|
||||||
import org.eclipse.jgit.http.server.GitServlet;
|
import org.eclipse.jgit.http.server.GitServlet;
|
||||||
import org.eclipse.jgit.http.server.resolver.AsIsFileService;
|
import org.eclipse.jgit.http.server.resolver.AsIsFileService;
|
||||||
import org.eclipse.jgit.http.server.resolver.ReceivePackFactory;
|
|
||||||
import org.eclipse.jgit.http.server.resolver.RepositoryResolver;
|
|
||||||
import org.eclipse.jgit.http.server.resolver.ServiceNotAuthorizedException;
|
|
||||||
import org.eclipse.jgit.http.server.resolver.ServiceNotEnabledException;
|
|
||||||
import org.eclipse.jgit.http.server.resolver.UploadPackFactory;
|
|
||||||
import org.eclipse.jgit.lib.Repository;
|
import org.eclipse.jgit.lib.Repository;
|
||||||
import org.eclipse.jgit.storage.pack.PackConfig;
|
import org.eclipse.jgit.storage.pack.PackConfig;
|
||||||
import org.eclipse.jgit.transport.ReceivePack;
|
import org.eclipse.jgit.transport.ReceivePack;
|
||||||
import org.eclipse.jgit.transport.UploadPack;
|
import org.eclipse.jgit.transport.UploadPack;
|
||||||
|
import org.eclipse.jgit.transport.resolver.ReceivePackFactory;
|
||||||
|
import org.eclipse.jgit.transport.resolver.RepositoryResolver;
|
||||||
|
import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
|
||||||
|
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
|
||||||
|
import org.eclipse.jgit.transport.resolver.UploadPackFactory;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ public class ProjectServlet extends GitServlet {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static class Resolver implements RepositoryResolver {
|
static class Resolver implements RepositoryResolver<HttpServletRequest> {
|
||||||
private final GitRepositoryManager manager;
|
private final GitRepositoryManager manager;
|
||||||
private final ProjectControl.Factory projectControlFactory;
|
private final ProjectControl.Factory projectControlFactory;
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ public class ProjectServlet extends GitServlet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class Upload implements UploadPackFactory {
|
static class Upload implements UploadPackFactory<HttpServletRequest> {
|
||||||
private final Provider<ReviewDb> db;
|
private final Provider<ReviewDb> db;
|
||||||
private final PackConfig packConfig;
|
private final PackConfig packConfig;
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ public class ProjectServlet extends GitServlet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class Receive implements ReceivePackFactory {
|
static class Receive implements ReceivePackFactory<HttpServletRequest> {
|
||||||
private final ReceiveCommits.Factory factory;
|
private final ReceiveCommits.Factory factory;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ class PushOp implements ProjectRunnable {
|
|||||||
if (dst == null || !src.getObjectId().equals(dst.getObjectId())) {
|
if (dst == null || !src.getObjectId().equals(dst.getObjectId())) {
|
||||||
// Doesn't exist yet, or isn't the same value, request to push.
|
// Doesn't exist yet, or isn't the same value, request to push.
|
||||||
//
|
//
|
||||||
send(cmds, spec);
|
send(cmds, spec, src);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -335,8 +335,9 @@ class PushOp implements ProjectRunnable {
|
|||||||
if (spec != null) {
|
if (spec != null) {
|
||||||
// If the ref still exists locally, send it, otherwise delete it.
|
// If the ref still exists locally, send it, otherwise delete it.
|
||||||
//
|
//
|
||||||
if (local.containsKey(src)) {
|
Ref srcRef = local.get(src);
|
||||||
send(cmds, spec);
|
if (srcRef != null) {
|
||||||
|
send(cmds, spec, srcRef);
|
||||||
} else {
|
} else {
|
||||||
delete(cmds, spec);
|
delete(cmds, spec);
|
||||||
}
|
}
|
||||||
@@ -375,9 +376,8 @@ class PushOp implements ProjectRunnable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void send(final List<RemoteRefUpdate> cmds, final RefSpec spec)
|
private void send(final List<RemoteRefUpdate> cmds, final RefSpec spec,
|
||||||
throws IOException {
|
final Ref src) throws IOException {
|
||||||
final String src = spec.getSource();
|
|
||||||
final String dst = spec.getDestination();
|
final String dst = spec.getDestination();
|
||||||
final boolean force = spec.isForceUpdate();
|
final boolean force = spec.isForceUpdate();
|
||||||
cmds.add(new RemoteRefUpdate(db, src, dst, force, null, null));
|
cmds.add(new RemoteRefUpdate(db, src, dst, force, null, null));
|
||||||
@@ -387,7 +387,7 @@ class PushOp implements ProjectRunnable {
|
|||||||
throws IOException {
|
throws IOException {
|
||||||
final String dst = spec.getDestination();
|
final String dst = spec.getDestination();
|
||||||
final boolean force = spec.isForceUpdate();
|
final boolean force = spec.isForceUpdate();
|
||||||
cmds.add(new RemoteRefUpdate(db, null, dst, force, null, null));
|
cmds.add(new RemoteRefUpdate(db, (Ref) null, dst, force, null, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -46,7 +46,7 @@ limitations under the License.
|
|||||||
</issueManagement>
|
</issueManagement>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<jgitVersion>0.10.1.62-gbe38185</jgitVersion>
|
<jgitVersion>0.11.3.113-ga490afe</jgitVersion>
|
||||||
<gwtormVersion>1.1.4</gwtormVersion>
|
<gwtormVersion>1.1.4</gwtormVersion>
|
||||||
<gwtjsonrpcVersion>1.2.3</gwtjsonrpcVersion>
|
<gwtjsonrpcVersion>1.2.3</gwtjsonrpcVersion>
|
||||||
<gwtexpuiVersion>1.2.2</gwtexpuiVersion>
|
<gwtexpuiVersion>1.2.2</gwtexpuiVersion>
|
||||||
|
|||||||
Reference in New Issue
Block a user