private void Process(ObjectId id) { RevObject obj; try { if (id is RevObject) { obj = (RevObject)id; if (obj.has(COMPLETE)) { return; } _revWalk.parseHeaders(obj); } else { obj = _revWalk.parseAny(id); if (obj.has(COMPLETE)) { return; } } } catch (IOException e) { throw new TransportException("Cannot Read " + id.Name, e); } switch (obj.Type) { case Constants.OBJ_BLOB: ProcessBlob(obj); break; case Constants.OBJ_TREE: ProcessTree(obj); break; case Constants.OBJ_COMMIT: ProcessCommit(obj); break; case Constants.OBJ_TAG: ProcessTag(obj); break; default: throw new TransportException("Unknown object type " + id.Name + " (" + obj.Type + ")"); } // If we had any prior errors fetching this object they are // now resolved, as the object was parsed successfully. // _fetchErrors.Remove(id.Copy()); }
private void Process(ObjectId id) { RevObject obj; try { RevObject ro = (id as RevObject); if (ro != null) { obj = ro; if (obj.has(COMPLETE)) { return; } _revWalk.parseHeaders(obj); } else { obj = _revWalk.parseAny(id); if (obj.has(COMPLETE)) { return; } } } catch (IOException e) { throw new TransportException("Cannot Read " + id.Name, e); } obj.DisposeBody(); switch (obj.Type) { case Constants.OBJ_BLOB: ProcessBlob(obj); break; case Constants.OBJ_TREE: ProcessTree(obj); break; case Constants.OBJ_COMMIT: ProcessCommit(obj); break; case Constants.OBJ_TAG: ProcessTag(obj); break; default: throw new TransportException("Unknown object type " + id.Name + " (" + obj.Type + ")"); } _fetchErrors.Remove(id.Copy()); }
private void advertiseTag(RevTag tag, string refName) { RevTag o = (tag as RevTag); do { RevTag target = (o.getObject() as RevTag); try { _walk.parseHeaders(target); } catch (IOException) { return; } target.add(ADVERTISED); o = target; } while (o != null); advertiseAny(tag.getObject(), refName); }
private void advertiseTag(RevTag tag, string refName) { RevObject o = tag; do { // Fully unwrap here so later on we have these already parsed. RevObject target = (((RevTag)o).getObject()); try { _walk.parseHeaders(target); } catch (IOException) { return; } target.add(ADVERTISED); o = target; } while (o is RevTag); advertiseAny(tag.getObject(), refName); }