rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (!ourIsEnabled) { return; }
public static void log(String message) { Logger.getLogger("svn").log(Level.FINE, message); }
public void textDeltaEnd() throws SVNException;
public void textDeltaEnd(String path) throws SVNException;
public void textDeltaEnd() throws SVNException;
clazz=Util.loadClass(defaultProtocolName, this.getClass());
try { clazz=Util.loadClass(defaultProtocolName, this.getClass()); } catch(ClassNotFoundException e) { }
Protocol createLayer(ProtocolStack prot_stack) throws Exception { Protocol retval=null; if(protocol_name == null) return null; String defaultProtocolName=protocol_prefix + '.' + protocol_name; Class clazz=null; clazz=Util.loadClass(defaultPro...
clazz=Util.loadClass(protocol_name, this.getClass());
try { clazz=Util.loadClass(protocol_name, this.getClass()); } catch(ClassNotFoundException e) { }
Protocol createLayer(ProtocolStack prot_stack) throws Exception { Protocol retval=null; if(protocol_name == null) return null; String defaultProtocolName=protocol_prefix + '.' + protocol_name; Class clazz=null; clazz=Util.loadClass(defaultPro...
if(down_thread) { if(down_handler == null) { down_handler=new DownHandler(down_queue, this, observer); if(down_thread_prio >= 0) { try { down_handler.setPriority(down_thread_prio); } catch(Throwable t) { if(log.isErrorEnabled()) log.error("priority " + down_thread_prio + " could not be set for thread: " + Util.getStack...
if (down_thread) { if (down_handler == null) { down_handler = new DownHandler(down_queue, this, observer); if (down_thread_prio >= 0) { try { down_handler.setPriority(down_thread_prio); } catch (Throwable t) { if (log.isErrorEnabled()) { log.error("priority " + down_thread_prio + " could not be set for thread: " + Util...
public void startDownHandler() { if(down_thread) { if(down_handler == null) { down_handler=new DownHandler(down_queue, this, observer); if(down_thread_prio >= 0) { try { down_handler.setPriority(down_thread_prio); ...
if(up_thread) { if(up_handler == null) { up_handler=new UpHandler(up_queue, this, observer); if(up_thread_prio >= 0) { try { up_handler.setPriority(up_thread_prio); } catch(Throwable t) { if(log.isErrorEnabled()) log.error("priority " + up_thread_prio + " could not be set for thread: " + Util.getStackTrace(t)); } } up_...
if (up_thread) { if (up_handler == null) { up_handler = new UpHandler(up_queue, this, observer); if (up_thread_prio >= 0) { try { up_handler.setPriority(up_thread_prio); } catch (Throwable t) { if (log.isErrorEnabled()) { log.error("priority " + up_thread_prio + " could not be set for thread: " + Util.getStackTrace(t))...
public void startUpHandler() { if(up_thread) { if(up_handler == null) { up_handler=new UpHandler(up_queue, this, observer); if(up_thread_prio >= 0) { try { up_handler.setPriority(up_thread_prio); } ...
if(up_handler != null && up_handler.isAlive()) { try { up_handler.join(THREAD_JOIN_TIMEOUT); } catch(Exception ex) { } if(up_handler != null && up_handler.isAlive()) { up_handler.interrupt(); try { up_handler.join(THREAD_JOIN_TIMEOUT); } catch(Exception ex) { } if(up_handler != null && up_handler.isAlive()) if(log.isEr...
if (up_handler != null && up_handler.isAlive()) { try { up_handler.join(THREAD_JOIN_TIMEOUT); } catch (Exception ex) { } if (up_handler != null && up_handler.isAlive()) { up_handler.interrupt(); try { up_handler.join(THREAD_JOIN_TIMEOUT); } catch (Exception ex) { } if (up_handler != null && up_handler.isAlive()) { if (...
public void stopInternal() { up_queue.close(false); // this should terminate up_handler thread if(up_handler != null && up_handler.isAlive()) { try { up_handler.join(THREAD_JOIN_TIMEOUT); } catch(Exception ex) { } if(up_handler != ...
down_queue.close(false); if(down_handler != null && down_handler.isAlive()) { try { down_handler.join(THREAD_JOIN_TIMEOUT); } catch(Exception ex) { } if(down_handler != null && down_handler.isAlive()) { down_handler.interrupt(); try { down_handler.join(THREAD_JOIN_TIMEOUT); } catch(Exception ex) { } if(down_handler != ...
down_queue.close(false); if (down_handler != null && down_handler.isAlive()) { try { down_handler.join(THREAD_JOIN_TIMEOUT); } catch (Exception ex) { } if (down_handler != null && down_handler.isAlive()) { down_handler.interrupt(); try { down_handler.join(THREAD_JOIN_TIMEOUT); } catch (Exception ex) { } if (down_handle...
public void stopInternal() { up_queue.close(false); // this should terminate up_handler thread if(up_handler != null && up_handler.isAlive()) { try { up_handler.join(THREAD_JOIN_TIMEOUT); } catch(Exception ex) { } if(up_handler != ...
if(max_suspend_time <= 0) max_suspend_time=MAX_SUSPEND_TIME;
void startResumeTask(long max_suspend_time) { max_suspend_time=(long)(max_suspend_time * 1.1); // little slack synchronized(resume_task_mutex) { if(resume_task != null && resume_task.running()) { return; // already running } else { resume...
public Digest(int size) { reset(size); }
public Digest() { }
public Digest(int size) { reset(size); }
public Message() { }
public Message(Address dest, Address src, byte[] buf) { dest_addr=dest; src_addr=src; setBuffer(buf); }
public Message() { } // should not be called as normal constructor
int b=in.read(); if(b == 0)
if(in.readBoolean() == false)
public static Streamable readStreamable(Class clazz, DataInputStream in) throws IOException, IllegalAccessException, InstantiationException { Streamable retval=null; int b=in.read(); if(b == 0) return null; retval=(Streamable)clazz.newInstance(); retval.readFrom(in); ...
out.write(0);
out.writeBoolean(false);
public static void writeStreamable(Streamable obj, DataOutputStream out) throws IOException { if(obj == null) { out.write(0); return; } out.write(1); obj.writeTo(out); }
out.write(1);
out.writeBoolean(true);
public static void writeStreamable(Streamable obj, DataOutputStream out) throws IOException { if(obj == null) { out.write(0); return; } out.write(1); obj.writeTo(out); }
if(senders == null) return "[]";
public String toString() { StringBuffer sb=new StringBuffer(); boolean first=true; for(int i=0; i < senders.length; i++) { if(!first) { sb.append(", "); } else { sb.append("["); first=false; } sb...
public long highSeqnoAt(Address sender) { long ret=-1; int index; if(sender == null) return ret; index=getIndex(sender); if(index == -1) return ret; else
public long highSeqnoAt(int index) { if(index < size())
public long highSeqnoAt(Address sender) { long ret=-1; int index; if(sender == null) return ret; index=getIndex(sender); if(index == -1) return ret; else return high_seqnos[index]; }
else { if(log.isErrorEnabled()) log.error("index " + index + " is out of bounds"); return 0; }
public long highSeqnoAt(Address sender) { long ret=-1; int index; if(sender == null) return ret; index=getIndex(sender); if(index == -1) return ret; else return high_seqnos[index]; }
public long highSeqnoSeenAt(Address sender) { long ret=-1; int index; if(sender == null) return ret; index=getIndex(sender); if(index == -1) return ret; else
public long highSeqnoSeenAt(int index) { if(index < size())
public long highSeqnoSeenAt(Address sender) { long ret=-1; int index; if(sender == null) return ret; index=getIndex(sender); if(index == -1) return ret; else return high_seqnos_seen[index]; }
else { if(log.isErrorEnabled()) log.error("index " + index + " is out of bounds"); return 0; }
public long highSeqnoSeenAt(Address sender) { long ret=-1; int index; if(sender == null) return ret; index=getIndex(sender); if(index == -1) return ret; else return high_seqnos_seen[index]; }
}else{ contents = fileContents[i];
private static final void createLocalDir(File aNewDir, File[] localFiles, String[] fileContents){ if (!aNewDir.mkdirs()) { error("failed to create a new directory '" + aNewDir.getAbsolutePath() + "'.", null); } for(int i=0; i < localFiles.length; i++){ File aNewFile = localFi...
contents = fileContents[i];
private static final void createLocalDir(File aNewDir, File[] localFiles, String[] fileContents){ if (!aNewDir.mkdirs()) { error("failed to create a new directory '" + aNewDir.getAbsolutePath() + "'.", null); } for(int i=0; i < localFiles.length; i++){ File aNewFile = localFi...
public SVNCommitInfo doCopy(String srcURL, SVNRevision srcPegRevision, SVNRevision srcRevision, String dstURL, SVNRevision dstPegRevision, boolean move, String commitMessage) throws SVNException { if (srcRevision == null) { srcRevision = SVNRevision.HEAD;
public SVNCommitInfo doCopy(File srcPath, SVNRevision srcPegRevision, SVNRevision srcRevision, File dstPath, SVNRevision dstPegRevision, SVNRevision dstRevision, boolean force, boolean move, String commitMessage) throws SVNException { if (srcRevision == null || !srcRevision.isValid()) { srcRevision = SVNRevision.WORKIN...
public SVNCommitInfo doCopy(String srcURL, SVNRevision srcPegRevision, SVNRevision srcRevision, String dstURL, SVNRevision dstPegRevision, boolean move, String commitMessage) throws SVNException { if (srcRevision == null) { srcRevision = SVNRevision.HEAD; } if (...
if (srcPegRevision == null) { srcPegRevision = SVNRevision.UNDEFINED;
if (dstRevision == null || !dstRevision.isValid()) { dstRevision = SVNRevision.WORKING;
public SVNCommitInfo doCopy(String srcURL, SVNRevision srcPegRevision, SVNRevision srcRevision, String dstURL, SVNRevision dstPegRevision, boolean move, String commitMessage) throws SVNException { if (srcRevision == null) { srcRevision = SVNRevision.HEAD; } if (...
if (dstPegRevision == null) { dstPegRevision = SVNRevision.UNDEFINED;
if (dstRevision != SVNRevision.HEAD && dstRevision != SVNRevision.WORKING) { SVNErrorManager .error("svn: Only HEAD or WORKING revision could be specified as copy or move target revision");
public SVNCommitInfo doCopy(String srcURL, SVNRevision srcPegRevision, SVNRevision srcRevision, String dstURL, SVNRevision dstPegRevision, boolean move, String commitMessage) throws SVNException { if (srcRevision == null) { srcRevision = SVNRevision.HEAD; } if (...
srcURL = validateURL(srcURL); dstURL = validateURL(dstURL); long srcRevNumber = getRevisionNumber(srcURL, srcRevision);
if (srcRevision == SVNRevision.WORKING && dstRevision == SVNRevision.WORKING) { wc2wcCopy(srcPath, dstPath, force, move); } else if (srcRevision == SVNRevision.WORKING) { if (move) { SVNErrorManager .error("svn: Only WC to WC or URL to URL move is supported"); } SVNWCAccess dstAccess = createWCAccess(srcPath); String...
public SVNCommitInfo doCopy(String srcURL, SVNRevision srcPegRevision, SVNRevision srcRevision, String dstURL, SVNRevision dstPegRevision, boolean move, String commitMessage) throws SVNException { if (srcRevision == null) { srcRevision = SVNRevision.HEAD; } if (...
srcURL = getURL(srcURL, srcPegRevision, SVNRevision .create(srcRevNumber)); dstURL = getURL(dstURL, dstPegRevision, SVNRevision.HEAD); return url2urlCopy(srcURL, srcRevNumber, dstURL, commitMessage, move);
String srcURL = srcAccess.getTargetEntryProperty(SVNProperty.URL); String dstURL = dstAccess.getTargetEntryProperty(SVNProperty.URL); if (srcPegRevision == null || !srcPegRevision.isValid()) { srcPegRevision = SVNRevision.parse(srcAccess .getTargetEntryProperty(SVNProperty.REVISION)); } if (dstPegRevision == null || !d...
public SVNCommitInfo doCopy(String srcURL, SVNRevision srcPegRevision, SVNRevision srcRevision, String dstURL, SVNRevision dstPegRevision, boolean move, String commitMessage) throws SVNException { if (srcRevision == null) { srcRevision = SVNRevision.HEAD; } if (...
public static ISVNOptions createDefaultOptions(boolean readonly) { return new SVNOptions(null, !readonly);
public static ISVNOptions createDefaultOptions(File dir, boolean readonly) { return new SVNOptions(dir, !readonly);
public static ISVNOptions createDefaultOptions(boolean readonly) { return new SVNOptions(null, !readonly); }
public static SVNClientManager newInstance(ISVNOptions options, String userName, String password) { boolean storeAuth = options == null ? true : options.isAuthStorageEnabled(); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(null, userName, password, storeAuth); return new SVNClient...
public static SVNClientManager newInstance() { return new SVNClientManager(null, null);
public static SVNClientManager newInstance(ISVNOptions options, String userName, String password) { boolean storeAuth = options == null ? true : options.isAuthStorageEnabled(); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(null, userName, password, storeAuth); ...
for(int i = path.length() - 1; i >= 0; i--) {
int index = path.length() - 1; if (index >= 0 && index < path.length() && path.charAt(index) == '/') { index--; } for(int i = index; i >= 0; i--) {
public static String tail(String path) { for(int i = path.length() - 1; i >= 0; i--) { if (path.charAt(i) == '/') { return path.substring(i + 1); } } return path; }
return path.substring(i + 1);
return path.substring(i + 1, index + 1);
public static String tail(String path) { for(int i = path.length() - 1; i >= 0; i--) { if (path.charAt(i) == '/') { return path.substring(i + 1); } } return path; }
public long doStatus(File path, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, boolean collectParentExternals, final ISVNStatusHandler handler)
public void doStatus(File path, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, ISVNStatusHandler handler)
public long doStatus(File path, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, boolean collectParentExternals, final ISVNStatusHandler handler) throws SVNException { if (handler == null) { return -1; }...
if (handler == null) { return -1; } SVNWCAccess wcAccess = createWCAccess(path); wcAccess.open(false, recursive); Map parentExternals = new HashMap(); if (collectParentExternals) { parentExternals = collectParentExternals(path, wcAccess.getAnchor() != wcAccess.getTarget()); SVNExternalInfo thisExternal = (SVNExternalIn...
doStatus(path, recursive, remote, reportAll, includeIgnored, false, handler);
public long doStatus(File path, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, boolean collectParentExternals, final ISVNStatusHandler handler) throws SVNException { if (handler == null) { return -1; }...
if (myCurrentFile.myBaseFile.exists()) { break; }
public void applyTextDelta(String baseChecksum) throws SVNException { SVNDirectory dir = myWCAccess.getDirectory(myCurrentDirectory.myPath); String fileName = PathUtil.tail(myCurrentFile.myPath); if (dir != null) { SVNEntry entry = dir.getEntries().getEntry(fileName); if (...
myCurrentFile.myBaseFile = dir.getFile(".svn/emtpy-file", false);
myCurrentFile.myBaseFile = dir.getFile(".svn/empty-file", false);
public void closeFile(String textChecksum) throws SVNException { String reposMimeType = (String) (myCurrentFile.myPropertyDiff != null ? myCurrentFile.myPropertyDiff.get(SVNProperty.MIME_TYPE) : null); String fileName = PathUtil.tail(myCurrentFile.myPath); SVNDirectory dir = myWCAccess.getDirec...
File emptyFile = dir.getFile(".svn/empty-file", false);
File emptyFile = null;
public void deleteEntry(String path, long revision) throws SVNException { path = PathUtil.removeLeadingSlash(path); path = PathUtil.removeTrailingSlash(path); SVNDirectory dir = myWCAccess.getDirectory(myCurrentDirectory.myPath); String name = PathUtil.tail(path); SVNEntry...
myDiffGenerator.displayFileDiff(fullPath, dir.getFile(".svn/empty-file", false), tmpFile, rev1, rev2, mimeType1, mimeType2, result);
myDiffGenerator.displayFileDiff(fullPath, null, tmpFile, rev1, rev2, mimeType1, mimeType2, result);
private void localDirectoryDiff(SVNDirectoryInfo info, boolean isAdded, OutputStream result) throws SVNException { if (myIsCompareToBase) { return; } SVNDirectory dir = myWCAccess.getDirectory(info.myPath); boolean anchor = !"".equals(myWCAccess.getTargetName()) && dir == myWC...
DebugLog.log("as modified: " + entry.getName());
private void localDirectoryDiff(SVNDirectoryInfo info, boolean isAdded, OutputStream result) throws SVNException { if (myIsCompareToBase) { return; } SVNDirectory dir = myWCAccess.getDirectory(info.myPath); boolean anchor = !"".equals(myWCAccess.getTargetName()) && dir == myWC...
byte[] eols = getEOL(eolStyle);
byte[] eols;
public static void translate(SVNDirectory dir, String name, String srcPath, String dstPath, boolean expand, boolean safe) throws SVNException { File src = dir.getFile(srcPath, false); File dst = safe ? SVNFileUtil.createUniqueFile(dir.getRoot(), dstPath, ".tmp") : dir.getFile(dstPath, false); ...
public Map compareTo(SVNProperties properties) throws SVNException { final Map locallyChangedProperties = new HashMap(); compareTo(properties, new ISVNPropertyComparator() { public void propertyAdded(String name, InputStream value, int length) { propertyChanged(name, value, length);
public boolean compareTo(SVNProperties properties, ISVNPropertyComparator comparator) throws SVNException { boolean equals = true; Collection props1 = properties(null); Collection props2 = properties.properties(null); Collection tmp = new TreeSet(props1); tmp.removeAll(props2); for (Iterator props = tmp.iterator(); p...
public Map compareTo(SVNProperties properties) throws SVNException { final Map locallyChangedProperties = new HashMap(); compareTo(properties, new ISVNPropertyComparator() { public void propertyAdded(String name, InputStream value, int length) { propertyChanged(name, value, l...
public void propertyChanged(String name, InputStream newValue, int length) { ByteArrayOutputStream os = new ByteArrayOutputStream(length); for (int i = 0; i < length; i++) { try { os.write(newValue.read()); } catch (IOException e) {
props2.retainAll(props1); for (Iterator props = props2.iterator(); props.hasNext();) { String changed = (String) props.next(); try { tmpFile1 = SVNFileUtil.createUniqueFile(myFile.getParentFile(), myFile.getName(), ".tmp1"); tmpFile2 = SVNFileUtil.createUniqueFile(myFile.getParentFile(), myFile.getName(), ".tmp2"); o...
public Map compareTo(SVNProperties properties) throws SVNException { final Map locallyChangedProperties = new HashMap(); compareTo(properties, new ISVNPropertyComparator() { public void propertyAdded(String name, InputStream value, int length) { propertyChanged(name, value, l...
byte[] bytes = os.toByteArray(); try { locallyChangedProperties.put(name, new String(bytes, "UTF-8")); } catch (UnsupportedEncodingException e) { locallyChangedProperties.put(name, new String(bytes));
} catch (IOException e) { SVNErrorManager.error("svn: I/O error while comparing properties files: " + e.getMessage()); } finally { if (tmpFile2 != null) { tmpFile2.delete();
public Map compareTo(SVNProperties properties) throws SVNException { final Map locallyChangedProperties = new HashMap(); compareTo(properties, new ISVNPropertyComparator() { public void propertyAdded(String name, InputStream value, int length) { propertyChanged(name, value, l...
public void propertyDeleted(String name) { locallyChangedProperties.put(name, null); } }); return locallyChangedProperties;
} return equals;
public Map compareTo(SVNProperties properties) throws SVNException { final Map locallyChangedProperties = new HashMap(); compareTo(properties, new ISVNPropertyComparator() { public void propertyAdded(String name, InputStream value, int length) { propertyChanged(name, value, l...
InputStream src = null;
InputStream src;
public void apply(ISVNRAData source, ISVNRAData target, InputStream newData, long offset) throws SVNException { // use ra files as source and target... if (target == null) { throw new SVNException("target shouldn't be null"); } InputStream src = null; try { f...
DebugLog.error(e);
public void apply(ISVNRAData source, ISVNRAData target, InputStream newData, long offset) throws SVNException { // use ra files as source and target... if (target == null) { throw new SVNException("target shouldn't be null"); } InputStream src = null; try { f...
} else if (output[i] == 0){
} else if (output[i] == 0 && shift != -1){
public void listLimboTransactions() throws SQLException { OutputStream saveOut = getLogger(); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(saveOut); setLogger(out); executeRepairOperation(ISCConstants.isc_sp...
} else {
shift = -1; } else if (shift != -1) {
public void listLimboTransactions() throws SQLException { OutputStream saveOut = getLogger(); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(saveOut); setLogger(out); executeRepairOperation(ISCConstants.isc_sp...
protected FBServiceManager(GDSType gdsType) { this.gds = GDSFactory.getGDSForType(gdsType);
protected FBServiceManager() { this.gds = GDSFactory.getGDSForType(GDSFactory.getDefaultGDSType());
protected FBServiceManager(GDSType gdsType) { this.gds = GDSFactory.getGDSForType(gdsType); }
try { m_downLock.acquire(); } catch (InterruptedException ex) { } m_downLock.release();
acquireDownLock(); releaseDownLock();
public void blockUntilDownReady() { try { m_downLock.acquire(); } catch (InterruptedException ex) { //this is ok } m_downLock.release(); }
try { m_upLock.acquire(); } catch (InterruptedException ex) { } m_upLock.release();
acquireUpLock(); releaseUpLock();
public void blockUntilUpReady() { try { m_upLock.acquire(); } catch (InterruptedException ex) { //this is ok } m_upLock.release(); }
} catch(IllegalMonitorStateException ex) { throw ex;
public Object remove() throws QueueClosedException { /*initialize the return value*/ Object retval=null; /*lock the queue*/ synchronized(mutex) { /*wait as long as the queue is empty. return when an element is present or queue is closed*/ while(size == 0) { ...
DatabaseManager.update(context, row );
public static WorkspaceItem create(Context context, Collection coll, EPerson sub) throws AuthorizeException, SQLException { // FIXME Check authorisation // Create an item Item i = Item.create(context); ...
return pwRow.getIntColumn("workspace_id");
return pwRow.getIntColumn("personal_workspace_id");
public int getID() { return pwRow.getIntColumn("workspace_id"); }
public static int delete(Context context, TableRow row) throws SQLException
public static int delete(Context context, String table, int id) throws SQLException
public static int delete(Context context, TableRow row) throws SQLException { String pk = getPrimaryKeyColumn(row); if (row.isColumnNull(pk)) { throw new IllegalArgumentException("Primary key value is null"); } return delete(context, row.getTable(), row.getIntColumn(...
String pk = getPrimaryKeyColumn(row);
String ctable = canonicalize(table);
public static int delete(Context context, TableRow row) throws SQLException { String pk = getPrimaryKeyColumn(row); if (row.isColumnNull(pk)) { throw new IllegalArgumentException("Primary key value is null"); } return delete(context, row.getTable(), row.getIntColumn(...
if (row.isColumnNull(pk)) { throw new IllegalArgumentException("Primary key value is null"); } return delete(context, row.getTable(), row.getIntColumn(pk));
return deleteByValue(context, ctable, getPrimaryKeyColumn(ctable), Integer.toString(id));
public static int delete(Context context, TableRow row) throws SQLException { String pk = getPrimaryKeyColumn(row); if (row.isColumnNull(pk)) { throw new IllegalArgumentException("Primary key value is null"); } return delete(context, row.getTable(), row.getIntColumn(...
String value)
String[] values)
public void addDC(String element, String qualifier, String lang, String value) { String[] valArray = new String[1]; valArray[0] = value; addDC(element, qualifier, lang, valArray); }
String[] valArray = new String[1]; valArray[0] = value;
for (int i = 0; i < values.length; i++) { DCValue dcv = new DCValue(); dcv.element = element; dcv.qualifier = qualifier; dcv.language = lang; dcv.value = values[i].trim(); dublinCore.add(dcv); }
public void addDC(String element, String qualifier, String lang, String value) { String[] valArray = new String[1]; valArray[0] = value; addDC(element, qualifier, lang, valArray); }
addDC(element, qualifier, lang, valArray);
if (values.length > 0) { dublinCoreChanged = true; }
public void addDC(String element, String qualifier, String lang, String value) { String[] valArray = new String[1]; valArray[0] = value; addDC(element, qualifier, lang, valArray); }
return FBConnection.class;
return ClassFactory.get(ClassFactory.FBConnection);
public Class getConnectionClass() { return FBConnection.class; }
log.error("McastReceiver.run(): " + ex + ", rsp_packet=" +
System.err.println("McastReceiver.run(): " + ex + ", rsp_packet=" +
public void run() { while (running) { buf = new byte[16000]; mcast_packet = new DatagramPacket(buf, buf.length); try { mcast_sock.receive(mcast_packet); req = (DiscoveryRequest) Util.objectF...
log.error("UcastReceiver.run(): " + ex);
System.err.println("UcastReceiver.run(): " + ex);
public void run() { DatagramPacket packet; byte[] buf; DiscoveryResponse rsp; List l; InetAddress bind_interface; InetSocketAddress responder_addr; while (running) { try { ...
log.error("McastDiscovery1_4.sendDiscoveryRequest(): " + ex);
System.err.println("McastDiscovery1_4.sendDiscoveryRequest(): " + ex);
void sendDiscoveryRequest(int ttl) { DiscoveryRequest req; byte[] buf; DatagramPacket packet; req = new DiscoveryRequest(local_addr, local_port); System.out.println("--> " + req); try { buf = Util.objectToByteBuffer(req); ...
log.trace("service state was set successfully (" + service_state.size() + " entries");
log.trace("service state was set successfully (" + service_state.size() + " entries)");
public void fetchServiceInformation() throws Exception { while(true) { Address coord=getCoordinator(), local_address=channel != null? channel.getLocalAddress() : null; boolean is_coord=coord != null && local_address != null && local_address.equals(coord); if(is_coord) { ...
StringBuffer ret=new StringBuffer();
StringBuffer ret=new StringBuffer(21);
public String toString() { StringBuffer ret=new StringBuffer(); ret.append(vid + " " + members); return ret.toString(); }
public MuxHeader(ServiceInfo info) { this.info=info;
public MuxHeader() {
public MuxHeader(ServiceInfo info) { this.info=info; }
Object ret=null; long time_to_wait=timeout, start; boolean timeout_occurred=false;
public Object getResultWithTimeout(long timeout) throws TimeoutException { Object ret=null; long time_to_wait=timeout, start; boolean timeout_occurred=false; synchronized(this) { start=System.currentTimeMillis(); while(hasResult == false) { if(tim...
start=System.currentTimeMillis(); while(hasResult == false) { if(timeout <= 0) { doWait(); } else { if(time_to_wait <= 0) { timeout_occurred=true; break; } else { doWait(time_to_wait); time_to_wait-=System.currentTimeMillis()-start; } }
try { return _getResultWithTimeout(timeout);
public Object getResultWithTimeout(long timeout) throws TimeoutException { Object ret=null; long time_to_wait=timeout, start; boolean timeout_occurred=false; synchronized(this) { start=System.currentTimeMillis(); while(hasResult == false) { if(tim...
ret=result; result=null; hasResult=false; if(timeout_occurred) throw new TimeoutException(); else return ret;
finally { notifyAll(); }
public Object getResultWithTimeout(long timeout) throws TimeoutException { Object ret=null; long time_to_wait=timeout, start; boolean timeout_occurred=false; synchronized(this) { start=System.currentTimeMillis(); while(hasResult == false) { if(tim...
public View(ViewId vid, Vector members) { this.vid = vid; this.members = members; }
public View() {}
public View(ViewId vid, Vector members) { this.vid = vid; this.members = members; }
log.error("UnicastTest.getNumberOfMessages(): " + e);
System.err.println("UnicastTest.getNumberOfMessages(): " + e);
long getNumberOfMessages() { BufferedReader reader=null; String tmp=null; try { System.out.print("Number of messages to send: "); System.out.flush(); System.in.skip(System.in.available()); reader=new BufferedReader(new InputStreamReader(System.in)); ...
log.error("UnicastTest.getReceiver(): " + e);
System.err.println("UnicastTest.getReceiver(): " + e);
Address getReceiver() { Vector mbrs=null; int index; BufferedReader reader; String tmp; try { mbrs=channel.getView().getMembers(); System.out.println("pick receiver from the following members:"); for(int i=0; i < mbrs.size(); i++) { ...
log.error(ex);
System.err.println(ex);
public static void main(String[] args) { long sleep_time=0; boolean exit_on_end=false; boolean busy_sleep=false; String udp_props="UDP(mcast_addr=228.8.8.8;mcast_port=45566;ip_ttl=32;" + "ucast_recv_buf_size=32000;ucast_send_buf_size=64000;" + "mcast_send_bu...
log.error("UnicastTest.run(): received START data, but am already processing data");
System.err.println("UnicastTest.run(): received START data, but am already processing data");
public void run() { Data data; Message msg; Object obj; boolean started=false; long start=0, stop=0; long current_value=0, tmp=0, num_values=0; long total_msgs=0, total_time=0, msgs_per_sec; while(true) { try { obj=channel.receive(0);...
log.error("-- message received (" + tmp + ") is not 1 greater than " + current_value);
System.err.println("-- message received (" + tmp + ") is not 1 greater than " + current_value);
public void run() { Data data; Message msg; Object obj; boolean started=false; long start=0, stop=0; long current_value=0, tmp=0, num_values=0; long total_msgs=0, total_time=0, msgs_per_sec; while(true) { try { obj=channel.receive(0);...
log.error(not_connected);
System.err.println(not_connected);
public void run() { Data data; Message msg; Object obj; boolean started=false; long start=0, stop=0; long current_value=0, tmp=0, num_values=0; long total_msgs=0, total_time=0, msgs_per_sec; while(true) { try { obj=channel.receive(0);...
log.error(closed_ex);
System.err.println(closed_ex);
public void run() { Data data; Message msg; Object obj; boolean started=false; long start=0, stop=0; long current_value=0, tmp=0, num_values=0; long total_msgs=0, total_time=0, msgs_per_sec; while(true) { try { obj=channel.receive(0);...
log.error(timeout);
System.err.println(timeout);
public void run() { Data data; Message msg; Object obj; boolean started=false; long start=0, stop=0; long current_value=0, tmp=0, num_values=0; long total_msgs=0, total_time=0, msgs_per_sec; while(true) { try { obj=channel.receive(0);...
log.error(t);
System.err.println(t);
public void run() { Data data; Message msg; Object obj; boolean started=false; long start=0, stop=0; long current_value=0, tmp=0, num_values=0; long total_msgs=0, total_time=0, msgs_per_sec; while(true) { try { obj=channel.receive(0);...
log.error("UnicastTest.sendMessages(): receiver is null, cannot send messages");
System.err.println("UnicastTest.sendMessages(): receiver is null, cannot send messages");
void sendMessages() throws Exception { long num_msgs=getNumberOfMessages(); Address receiver=getReceiver(); Message msg; Value val=new Value(1); if(receiver == null) { log.error("UnicastTest.sendMessages(): receiver is null, cannot send messages"); return; ...
public JChannel(String properties) throws ChannelException { this(ConfiguratorFactory.getStackConfigurator(properties));
public JChannel() throws ChannelException { this(DEFAULT_PROTOCOL_STACK);
public JChannel(String properties) throws ChannelException { this(ConfiguratorFactory.getStackConfigurator(properties)); }
} else if (entry != null && entry.isScheduledForDeletion() && entry.isDirectory()) { if (force) {
} else if (entry != null && entry.isScheduledForDeletion()) { if (force && !recursive) { SVNEntry parentEntry; if (!"".equals(targetName)) { parentEntry = dir.getEntries().getEntry("", false); } else { File parentFile = targetFile.getParentFile(); SVNWCAccess parentAccess = SVNWCAccess.create(parentFile); parentEntry ...
public static SVNCommitItem[] harvestCommitables(SVNWCAccess baseAccess, Collection paths, Map lockTokens, boolean justLocked, boolean recursive, boolean force) throws SVNException { Map commitables = new TreeMap(); Collection danglers = new HashSet(); Iterator targets = p...
} else if (common.equals(path2)) { paths[j] = null;
public static String condencePaths(String[] paths, Collection condencedPaths, boolean removeRedundantPaths) { if (paths == null || paths.length == 0) { return null; } if (paths.length == 1) { return paths[0]; } String rootPath = paths[0]; for (int i = ...
public SVNDirectory addDirectory(String path, File file, boolean recursive, boolean lock) throws SVNException { if (myDirectories != null) { SVNDirectory dir = new SVNDirectory(this, path, file); if (myDirectories.put(path, dir) == null && lock && !dir.isLocked()) { dir.lock(); } if (recursive) { File[] dirs = file.lis...
public SVNDirectory addDirectory(String path, File file) throws SVNException { return addDirectory(path, file, false, false);
public SVNDirectory addDirectory(String path, File file, boolean recursive, boolean lock) throws SVNException { if (myDirectories != null) { SVNDirectory dir = new SVNDirectory(this, path, file); if (myDirectories.put(path, dir) == null && lock && !dir.isLocked()) { ...
public void handleCommitPath(String commitPath, ISVNEditor commitEditor) throws SVNException;
public boolean handleCommitPath(String commitPath, ISVNEditor commitEditor) throws SVNException;
public void handleCommitPath(String commitPath, ISVNEditor commitEditor) throws SVNException;
if (!isRoot[0] && versionedDir.equals(status.getFile())) {
if (versionedDir.equals(status.getFile())) { isRoot[0] = false;
public static boolean isWorkingCopyRoot(final File versionedDir, final boolean considerExternalAsRoot) { if (versionedDir == null || !SVNWCAccess.isVersionedDirectory(versionedDir)) { // unversioned. return false; } // call status of parent instead: if (versionedDir...
isRoot[0] = false;
public static boolean isWorkingCopyRoot(final File versionedDir, final boolean considerExternalAsRoot) { if (versionedDir == null || !SVNWCAccess.isVersionedDirectory(versionedDir)) { // unversioned. return false; } // call status of parent instead: if (versionedDir...
} else { isRoot[0] = false; }
}
public static boolean isWorkingCopyRoot(final File versionedDir, final boolean considerExternalAsRoot) { if (versionedDir == null || !SVNWCAccess.isVersionedDirectory(versionedDir)) { // unversioned. return false; } // call status of parent instead: if (versionedDir...
public static String encode(String source) { StringBuffer sb = new StringBuffer(); encode(source, sb); return sb.toString();
private static void encode(String urlPart, StringBuffer dst) { for(StringTokenizer tokens = new StringTokenizer(urlPart, " /+", true); tokens.hasMoreTokens();) { String token = tokens.nextToken(); if (" ".equals(token)) { dst.append("%20"); } else if ("+".equals(token)) { dst.append("+"); } else if ("/".equals(token)) ...
public static String encode(String source) { StringBuffer sb = new StringBuffer(); encode(source, sb); return sb.toString(); }
SVNDebugLog.log(e);
SVNDebugLog.logInfo(e);
public void run(final PrintStream out, PrintStream err) throws SVNException { boolean error = false; SVNDiffClient differ = getClientManager().getDiffClient(); File userDir = new File(".").getAbsoluteFile().getParentFile(); differ.getDiffGenerator().setBasePath(userDir); boolean u...
public FileOrURL(String name) throws FileNotFoundException, MapyrusException
public FileOrURL(String name) throws IOException, MapyrusException
public FileOrURL(String name) throws FileNotFoundException, MapyrusException { InputStream in; try { /* * First try opening as an URL. */ mURL = new URL(name); try { in = mURL.openStream(); } catch (IOException e) { /* * The IOException error message is not very helpful. Throw our own...
mInputStream = new BufferedInputStream(in); mReader = new LineNumberReader(new InputStreamReader(in));
public FileOrURL(String name) throws FileNotFoundException, MapyrusException { InputStream in; try { /* * First try opening as an URL. */ mURL = new URL(name); try { in = mURL.openStream(); } catch (IOException e) { /* * The IOException error message is not very helpful. Throw our own...
FileInputStream f = new FileInputStream(name); mInputStream = new BufferedInputStream(f); mReader = new LineNumberReader(new InputStreamReader(f));
in = new FileInputStream(name);
public FileOrURL(String name) throws FileNotFoundException, MapyrusException { InputStream in; try { /* * First try opening as an URL. */ mURL = new URL(name); try { in = mURL.openStream(); } catch (IOException e) { /* * The IOException error message is not very helpful. Throw our own...
boolean isGzipped = name.endsWith(".gz") || name.endsWith(".GZ"); boolean isZipped = name.endsWith(".zip") || name.endsWith(".ZIP"); if (isGzipped) mInputStream = new BufferedInputStream(new GZIPInputStream(in)); else if (isZipped) mInputStream = new BufferedInputStream(new ZipInputStream(in)); else mInputStream = new...
public FileOrURL(String name) throws FileNotFoundException, MapyrusException { InputStream in; try { /* * First try opening as an URL. */ mURL = new URL(name); try { in = mURL.openStream(); } catch (IOException e) { /* * The IOException error message is not very helpful. Throw our own...
delete();
public void run(SVNLogRunner runner) throws SVNException { if (!myFile.exists()) { return; } BufferedReader reader = null; Collection commands = new ArrayList(); try { reader = new BufferedReader(new FileReader(myFile)); String line; Map...
}
} finally { if (reader != null) { try { reader.close(); } catch (IOException e) { } } } System.out.println("command count: " + commands.size());
public void run(SVNLogRunner runner) throws SVNException { if (!myFile.exists()) { return; } BufferedReader reader = null; Collection commands = new ArrayList(); try { reader = new BufferedReader(new FileReader(myFile)); String line; Map...
delete();
public void run(SVNLogRunner runner) throws SVNException { if (!myFile.exists()) { return; } BufferedReader reader = null; Collection commands = new ArrayList(); try { reader = new BufferedReader(new FileReader(myFile)); String line; Map...
} SVNFileUtil.rename(myTmpFile, myFile); SVNFileUtil.setReadonly(myFile, true);
}
public void save() throws SVNException { OutputStream os = null; try { os = new FileOutputStream(myTmpFile); for (Iterator commands = myCache.iterator(); commands.hasNext();) { Map command = (Map) commands.next(); String name = (String) command.remo...
try { SVNFileUtil.rename(myTmpFile, myFile); SVNFileUtil.setReadonly(myFile, true); } catch (IOException e) { SVNErrorManager.error(0, e); }
public void save() throws SVNException { OutputStream os = null; try { os = new FileOutputStream(myTmpFile); for (Iterator commands = myCache.iterator(); commands.hasNext();) { Map command = (Map) commands.next(); String name = (String) command.remo...
reason.printStackTrace();
DebugLog.error(reason);
public static void error(int errorCode, Throwable reason) throws SVNException { // if reason already svn exception - prepend one more error and re-throw. if (reason != null) { reason.printStackTrace(); } throw reason != null ? new SVNException(reason) : new SVNException(); ...
if (entries.getEntry(fileName) == null) { entries.addEntry(fileName); }
public void runCommand(SVNDirectory dir, String name, Map attributes) throws SVNException { if (SVNLog.DELETE_ENTRY.equals(name)) { String fileName = (String) attributes.get(SVNLog.NAME_ATTR); dir.destroy(fileName, true); } else if (SVNLog.MODIFY_ENTRY.equals(name)) { ...