/** {@inheritDoc} */ @Override public String toString() { final StringBuilder r = new StringBuilder(); if (isForceUpdate()) r.append('+'); if (getSource() != null) r.append(getSource()); if (getDestination() != null) { r.append(':'); r.append(getDestination()); } return r.toString(); } }
private RefSpec(RefSpec p) { force = p.isForceUpdate(); wildcard = p.isWildcard(); srcName = p.getSource(); dstName = p.getDestination(); allowMismatchedWildcards = p.allowMismatchedWildcards; }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof RefSpec)) return false; final RefSpec b = (RefSpec) obj; if (isForceUpdate() != b.isForceUpdate()) return false; if (isWildcard() != b.isWildcard()) return false; if (!eq(getSource(), b.getSource())) return false; if (!eq(getDestination(), b.getDestination())) return false; return true; }
final boolean forceUpdate = spec.isForceUpdate(); final String localName = findTrackingRefName(destSpec, fetchSpecs); final RefLeaseSpec leaseSpec = leases.get(destSpec);
private TrackingRefUpdate createUpdate(RefSpec spec, ObjectId newId) throws TransportException { Ref ref = localRefs().get(spec.getDestination()); ObjectId oldId = ref != null && ref.getObjectId() != null ? ref.getObjectId() : ObjectId.zeroId(); return new TrackingRefUpdate( spec.isForceUpdate(), spec.getSource(), spec.getDestination(), oldId, newId); }
@Override protected boolean isChecked(final Object element) { return ((RefSpec) element).isForceUpdate(); }
@SuppressWarnings("boxing") @Override protected Object getValue(final Object element) { return ((RefSpec) element).isForceUpdate(); }
private void updateForceUpdateAllButton() { boolean enable = false; for (final RefSpec spec : specs) { if (!isDeleteRefSpec(spec) && !spec.isForceUpdate()) { enable = true; break; } } forceUpdateAllButton.setEnabled(enable); }
public String toString() { final StringBuilder r = new StringBuilder(); if (isForceUpdate()) r.append('+'); if (getSource() != null) r.append(getSource()); if (getDestination() != null) { r.append(':'); r.append(getDestination()); } return r.toString(); } }
@Override public void widgetSelected(SelectionEvent e) { if (getSpec().isForceUpdate() == forceButton.getSelection()) return; setSpec(getSpec().setForceUpdate(forceButton.getSelection())); }
/** {@inheritDoc} */ @Override public String toString() { final StringBuilder r = new StringBuilder(); if (isForceUpdate()) r.append('+'); if (getSource() != null) r.append(getSource()); if (getDestination() != null) { r.append(':'); r.append(getDestination()); } return r.toString(); } }
private void setSpec(RefSpec spec) { setErrorMessage(null); this.spec = spec; String newSourceText = spec.getSource() != null ? spec.getSource() : ""; //$NON-NLS-1$ String newDestinationText = spec.getDestination() != null ? spec .getDestination() : ""; //$NON-NLS-1$ String newStringText = spec.toString(); if (!sourceText.getText().equals(newSourceText)) sourceText.setText(newSourceText); if (!destinationText.getText().equals(newDestinationText)) destinationText.setText(newDestinationText); if (!specString.getText().equals(newStringText)) specString.setText(newStringText); forceButton.setSelection(spec.isForceUpdate()); if (sourceText.getText().length() == 0 || destinationText.getText().length() == 0) setErrorMessage(UIText.RefSpecDialog_MissingDataMessage); getButton(OK).setEnabled( sourceText.getText().length() > 0 && destinationText.getText().length() > 0); }
private RefSpec(final RefSpec p) { force = p.isForceUpdate(); wildcard = p.isWildcard(); srcName = p.getSource(); dstName = p.getDestination(); allowMismatchedWildcards = p.allowMismatchedWildcards; }
private RefSpec(RefSpec p) { force = p.isForceUpdate(); wildcard = p.isWildcard(); srcName = p.getSource(); dstName = p.getDestination(); allowMismatchedWildcards = p.allowMismatchedWildcards; }
public boolean equals(final Object obj) { if (!(obj instanceof RefSpec)) return false; final RefSpec b = (RefSpec) obj; if (isForceUpdate() != b.isForceUpdate()) return false; if (isWildcard() != b.isWildcard()) return false; if (!eq(getSource(), b.getSource())) return false; if (!eq(getDestination(), b.getDestination())) return false; return true; }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof RefSpec)) return false; final RefSpec b = (RefSpec) obj; if (isForceUpdate() != b.isForceUpdate()) return false; if (isWildcard() != b.isWildcard()) return false; if (!eq(getSource(), b.getSource())) return false; if (!eq(getDestination(), b.getDestination())) return false; return true; }
final boolean forceUpdate = spec.isForceUpdate(); final String localName = findTrackingRefName(destSpec, fetchSpecs); final RemoteRefUpdate rru = new RemoteRefUpdate(db, srcSpec,
private TrackingRefUpdate createUpdate(RefSpec spec, ObjectId newId) throws TransportException { Ref ref = localRefs().get(spec.getDestination()); ObjectId oldId = ref != null && ref.getObjectId() != null ? ref.getObjectId() : ObjectId.zeroId(); return new TrackingRefUpdate( spec.isForceUpdate(), spec.getSource(), spec.getDestination(), oldId, newId); }
final boolean forceUpdate = spec.isForceUpdate(); final String localName = findTrackingRefName(destSpec, fetchSpecs); final RefLeaseSpec leaseSpec = leases.get(destSpec);
private TrackingRefUpdate createUpdate(RefSpec spec, ObjectId newId) throws TransportException { Ref ref = localRefs().get(spec.getDestination()); ObjectId oldId = ref != null && ref.getObjectId() != null ? ref.getObjectId() : ObjectId.zeroId(); return new TrackingRefUpdate( spec.isForceUpdate(), spec.getSource(), spec.getDestination(), oldId, newId); }