use of org.tigris.subversion.svnclientadapter.SVNUrl in project subclipse by subclipse.
the class UnversionedCustomProperty method getSvnRevisionProperties.
public static UnversionedCustomProperty[] getSvnRevisionProperties(final ISVNRemoteResource remoteResource, final SVNRevision revision, final SVNRevision peg, final boolean customOnly) throws SVNException {
SVNUrl url = remoteResource.getUrl();
ISVNProperty[] props = getSvnRevisionProperties(url, revision, peg);
List temp = new ArrayList();
for (int i = 0; i < props.length; i++) {
final String name = props[i].getName();
final String value = props[i].getValue();
// TODO: pull these from svnPropertyTypes prefixes rather than hardcoding
if (customOnly && (name.startsWith("svn:") || name.startsWith("bugtraq:") || name.startsWith("tsvn:")))
continue;
UnversionedCustomProperty ucp = new UnversionedCustomProperty(name, value);
temp.add(ucp);
}
UnversionedCustomProperty[] ret = new UnversionedCustomProperty[temp.size()];
int i = 0;
Iterator iter = temp.iterator();
while (iter.hasNext()) {
ret[i++] = (UnversionedCustomProperty) iter.next();
}
return ret;
}
use of org.tigris.subversion.svnclientadapter.SVNUrl in project subclipse by subclipse.
the class CommitOperation method getRootURL.
private String getRootURL(ISVNLocalResource localResource) {
if (!atomicCommit)
return null;
ISVNInfo info = getSVNInfo(localResource);
if (info == null)
return null;
SVNUrl repos = info.getRepository();
if (repos == null)
return null;
return repos.toString();
}
use of org.tigris.subversion.svnclientadapter.SVNUrl in project subclipse by subclipse.
the class SvnWizardBranchTagPage method performFinish.
public boolean performFinish() {
if (projectProperties != null) {
issue = issueText.getText().trim();
if (projectProperties.isWarnIfNoIssue() && (issueText.getText().trim().length() == 0)) {
if (!MessageDialog.openQuestion(getShell(), Policy.bind("BranchTagDialog.title"), Policy.bind("BranchTagDialog.0", projectProperties.getLabel()))) {
// $NON-NLS-1$ //$NON-NLS-2$
issueText.setFocus();
return false;
}
}
if (issueText.getText().trim().length() > 0) {
String issueError = projectProperties.validateIssue(issueText.getText().trim());
if (issueError != null) {
MessageDialog.openError(getShell(), Policy.bind("BranchTagDialog.title"), // $NON-NLS-1$
issueError);
issueText.selectAll();
issueText.setFocus();
return false;
}
}
}
toUrlCombo.saveUrl();
createOnServer = !workingCopyButton.getSelection();
specificRevision = revisionButton.getSelection();
makeParents = makeParentsButton.getSelection();
if (switchAfterBranchTagCheckBox != null) {
switchAfterBranchTag = switchAfterBranchTagCheckBox.getSelection();
}
comment = commitCommentArea.getComment(true);
if (serverButton.getSelection())
revision = SVNRevision.HEAD;
try {
toUrl = new SVNUrl(toUrlCombo.getText());
if (revisionButton.getSelection())
revision = SVNRevision.getRevision(revisionText.getText().trim());
} catch (Exception e) {
MessageDialog.openError(getShell(), Policy.bind("BranchTagDialog.title"), // $NON-NLS-1$
e.getMessage());
return false;
}
if (resource != null)
updateTagsProperty(toUrl);
return true;
}
use of org.tigris.subversion.svnclientadapter.SVNUrl in project subclipse by subclipse.
the class SvnWizardCompareMultipleResourcesWithBranchTagPage method showLog.
protected void showLog() {
ISVNRemoteResource remoteResource = null;
try {
remoteResource = SVNWorkspaceRoot.getSVNResourceFor(resources[0]).getRepository().getRemoteFile(new SVNUrl(urlCombo.getText()));
} catch (Exception e) {
MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), // $NON-NLS-1$
e.toString());
return;
}
if (remoteResource == null) {
MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), Policy.bind("MergeDialog.urlError") + " " + // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
urlCombo.getText());
return;
}
HistoryDialog dialog = new HistoryDialog(getShell(), remoteResource);
if (dialog.open() == HistoryDialog.CANCEL)
return;
ILogEntry[] selectedEntries = dialog.getSelectedLogEntries();
if (selectedEntries.length == 0)
return;
revisionText.setText(Long.toString(selectedEntries[selectedEntries.length - 1].getRevision().getNumber()));
setPageComplete(canFinish());
}
use of org.tigris.subversion.svnclientadapter.SVNUrl in project subclipse by subclipse.
the class SvnWizardCompareMultipleResourcesWithBranchTagPage method performFinish.
public boolean performFinish() {
urlCombo.saveUrl();
try {
if (urlStrings.length > 1) {
urls = new SVNUrl[compareResources.length];
for (int i = 0; i < compareResources.length; i++) {
if (// $NON-NLS-1$
urlCombo.getText().endsWith("/"))
urls[i] = new SVNUrl(urlCombo.getText() + compareResources[i].getPartialPath());
else
urls[i] = new SVNUrl(// $NON-NLS-1$
urlCombo.getText() + "/" + compareResources[i].getPartialPath());
}
} else {
urls = new SVNUrl[1];
urls[0] = new SVNUrl(urlCombo.getText());
}
if (headButton.getSelection())
revision = SVNRevision.HEAD;
else {
try {
revision = SVNRevision.getRevision(revisionText.getText().trim());
} catch (ParseException e1) {
MessageDialog.openError(getShell(), Policy.bind("SvnWizardCompareMultipleResourcesWithBranchTagPage.0"), // $NON-NLS-1$ //$NON-NLS-2$
Policy.bind("SwitchDialog.invalid"));
return false;
}
}
} catch (MalformedURLException e) {
MessageDialog.openError(getShell(), Policy.bind("SvnWizardCompareMultipleResourcesWithBranchTagPage.0"), // $NON-NLS-1$
e.getMessage());
return false;
}
return true;
}
Aggregations