private bool askForIsComplete() { try { ObjectWalk ow = new ObjectWalk(_transport.Local); foreach (ObjectId want in _askFor.Keys) { ow.markStart(ow.parseAny(want)); } foreach (Ref @ref in _transport.Local.getAllRefs().Values) { ow.markUninteresting(ow.parseAny(@ref.ObjectId)); } ow.checkConnectivity(); return true; } catch (MissingObjectException) { return false; } catch (IOException e) { throw new TransportException("Unable to check connectivity.", e); } }
private void checkConnectivity() { ObjectWalk ow = new ObjectWalk(db); foreach (ReceiveCommand cmd in commands) { if (cmd.getResult() != ReceiveCommand.Result.NOT_ATTEMPTED) continue; if (cmd.getType() == ReceiveCommand.Type.DELETE) continue; ow.markStart(ow.parseAny(cmd.getNewId())); } foreach (Ref @ref in refs.Values) ow.markUninteresting(ow.parseAny(@ref.ObjectId)); ow.checkConnectivity(); }