List of usage examples for org.eclipse.jgit.transport RefSpec isForceUpdate
public boolean isForceUpdate()
From source file:com.google.gerrit.server.git.PushOp.java
License:Apache License
private void send(final List<RemoteRefUpdate> cmds, final RefSpec spec, final Ref src) throws IOException { final String dst = spec.getDestination(); final boolean force = spec.isForceUpdate(); cmds.add(new RemoteRefUpdate(db, src, dst, force, null, null)); }
From source file:com.google.gerrit.server.git.PushOp.java
License:Apache License
private void delete(final List<RemoteRefUpdate> cmds, final RefSpec spec) throws IOException { final String dst = spec.getDestination(); final boolean force = spec.isForceUpdate(); cmds.add(new RemoteRefUpdate(db, (Ref) null, dst, force, null, null)); }
From source file:com.googlesource.gerrit.plugins.replication.PushOne.java
License:Apache License
private void push(List<RemoteRefUpdate> cmds, RefSpec spec, Ref src) throws IOException { String dst = spec.getDestination(); boolean force = spec.isForceUpdate(); cmds.add(new RemoteRefUpdate(git, src, dst, force, null, null)); }
From source file:com.googlesource.gerrit.plugins.replication.PushOne.java
License:Apache License
private void delete(List<RemoteRefUpdate> cmds, RefSpec spec) throws IOException { String dst = spec.getDestination(); boolean force = spec.isForceUpdate(); cmds.add(new RemoteRefUpdate(git, (Ref) null, dst, force, null, null)); }
From source file:org.eclipse.egit.ui.internal.components.RefSpecPanel.java
License:Open Source License
private void updateForceUpdateAllButton() { boolean enable = false; for (final RefSpec spec : specs) { if (!isDeleteRefSpec(spec) && !spec.isForceUpdate()) { enable = true;/*from w w w .j a v a 2 s. c o m*/ break; } } forceUpdateAllButton.setEnabled(enable); }
From source file:org.eclipse.egit.ui.internal.push.RefSpecDialog.java
License:Open Source License
private void setSpec(RefSpec spec) { setErrorMessage(null);// w w w .j a v a 2 s .co m 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); }