use of org.tigris.subversion.subclipse.ui.dialogs.BranchTagPropertyUpdateDialog in project subclipse by subclipse.
the class SvnWizardBranchTagPage method updateTagsProperty.
private void updateTagsProperty(SVNUrl toUrl) {
ISVNClientAdapter svnClient = null;
try {
ISVNProperty property = null;
// $NON-NLS-1$
property = svnResource.getSvnProperty("subclipse:tags");
if (property == null)
return;
newAlias = new Alias();
// $NON-NLS-1$
newAlias.setBranch(toUrl.toString().toUpperCase().indexOf("TAGS") == -1);
String relativePath = toUrl.toString().substring(svnResource.getRepository().getUrl().toString().length());
newAlias.setRelativePath(relativePath);
SVNRevision revision = null;
if (revisionButton.getSelection())
revision = SVNRevision.getRevision(revisionText.getText().trim());
else {
svnClient = svnResource.getRepository().getSVNClient();
ISVNInfo svnInfo = svnClient.getInfo(url);
revision = SVNRevision.getRevision(svnInfo.getRevision().toString());
}
newAlias.setRevision(Integer.parseInt(revision.toString()));
newAlias.setName(toUrl.getLastPathSegment());
BranchTagPropertyUpdateDialog dialog = new BranchTagPropertyUpdateDialog(getShell(), resource, newAlias, // $NON-NLS-1$
"BranchTagPropertyUpdateDialog");
if (dialog.open() == BranchTagPropertyUpdateDialog.OK)
newAlias = dialog.getNewAlias();
else
newAlias = null;
} catch (Exception e) {
} finally {
svnResource.getRepository().returnSVNClient(svnClient);
}
}
use of org.tigris.subversion.subclipse.ui.dialogs.BranchTagPropertyUpdateDialog in project subclipse by subclipse.
the class BranchTagWizard method updateTagsProperty.
private void updateTagsProperty(SVNUrl toUrl) {
ISVNClientAdapter svnClient = null;
try {
if (resources.length > 1)
return;
ISVNProperty property = null;
// $NON-NLS-1$
property = repositoryPage.getSvnResource().getSvnProperty("subclipse:tags");
if (property == null)
return;
newAlias = new Alias();
// $NON-NLS-1$
newAlias.setBranch(toUrl.toString().toUpperCase().indexOf("TAGS") == -1);
String relativePath = toUrl.toString().substring(repositoryPage.getSvnResource().getRepository().getUrl().toString().length());
newAlias.setRelativePath(relativePath);
SVNRevision revision = null;
if (copyPage.revisionButton.getSelection())
revision = SVNRevision.getRevision(copyPage.getRevision());
else {
svnClient = repositoryPage.getSvnResource().getRepository().getSVNClient();
ISVNInfo svnInfo = svnClient.getInfo(repositoryPage.getUrl());
revision = SVNRevision.getRevision(svnInfo.getRevision().toString());
}
newAlias.setRevision(Integer.parseInt(revision.toString()));
newAlias.setName(toUrl.getLastPathSegment());
BranchTagPropertyUpdateDialog dialog = new BranchTagPropertyUpdateDialog(getShell(), getResource(), newAlias, // $NON-NLS-1$
"BranchTagPropertyUpdateDialog");
if (dialog.open() == BranchTagPropertyUpdateDialog.OK)
newAlias = dialog.getNewAlias();
else
newAlias = null;
} catch (Exception e) {
} finally {
if (svnClient != null) {
repositoryPage.getSvnResource().getRepository().returnSVNClient(svnClient);
}
}
}
Aggregations