Java Code Examples for org.tigris.subversion.svnclientadapter.SVNRevision#Number
The following examples show how to use
org.tigris.subversion.svnclientadapter.SVNRevision#Number .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractJhlClientAdapter.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
public void propertySet(SVNUrl url, SVNRevision.Number baseRev, String propertyName, String propertyValue, String message) throws SVNClientException { try { notificationHandler.setCommand(ISVNNotifyListener.Command.PROPSET); if (propertyName.startsWith("svn:")) { // Normalize line endings in property value svnClient.propertySetRemote(url.toString(), baseRev.getNumber(), propertyName, fixSVNString(propertyValue).getBytes(), new JhlCommitMessage(message), false, null, new JhlCommitCallback()); } else { svnClient.propertySetRemote(url.toString(), baseRev.getNumber(), propertyName, propertyValue.getBytes(), new JhlCommitMessage(message), false, null, new JhlCommitCallback()); } } catch (ClientException e) { notificationHandler.logException(e); throw new SVNClientException(e); } }
Example 2
Source File: CommitTestHidden.java From netbeans with Apache License 2.0 | 6 votes |
private void testCommitFile(String path) throws Exception { createAndCommitParentFolders(path); File file = createFile(path); add(file); assertStatus(SVNStatusKind.ADDED, file); SVNRevision revisionBefore = (SVNRevision.Number) getRevision(getRepoUrl()); ISVNClientAdapter client = getNbClient(); long r = client.commit(new File[] {file}, "commit", true); SVNRevision revisionAfter = (SVNRevision.Number) getRevision(getRepoUrl()); assertTrue(file.exists()); assertStatus(SVNStatusKind.NORMAL, file); assertNotSame(revisionBefore, revisionAfter); assertEquals(((SVNRevision.Number)revisionAfter).getNumber(), r); assertNotifiedFiles(file); }
Example 3
Source File: RevertModificationsAction.java From netbeans with Apache License 2.0 | 6 votes |
private static RevertModifications.RevisionInterval recountStartRevision(SvnClient client, SVNUrl repository, RevertModifications.RevisionInterval ret) throws SVNClientException { SVNRevision currStartRevision = ret.startRevision; SVNRevision currEndRevision = ret.endRevision; if(currStartRevision.equals(SVNRevision.HEAD)) { ISVNInfo info = client.getInfo(repository); currStartRevision = info.getRevision(); } long currStartRevNum = Long.parseLong(currStartRevision.toString()); long newStartRevNum = (currStartRevNum > 0) ? currStartRevNum - 1 : currStartRevNum; return new RevertModifications.RevisionInterval( new SVNRevision.Number(newStartRevNum), currEndRevision); }
Example 4
Source File: JhlConverter.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
static SVNRevision.Number convertRevisionNumber(long revisionNumber) { if (revisionNumber == -1) { return null; } else { return new SVNRevision.Number(revisionNumber); } }
Example 5
Source File: JhlStatus.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public SVNRevision.Number getLastChangedRevision() { // we don't use // return (SVNRevision.Number)JhlConverter.convert(_s.getLastChangedRevision()); // as _s.getLastChangedRevision() is currently broken if revision is -1 if (lastChangedRevision != null) return lastChangedRevision; if (_s.getReposLastCmtAuthor() == null) return JhlConverter.convertRevisionNumber(_s.getLastChangedRevisionNumber()); else if (_s.getReposLastCmtRevisionNumber() == 0) return null; return JhlConverter.convertRevisionNumber(_s.getReposLastCmtRevisionNumber()); }
Example 6
Source File: InfoCommand.java From netbeans with Apache License 2.0 | 5 votes |
private SVNRevision.Number getNumber(String revision) { if (revision == null) { return null; } try { return new SVNRevision.Number(Long.parseLong(revision)); } catch (NumberFormatException e) { return new SVNRevision.Number(-1); } }
Example 7
Source File: RepositoryPathNode.java From netbeans with Apache License 2.0 | 5 votes |
@Override public Object getValue() throws IllegalAccessException, InvocationTargetException { SVNRevision r = entry.getLastChangedRevision(); if (r instanceof SVNRevision.Number) { return ((SVNRevision.Number) r).getNumber(); } else if (r == null) { return ""; } else { return r.toString(); } }
Example 8
Source File: AbstractJhlClientAdapter.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public ISVNProperty[] getRevProperties(SVNUrl url, SVNRevision.Number revisionNo) throws SVNClientException { try { notificationHandler.setCommand(ISVNNotifyListener.Command.PROPLIST); String target = url.toString(); notificationHandler.logCommandLine("proplist --revprop -r " + revisionNo.toString() + target); notificationHandler.setBaseDir(); Map<String, byte[]> propertiesData = svnClient.revProperties( target, Revision.getInstance(revisionNo.getNumber())); if (propertiesData == null) { // no properties return new JhlPropertyData[0]; } Set<String> keys = propertiesData.keySet(); JhlPropertyData[] svnProperties = new JhlPropertyData[keys.size()]; int i = 0; for (String key : keys) { svnProperties[i] = JhlPropertyData.newForUrl(target, key, propertiesData.get(key)); i++; } return svnProperties; } catch (ClientException e) { notificationHandler.logException(e); throw new SVNClientException(e); } }
Example 9
Source File: HistorySearchDialog.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public void setStartRevision(SVNRevision.Number startRevision) { this.startRevision = startRevision; }
Example 10
Source File: HistorySearchDialog.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public void setEndRevision(SVNRevision.Number endRevision) { this.endRevision = endRevision; }
Example 11
Source File: RemoteResource.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
/** * get the lastChangedRevision */ public SVNRevision.Number getLastChangedRevision() { return lastChangedRevision; }
Example 12
Source File: RemoteFileEditorInput.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
/** * Returns the input name for display purposes. For instance, if * the fully qualified input name is "a\b\MyFile.gif" the return value for * <code>getName</code> is "MyFile.gif". */ public String getName() { String name = file.getName(); SVNRevision.Number revision = file.getLastChangedRevision(); return Policy.bind("nameAndRevision", name, (revision != null) ? revision.toString() : ""); //$NON-NLS-1$ //$NON-NLS-2$ }
Example 13
Source File: JhlLogMessage.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public SVNRevision.Number getRevision() { return revision; }
Example 14
Source File: HistoryTableProvider.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
/** * get the current revision (ie the lastChangedRevision of the remoteResource) */ public SVNRevision.Number getCurrentRevision() { return currentRevision; }
Example 15
Source File: InfoCommand.java From netbeans with Apache License 2.0 | 4 votes |
public SVNRevision.Number getLastChangedRevision() { return getNumber(infoMap.get(INFO_LAST_CHANGED_REVISION)); }
Example 16
Source File: InfoCommand.java From netbeans with Apache License 2.0 | 4 votes |
public SVNRevision.Number getRevision() { return getNumber(infoMap.get(INFO_REVISION)); }
Example 17
Source File: ParserSvnStatus.java From netbeans with Apache License 2.0 | 4 votes |
public SVNRevision.Number getRevision() { return revision; }
Example 18
Source File: RemoteFolder.java From APICloud-Studio with GNU General Public License v3.0 | 3 votes |
/** * Constructor for RemoteFolder. * @param parent * @param repository * @param url * @param revision * @param lastChangedRevision * @param date * @param author */ public RemoteFolder(RemoteFolder parent, ISVNRepositoryLocation repository, SVNUrl url, SVNRevision revision, SVNRevision.Number lastChangedRevision, Date date, String author) { super(parent, repository, url, revision, lastChangedRevision, date, author); }
Example 19
Source File: ILogEntry.java From APICloud-Studio with GNU General Public License v3.0 | 2 votes |
/** * Get the revision for the entry */ public SVNRevision.Number getRevision();
Example 20
Source File: ISVNRemoteResource.java From APICloud-Studio with GNU General Public License v3.0 | 2 votes |
/** * @return the last changed revision of this remote resource */ public SVNRevision.Number getLastChangedRevision();