private void want(Ref src, RefSpec spec) throws TransportException { final ObjectId newId = src.getObjectId(); if (newId == null) { throw new NullPointerException(MessageFormat.format( JGitText.get().transportProvidedRefWithNoObjectId, src.getName())); } if (spec.getDestination() != null) { final TrackingRefUpdate tru = createUpdate(spec, newId); if (newId.equals(tru.getOldObjectId())) return; localUpdates.add(tru); } askFor.put(newId, src); final FetchHeadRecord fhr = new FetchHeadRecord(); fhr.newValue = newId; fhr.notForMerge = spec.getDestination() != null; fhr.sourceName = src.getName(); fhr.sourceURI = transport.getURI(); fetchHeadUpdates.add(fhr); }
private void addCommits(StyledString styled, String separator) { styled.append('[', StyledString.DECORATIONS_STYLER); styled.append(safeAbbreviate(update.getNewObjectId()), StyledString.DECORATIONS_STYLER); styled.append(separator, StyledString.DECORATIONS_STYLER); styled.append(safeAbbreviate(update.getOldObjectId()), StyledString.DECORATIONS_STYLER); styled.append(']', StyledString.DECORATIONS_STYLER); styled.append(MessageFormat.format( UIText.FetchResultTable_counterCommits, Integer.valueOf(getChildren(this).length)), StyledString.COUNTER_STYLER); }
private void want(Ref src, RefSpec spec) throws TransportException { final ObjectId newId = src.getObjectId(); if (newId == null) { throw new NullPointerException(MessageFormat.format( JGitText.get().transportProvidedRefWithNoObjectId, src.getName())); } if (spec.getDestination() != null) { final TrackingRefUpdate tru = createUpdate(spec, newId); if (newId.equals(tru.getOldObjectId())) return; localUpdates.add(tru); } askFor.put(newId, src); final FetchHeadRecord fhr = new FetchHeadRecord(); fhr.newValue = newId; fhr.notForMerge = spec.getDestination() != null; fhr.sourceName = src.getName(); fhr.sourceURI = transport.getURI(); fetchHeadUpdates.add(fhr); }
private void want(final Ref src, final RefSpec spec) throws TransportException { final ObjectId newId = src.getObjectId(); if (newId == null) { throw new NullPointerException(MessageFormat.format( JGitText.get().transportProvidedRefWithNoObjectId, src.getName())); } if (spec.getDestination() != null) { final TrackingRefUpdate tru = createUpdate(spec, newId); if (newId.equals(tru.getOldObjectId())) return; localUpdates.add(tru); } askFor.put(newId, src); final FetchHeadRecord fhr = new FetchHeadRecord(); fhr.newValue = newId; fhr.notForMerge = spec.getDestination() != null; fhr.sourceName = src.getName(); fhr.sourceURI = transport.getURI(); fetchHeadUpdates.add(fhr); }
ObjectId oldId = tru.getOldObjectId();
final String aOld = safeAbbreviate(reader, u.getOldObjectId()); final String aNew = safeAbbreviate(reader, u.getNewObjectId()); return aOld + "..." + aNew; //$NON-NLS-1$ final String aOld = safeAbbreviate(reader, u.getOldObjectId()); final String aNew = safeAbbreviate(reader, u.getNewObjectId()); return aOld + ".." + aNew; //$NON-NLS-1$
public Object[] getChildren(Object object) { if (children != null) return children; switch (update.getResult()) { case FORCED: case FAST_FORWARD: RevWalk walk = new RevWalk(reader); try { walk.setRetainBody(true); walk.markStart(walk.parseCommit(update.getNewObjectId())); walk.markUninteresting(walk.parseCommit(update .getOldObjectId())); List<RepositoryCommit> commits = new ArrayList<RepositoryCommit>(); for (RevCommit commit : walk) commits.add(new RepositoryCommit(repo, commit)); children = commits.toArray(); break; } catch (IOException e) { Activator.logError( "Error parsing commits from fetch result", e); //$NON-NLS-1$ } finally { walk.release(); } //$FALL-THROUGH$ default: children = super.getChildren(object); } return children; }
for (RemoteRefUpdate refUpdate : pushResult.getRemoteUpdates()) { Status status = refUpdate.getStatus(); ObjectId from = refUpdate.getTrackingRefUpdate() == null || refUpdate.getTrackingRefUpdate().getOldObjectId() == null ? refUpdate.getExpectedOldObjectId() : refUpdate.getTrackingRefUpdate().getOldObjectId(); ObjectId to = refUpdate.getTrackingRefUpdate() == null || refUpdate.getTrackingRefUpdate().getNewObjectId() == null ? refUpdate.getNewObjectId() : refUpdate.getTrackingRefUpdate().getNewObjectId();