rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
} finally { try { wcAccess.close(true, true); } catch (SVNException e) { e.printStackTrace(); }
public static void main(String[] args) { ISVNReporter r = new ISVNReporter() { public void setPath(String path, String lockToken, long revision, boolean startEmpty) throws SVNException { System.out.println("set-path '" + path + "' : " + revision); } ...
System.out.println("Restored: " + event.getPath());
System.out.println("event: " + event.getPath());
public void svnEvent(SVNEvent event) { System.out.println("Restored: " + event.getPath()); System.out.println("Full Path: " + event.getFile().getAbsolutePath()); }
SVNEntry targetEntry = targetEntries.getEntry(myWCAccess.getTargetName());
SVNEntry targetEntry = anchorEntries.getEntry(myWCAccess.getTargetName());
public void report(ISVNReporter reporter) throws SVNException { SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = targetEntries.getEntry(myWCAccess.getTargetName()); try { ...
long revision = targetEntries.getEntry("").getRevision();
long revision = anchorEntries.getEntry("").getRevision();
public void report(ISVNReporter reporter) throws SVNException { SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = targetEntries.getEntry(myWCAccess.getTargetName()); try { ...
!myWCAccess.getTarget().getFile(myWCAccess.getTargetName()).exists();
!myWCAccess.getAnchor().getFile(myWCAccess.getTargetName()).exists();
public void report(ISVNReporter reporter) throws SVNException { SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = targetEntries.getEntry(myWCAccess.getTargetName()); try { ...
reportEntries(reporter, myWCAccess.getTarget(), myWCAccess.getTargetName(), targetEntry.isIncomplete(), myIsRecursive);
reportEntries(reporter, myWCAccess.getAnchor(), myWCAccess.getTargetName(), targetEntry.isIncomplete(), myIsRecursive);
public void report(ISVNReporter reporter) throws SVNException { SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = targetEntries.getEntry(myWCAccess.getTargetName()); try { ...
restoreFile(myWCAccess.getTarget(), targetEntry.getName());
restoreFile(myWCAccess.getAnchor(), targetEntry.getName());
public void report(ISVNReporter reporter) throws SVNException { SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = targetEntries.getEntry(myWCAccess.getTargetName()); try { ...
th.printStackTrace();
public void report(ISVNReporter reporter) throws SVNException { SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = targetEntries.getEntry(myWCAccess.getTargetName()); try { ...
DebugLog.log("creating wc for " + file); DebugLog.log("anchor " + anchor); DebugLog.log("target " + target); DebugLog.log("parent file " + parentFile);
public static SVNWCAccess create(File file) throws SVNException { File parentFile = file.getParentFile(); String name = file.getName(); try { if (file.exists()) { name = file.getCanonicalFile().getName(); } } catch (IOException e) { } if...
SVNCommitEditor editor = new SVNCommitEditor(this, myConnection, mediator, new Runnable() {
return new SVNCommitEditor(this, myConnection, mediator, new Runnable() {
public ISVNEditor getCommitEditor(String logMessage, Map locks, boolean keepLocks, final ISVNWorkspaceMediator mediator) throws SVNException { try { openConnection(); if (locks != null) { write("(w(s(*l)w))", new Object[] { "commit", logMessage, locks, Boolean.valueOf(kee...
return editor;
public ISVNEditor getCommitEditor(String logMessage, Map locks, boolean keepLocks, final ISVNWorkspaceMediator mediator) throws SVNException { try { openConnection(); if (locks != null) { write("(w(s(*l)w))", new Object[] { "commit", logMessage, locks, Boolean.valueOf(kee...
fileRevision = null;
public int getFileRevisions(String path, long sRevision, long eRevision, ISVNFileRevisionHandler handler) throws SVNException { Long srev = getRevisionObject(sRevision); Long erev = getRevisionObject(eRevision); int count = 0; try { openConnection(); Object[] buffer...
try { while (true) {
while (true) { try {
public int getLocations(String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler) throws SVNException { assertValidRevision(pegRevision); for (int i = 0; i < revisions.length; i++) { assertValidRevision(revisions[i]); } int count = 0; try { ...
count++; if (handler != null) { long revision = SVNReader.getLong(buffer, 0); String location = SVNReader.getString(buffer, 1); if (location != null) { handler.handleLocationEntry(new SVNLocationEntry(revision, location)); }
} catch (SVNException e) { break; } count++; if (handler != null) { long revision = SVNReader.getLong(buffer, 0); String location = SVNReader.getString(buffer, 1); if (location != null) { handler.handleLocationEntry(new SVNLocationEntry(revision, location));
public int getLocations(String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler) throws SVNException { assertValidRevision(pegRevision); for (int i = 0; i < revisions.length; i++) { assertValidRevision(revisions[i]); } int count = 0; try { ...
} catch (SVNException e) { read("x", buffer);
public int getLocations(String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler) throws SVNException { assertValidRevision(pegRevision); for (int i = 0; i < revisions.length; i++) { assertValidRevision(revisions[i]); } int count = 0; try { ...
read("x", buffer);
public int getLocations(String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler) throws SVNException { assertValidRevision(pegRevision); for (int i = 0; i < revisions.length; i++) { assertValidRevision(revisions[i]); } int count = 0; try { ...
String[] realTargetPaths = new String[targetPaths.length]; for (int i = 0; i < realTargetPaths.length; i++) { realTargetPaths[i] = getRepositoryPath(targetPaths[i]); } Object[] buffer = new Object[] { "log", realTargetPaths, getRevisionObject(startRevision), getRevisionObject(endRevision),
Object[] buffer = new Object[] { "log", getRepositoryPaths(targetPaths), getRevisionObject(startRevision), getRevisionObject(endRevision),
public int log(String[] targetPaths, long startRevision, long endRevision, boolean changedPaths, boolean strictNode, ISVNLogEntryHandler handler) throws SVNException { int count = 0; try { openConnection(); String[] realTargetPaths = new String[targetPaths.length]; ...
myConnection.open(this); authenticate();
try { myConnection.open(this); authenticate(); } finally { myRealm = myConnection.getRealm(); }
private void openConnection() throws SVNException { lock(); ISVNConnector connector = SVNRepositoryFactoryImpl.getConnectorFactory().createConnector(this); myConnection = new SVNConnection(connector); myConnection.open(this); authenticate(); }
if (bitstream != null)
if (!isWithdrawn)
protected void doDSGet(Context context, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { Bitstream bitstream = null; // Get the ID from the URL String idString = request.getPathInfo(); ...
log.info(LogManager.getHeader(context, "view_bitstream",
if (bitstream != null) { log.info(LogManager.getHeader(context, "view_bitstream",
protected void doDSGet(Context context, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { Bitstream bitstream = null; // Get the ID from the URL String idString = request.getPathInfo(); ...
Utils.bufferedCopy(is, response.getOutputStream()); is.close(); response.getOutputStream().flush();
Utils.bufferedCopy(is, response.getOutputStream()); is.close(); response.getOutputStream().flush(); } else { log.info(LogManager.getHeader(context, "view_bitstream", "invalid_bitstream_id=" + idString)); JSPManager.showInvalidIDError(request, response, idString, Constants.BITSTREAM); }
protected void doDSGet(Context context, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { Bitstream bitstream = null; // Get the ID from the URL String idString = request.getPathInfo(); ...
log.info(LogManager.getHeader(context, "view_bitstream", "invalid_bitstream_id=" + idString)); JSPManager.showInvalidIDError(request, response, idString, Constants.BITSTREAM);
log.info(LogManager.getHeader(context, "view_bitstream", "item has been withdrawn")); JSPManager.showJSP(request, response, "/tombstone.jsp");
protected void doDSGet(Context context, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { Bitstream bitstream = null; // Get the ID from the URL String idString = request.getPathInfo(); ...
public DAVResource(ISVNWorkspaceMediator mediator, DAVConnection connection, String path, long revision, boolean isCopy) { myPath = path; myMediator = mediator; myURL = PathUtil.append(connection.getLocation().getPath(), path); if (myURL.endsWith("/")) { myURL = PathUtil.removeTrailingSlash(myURL); } myRevision = revis...
public DAVResource(ISVNWorkspaceMediator mediator, DAVConnection connection, String path, long revision) { this(mediator, connection, path, revision, false);
public DAVResource(ISVNWorkspaceMediator mediator, DAVConnection connection, String path, long revision, boolean isCopy) { myPath = path; myMediator = mediator; myURL = PathUtil.append(connection.getLocation().getPath(), path); if (myURL.endsWith("/")) { myURL = PathUtil.remov...
myVURL = myMediator.getWorkspaceProperty(myPath, "svn:wc:ra_dav:version-url");
myVURL = myMediator.getWorkspaceProperty(PathUtil.decode(myPath), "svn:wc:ra_dav:version-url");
public String getVersionURL() throws SVNException { // do fetch from server if empty... if (myVURL == null) { if (myMediator != null) { myVURL = myMediator.getWorkspaceProperty(myPath, "svn:wc:ra_dav:version-url"); DebugLog.log("cached vURL for " + myPath + " :...
throw new ResourceException("not yet implemented");
Iterator i = connectionSet.iterator(); while (i.hasNext()) { FBManagedConnection mc = (FBManagedConnection)i.next(); if (mc.matches(subject, (FBConnectionRequestInfo)cxRequestInfo)) { return mc; } } return null;
public ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException { ...
if (returnDbHandle(db) == 0) {
if ((db != null) && (returnDbHandle(db) == 0)) {
synchronized void releaseDbHandle(isc_db_handle db) throws GDSException { if (returnDbHandle(db) == 0) { dbHandleUsage.remove(db); freeDbHandles.remove(db); gds.isc_detach_database(db); } }
freeDbHandles.addLast(db); return useDbHandle(db, -1);
if (db != null) { freeDbHandles.addLast(db); return useDbHandle(db, -1); } else { return 0; }
synchronized int returnDbHandle(isc_db_handle db) { freeDbHandles.addLast(db); return useDbHandle(db, -1); }
Integer i = (Integer)dbHandleUsage.get(db); if (i == null) { System.out.println("db handle not found in Usage map: " + db); return 1; }
int useDbHandle(isc_db_handle db, int inc) { synchronized(dbHandleUsage) { int count = ((Integer)dbHandleUsage.get(db)).intValue(); dbHandleUsage.put(db, new Integer(count + inc)); return count + inc; } }
FSRevisionNode newRoot = revNodesPool.getRootRevisionNode(revNum, reposRootDir); changedPaths = detectChanged(reposRootDir, revNodesPool, FSRoot.createRevisionRoot(revNum, newRoot));
FSRoot root = FSRoot.createRevisionRoot(revNum, null); changedPaths = detectChanged(reposRootDir, revNodesPool, root);
public static void sendChangeRev(File reposRootDir, FSRevisionNodePool revNodesPool, long revNum, boolean discoverChangedPaths, ISVNLogEntryHandler handler) throws SVNException { Map revisionProps = FSRepositoryUtil.getRevisionProperties(reposRootDir, revNum); Map changedPaths = null; St...
case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg();
case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.SUSPECT: suspected_mbr=(Address)evt.getArg(); if(suspected_mbr == null) { if(log.isErrorEnabled()) log.error("suspected member is null"); return; } suspect(suspected_mbr); return; case Event.MSG: msg=(Message)evt.getArg(); obj=msg.getH...
public void up(Event evt) { Address suspected_mbr; Message msg, rsp; Object obj; VerifyHeader hdr; switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.SUSPECT: // it all star...
case Event.SUSPECT: suspected_mbr=(Address)evt.getArg(); if(suspected_mbr == null) { if(log.isErrorEnabled()) log.error("suspected member is null");
hdr=(VerifyHeader)msg.removeHeader(name); switch(hdr.type) { case VerifyHeader.ARE_YOU_DEAD: if(hdr.from == null) { if(log.isErrorEnabled()) log.error("ARE_YOU_DEAD: hdr.from is null"); } else { for(int i=0; i < num_msgs; i++) { rsp=new Message(hdr.from, null, null); rsp.putHeader(name, new VerifyHeader(VerifyHeader.I_...
public void up(Event evt) { Address suspected_mbr; Message msg, rsp; Object obj; VerifyHeader hdr; switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.SUSPECT: // it all star...
suspect(suspected_mbr); return; case Event.MSG: msg=(Message)evt.getArg(); obj=msg.getHeader(name); if(obj == null || !(obj instanceof VerifyHeader)) break; hdr=(VerifyHeader)msg.removeHeader(name); switch(hdr.type) { case VerifyHeader.ARE_YOU_DEAD: if(hdr.from == null) if(log.isErrorEnabled()) log.error("ARE_YOU_DEA...
unsuspect(hdr.from);
public void up(Event evt) { Address suspected_mbr; Message msg, rsp; Object obj; VerifyHeader hdr; switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.SUSPECT: // it all star...
} return;
public void up(Event evt) { Address suspected_mbr; Message msg, rsp; Object obj; VerifyHeader hdr; switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.SUSPECT: // it all star...
log.debug("InsertCount: " + insCount); log.debug("UpdateCount: " + updCount); log.debug("DeleteCount: " + delCount); log.debug("returning: " + resCount);
if (log!=null) { log.debug("InsertCount: " + insCount); log.debug("UpdateCount: " + updCount); log.debug("DeleteCount: " + delCount); log.debug("returning: " + resCount); }
public int getUpdateCount() throws SQLException { if (isResultSet) return -1; else { try { SqlInfo i = c.getSqlInfo(fixedStmt); int insCount = i.getInsertCount(); int updCount = i.getUpdateCount(); int delCount = i.getD...
myResponse.setHref(cdata.toString().trim());
myResponse.setHref(cdata.toString());
protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) { if (element == DAVElement.HREF) { if (parent == DAVElement.RESPONSE) { myResponse.setHref(cdata.toString().trim()); } else { myResponse.putPropertyValue(parent, cdata.toStri...
myResponse.putPropertyValue(parent, cdata.toString().trim());
myResponse.putPropertyValue(parent, cdata.toString());
protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) { if (element == DAVElement.HREF) { if (parent == DAVElement.RESPONSE) { myResponse.setHref(cdata.toString().trim()); } else { myResponse.putPropertyValue(parent, cdata.toStri...
myResponse.setStatus(DAVStatus.parse(cdata.toString().trim()));
myResponse.setStatus(DAVStatus.parse(cdata.toString()));
protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) { if (element == DAVElement.HREF) { if (parent == DAVElement.RESPONSE) { myResponse.setHref(cdata.toString().trim()); } else { myResponse.putPropertyValue(parent, cdata.toStri...
myResponse.putPropertyValue(element, cdata.toString().trim());
myResponse.putPropertyValue(element, cdata.toString());
protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) { if (element == DAVElement.HREF) { if (parent == DAVElement.RESPONSE) { myResponse.setHref(cdata.toString().trim()); } else { myResponse.putPropertyValue(parent, cdata.toStri...
protected abstract void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException;
public void endElement(String uri, String localName, String qName) throws SAXException { myParent.pop(); DAVElement element = getDAVElement(qName); try { endElement(getParent(), element, myCDATA); } catch(SVNException e) { SVNDebugLog.logInfo(e); throw new SAXException(e); } myCDATA = null; }
protected abstract void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException;
if (href != null && href.length() > 0 && href.charAt(href.length() - 1) == '/') { href = href.substring(0, href.length() - 1); }
public void setHref(String href) { myHref = href; }
protected abstract void startElement(DAVElement parent, DAVElement element, Attributes attrs) throws SVNException;
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { DAVElement element = getDAVElement(qName); try { startElement(getParent(), element, attributes); } catch(SVNException e) { SVNDebugLog.logInfo(e); throw new SAXException(e); } myParent.push(element); myCDAT...
protected abstract void startElement(DAVElement parent, DAVElement element, Attributes attrs) throws SVNException;
log.error(ex);
System.err.println(ex);
public static void main(String[] args) { Hashtable ht; int i; byte[] buf; boolean use_replicated_hashtable=false, debug=false, cummulative=false; Debugger debugger=null; /* String props="UDP(mcast_addr=224.0.0.36;mcast_port=55566;ip_ttl=32;" + "...
public ReplicatedHashtable(String groupname, ChannelFactory factory, String properties, long state_timeout) { this(groupname, factory, null, properties, state_timeout);
public ReplicatedHashtable(String groupname, ChannelFactory factory, StateTransferListener l, String properties, long state_timeout) { if(l != null) addStateTransferListener(l); try { channel=factory != null ? factory.createChannel(properties) : new JChannel(properties); channel.connect(groupname); adapter=new PullPush...
public ReplicatedHashtable(String groupname, ChannelFactory factory, String properties, long state_timeout) { this(groupname, factory, null, properties, state_timeout); }
public void installView(View new_view) { Address coord; int rc; ViewId vid=new_view.getVid(); Vector mbrs=new_view.getMembers(); if(log.isDebugEnabled()) log.debug("[local_addr=" + local_addr + "] view is " + new_view); if(stats) { num_views++; prev_views.add(new_view); } if(view_id != null) { rc=vid.compareTo(view_...
public void installView(View new_view, Digest digest) { if(digest != null) mergeDigest(digest); installView(new_view);
public void installView(View new_view) { Address coord; int rc; ViewId vid=new_view.getVid(); Vector mbrs=new_view.getMembers(); if(log.isDebugEnabled()) log.debug("[local_addr=" + local_addr + "] view is " + new_view); if(stats) { num_views++; prev_vi...
public Object getResult(long timeout) {
public Object getResult() {
public Object getResult(long timeout) { try { return getResultWithTimeout(timeout); } catch(TimeoutException e) { return null; } }
return getResultWithTimeout(timeout);
return getResultWithTimeout(0);
public Object getResult(long timeout) { try { return getResultWithTimeout(timeout); } catch(TimeoutException e) { return null; } }
log.error("Could not create channel, exiting ....");
System.err.println("Could not create channel, exiting ....");
public TotalTokenDemo(String props) { super(); tabbedPane = new JTabbedPane(); control = new ControlPanel(); channelProperties = props; try { channel = new JChannel(channelProperties); } catch (ChannelException e) { log.error("C...
System.out.println("-- events: " + events); assertEquals("we should have a BLOCK and an UNBLOCK event", 2, num_events);
System.out.println("-- receiver: " + events); assertEquals("we should have a BLOCK, UNBLOCK, BLOCK, UNBLOCK sequence", 4, num_events);
public void testBlockPush() throws Exception { c1=factory.createMultiplexerChannel(STACK_NAME, "service-1"); c1.setOpt(Channel.BLOCK, Boolean.TRUE); MyReceiver receiver=new MyReceiver(); c1.setReceiver(receiver); c1.connect("bla"); c2=factory2.createMultiplexerChannel(STACK...
events=receiver2.getEvents(); num_events=events.size(); System.out.println("-- events: " + events);
public void testBlockPush() throws Exception { c1=factory.createMultiplexerChannel(STACK_NAME, "service-1"); c1.setOpt(Channel.BLOCK, Boolean.TRUE); MyReceiver receiver=new MyReceiver(); c1.setReceiver(receiver); c1.connect("bla"); c2=factory2.createMultiplexerChannel(STACK...
public void setMultiplexerConfig(String properties) throws Exception {
public void setMultiplexerConfig(Object properties) throws Exception {
public void setMultiplexerConfig(String properties) throws Exception { InputStream input=ConfiguratorFactory.getConfigStream(properties); if(input == null) throw new FileNotFoundException(properties); try { parse(input); this.config=properties; } c...
throw new FileNotFoundException(properties);
throw new FileNotFoundException(properties.toString());
public void setMultiplexerConfig(String properties) throws Exception { InputStream input=ConfiguratorFactory.getConfigStream(properties); if(input == null) throw new FileNotFoundException(properties); try { parse(input); this.config=properties; } c...
this.config=properties;
public void setMultiplexerConfig(String properties) throws Exception { InputStream input=ConfiguratorFactory.getConfigStream(properties); if(input == null) throw new FileNotFoundException(properties); try { parse(input); this.config=properties; } c...
public DAVCommitEditor(DAVRepository repository, DAVConnection connection, String message, Map locks, ISVNWorkspaceMediator mediator, Runnable closeCallback) {
public DAVCommitEditor(DAVRepository repository, DAVConnection connection, String message, ISVNWorkspaceMediator mediator, Runnable closeCallback) {
public DAVCommitEditor(DAVRepository repository, DAVConnection connection, String message, Map locks, ISVNWorkspaceMediator mediator, Runnable closeCallback) { myConnection = connection; myLogMessage = message; myLocation = repository.getLocation(); myRepository = repository; myCloseCa...
myLocks = locks;
public DAVCommitEditor(DAVRepository repository, DAVConnection connection, String message, Map locks, ISVNWorkspaceMediator mediator, Runnable closeCallback) { myConnection = connection; myLogMessage = message; myLocation = repository.getLocation(); myRepository = repository; myCloseCa...
myFilesMap = new HashMap();
public DAVCommitEditor(DAVRepository repository, DAVConnection connection, String message, Map locks, ISVNWorkspaceMediator mediator, Runnable closeCallback) { myConnection = connection; myLogMessage = message; myLocation = repository.getLocation(); myRepository = repository; myCloseCa...
if (myCurrentFile != null) { myCurrentFile.dispose(); myCurrentFile = null;
if (myFilesMap != null) { for (Iterator files = myFilesMap.values().iterator(); files.hasNext();) { DAVResource file = (DAVResource) files.next(); file.dispose(); } myFilesMap = null;
public void abortEdit() throws SVNException { // DELETE activity if (myActivity != null) { myConnection.doDelete(myActivity); } // dispose all resources! if (myCurrentFile != null) { myCurrentFile.dispose(); myCurrentFile = null; } fo...
DAVResource newFile = new DAVResource(myCommitMediator, myConnection, path, -1);
DAVResource newFile = new DAVResource(myCommitMediator, myConnection, path, -1, copyPath != null);
public void addFile(String path, String copyPath, long copyRevision) throws SVNException { path = PathUtil.encode(path); // checkout parent collection. DAVResource parentResource = (DAVResource) myDirsStack.peek(); if (parentResource.getWorkingURL() == null) { String filePath = P...
myCurrentFile = newFile; myPathsMap.put(myCurrentFile.getURL(), myCurrentFile.getPath());
myPathsMap.put(newFile.getURL(), newFile.getPath()); myFilesMap.put(path, newFile);
public void addFile(String path, String copyPath, long copyRevision) throws SVNException { path = PathUtil.encode(path); // checkout parent collection. DAVResource parentResource = (DAVResource) myDirsStack.peek(); if (parentResource.getWorkingURL() == null) { String filePath = P...
public void applyTextDelta(String baseChecksum) throws SVNException {
public void applyTextDelta(String path, String baseChecksum) throws SVNException {
public void applyTextDelta(String baseChecksum) throws SVNException { // just do nothing. }
public void changeFileProperty(String name, String value) throws SVNException { myCurrentFile.putProperty(name, value);
public void changeFileProperty(String path, String name, String value) throws SVNException { DAVResource currentFile = (DAVResource) myFilesMap.get(path); currentFile.putProperty(name, value);
public void changeFileProperty(String name, String value) throws SVNException { myCurrentFile.putProperty(name, value); }
public void closeFile(String textChecksum) throws SVNException {
public void closeFile(String path, String textChecksum) throws SVNException {
public void closeFile(String textChecksum) throws SVNException { // do PUT of delta if there was one (diff window + temp file). // do subsequent PUT of all diff windows... try { for(int i = 0; i < myCurrentFile.getDeltaCount(); i++) { try { InputStre...
for(int i = 0; i < myCurrentFile.getDeltaCount(); i++) {
if (currentFile.isAdded() && currentFile.getDeltaCount() == 0) { OutputStream os = textDeltaChunk(path, SVNDiffWindowBuilder.createReplacementDiffWindow(0));
public void closeFile(String textChecksum) throws SVNException { // do PUT of delta if there was one (diff window + temp file). // do subsequent PUT of all diff windows... try { for(int i = 0; i < myCurrentFile.getDeltaCount(); i++) { try { InputStre...
InputStream data = myCurrentFile.getTextDelta(i); DAVStatus status = myConnection.doPutDiff(myCurrentFile.getURL(), myCurrentFile.getWorkingURL(), data);
os.close(); } catch (IOException e) { throw new SVNException(e); } } for(int i = 0; i < currentFile.getDeltaCount(); i++) { try { InputStream data = currentFile.getTextDelta(i); DAVStatus status = myConnection.doPutDiff(currentFile.getURL(), currentFile.getWorkingURL(), data);
public void closeFile(String textChecksum) throws SVNException { // do PUT of delta if there was one (diff window + temp file). // do subsequent PUT of all diff windows... try { for(int i = 0; i < myCurrentFile.getDeltaCount(); i++) { try { InputStre...
if (myCurrentFile.getProperties() != null) { StringBuffer request = DAVProppatchHandler.generatePropertyRequest(null, myCurrentFile.getProperties()); DebugLog.log("properties request: " + request);
if (currentFile.getProperties() != null) { StringBuffer request = DAVProppatchHandler.generatePropertyRequest(null, currentFile.getProperties());
public void closeFile(String textChecksum) throws SVNException { // do PUT of delta if there was one (diff window + temp file). // do subsequent PUT of all diff windows... try { for(int i = 0; i < myCurrentFile.getDeltaCount(); i++) { try { InputStre...
myConnection.doProppatch(myCurrentFile.getURL(), myCurrentFile.getWorkingURL(), request, null);
myConnection.doProppatch(currentFile.getURL(), currentFile.getWorkingURL(), request, null);
public void closeFile(String textChecksum) throws SVNException { // do PUT of delta if there was one (diff window + temp file). // do subsequent PUT of all diff windows... try { for(int i = 0; i < myCurrentFile.getDeltaCount(); i++) { try { InputStre...
throw new SVNException("At least one property change failed for " + myCurrentFile.getURL());
throw new SVNException("At least one property change failed for " + currentFile.getURL());
public void closeFile(String textChecksum) throws SVNException { // do PUT of delta if there was one (diff window + temp file). // do subsequent PUT of all diff windows... try { for(int i = 0; i < myCurrentFile.getDeltaCount(); i++) { try { InputStre...
myCurrentFile.dispose(); myCurrentFile = null;
currentFile.dispose(); myFilesMap.remove(path);
public void closeFile(String textChecksum) throws SVNException { // do PUT of delta if there was one (diff window + temp file). // do subsequent PUT of all diff windows... try { for(int i = 0; i < myCurrentFile.getDeltaCount(); i++) { try { InputStre...
String location = null; String head = null; DAVStatus status = null;
String location; String head; DAVStatus status;
private String createActivity(String logMessage) throws SVNException { String activity = myConnection.doMakeActivity(); // checkout head... String vcc = (String) DAVUtil.getPropertyValue(myConnection, myLocation.getPath(), null, DAVElement.VERSION_CONTROLLED_CONFIGURATION); Strin...
DAVResource parent = (DAVResource) myDirsStack.peek(); DAVResource directory = new DAVResource(myCommitMediator, myConnection, path, revision, parent.isCopy());
DAVResource parent = myDirsStack.peek() != null ? (DAVResource) myDirsStack.peek() : null; DAVResource directory = new DAVResource(myCommitMediator, myConnection, path, revision, parent == null ? false : parent.isCopy());
public void openDir(String path, long revision) throws SVNException { path = PathUtil.encode(path); // do nothing, DAVResource parent = (DAVResource) myDirsStack.peek(); DAVResource directory = new DAVResource(myCommitMediator, myConnection, path, revision, parent.isCopy()); if ...
myCurrentFile = file; myPathsMap.put(myCurrentFile.getURL(), myCurrentFile.getPath());
myPathsMap.put(file.getURL(), file.getPath()); myFilesMap.put(path, file);
public void openFile(String path, long revision) throws SVNException { path = PathUtil.encode(path); DAVResource file = new DAVResource(myCommitMediator, myConnection, path, revision); DAVResource parent = (DAVResource) myDirsStack.peek(); if (parent.isCopy()) { // part of cop...
public OutputStream textDeltaChunk(SVNDiffWindow diffWindow) throws SVNException {
public OutputStream textDeltaChunk(String path, SVNDiffWindow diffWindow) throws SVNException {
public OutputStream textDeltaChunk(SVNDiffWindow diffWindow) throws SVNException { // save window, create temp file. try { OutputStream os = myCurrentFile.addTextDelta(); SVNDiffWindowBuilder.save(diffWindow, os); return os; } catch (IOException e) { ...
OutputStream os = myCurrentFile.addTextDelta();
OutputStream os = currentFile.addTextDelta();
public OutputStream textDeltaChunk(SVNDiffWindow diffWindow) throws SVNException { // save window, create temp file. try { OutputStream os = myCurrentFile.addTextDelta(); SVNDiffWindowBuilder.save(diffWindow, os); return os; } catch (IOException e) { ...
public void textDeltaEnd() throws SVNException {
public void textDeltaEnd(String path) throws SVNException {
public void textDeltaEnd() throws SVNException { // again do nothing. }
public static StringBuffer generatePropertyRequest(StringBuffer buffer, Map properties) { buffer = buffer == null ? new StringBuffer() : buffer; buffer.append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); buffer.append("<D:propertyupdate xmlns:D=\"DAV:\" xmlns:V=\""); buffer.append(DAVElement.SVN_DAV_PROPERTY_NAMES...
public static StringBuffer generatePropertyRequest(StringBuffer buffer, String name, String value) { Map map = new HashMap(); map.put(name, value); return generatePropertyRequest(buffer, map);
public static StringBuffer generatePropertyRequest(StringBuffer buffer, Map properties) { buffer = buffer == null ? new StringBuffer() : buffer; buffer.append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); buffer.append("<D:propertyupdate xmlns:D=\"DAV:\" xmlns:V=\""); buffer.append(D...
public boolean sendChangedProperties(ISVNEditor editor) throws SVNException;
public boolean sendChangedProperties(String commitPath, ISVNEditor editor) throws SVNException;
public boolean sendChangedProperties(ISVNEditor editor) throws SVNException;
public String generateDelta(ISVNEditor editor) throws SVNException;
public String generateDelta(String commitPath, ISVNEditor editor) throws SVNException;
public String generateDelta(ISVNEditor editor) throws SVNException;
public void save(boolean recursive) throws SVNException;
public void save() throws SVNException;
public void save(boolean recursive) throws SVNException;
DatabaseManager.delete(ourContext, collectionRow);
void delete() throws SQLException, AuthorizeException, IOException { log.info(LogManager.getHeader(ourContext, "delete_collection", "collection_id=" + getID())); // remove from index DSIndexer.unIndexContent(ourContext, this); // Remove from cache o...
WorkflowItem [] wfarray = WorkflowItem.findByCollection(ourContext, this); for( int x = 0; x < wfarray.length; x++ ) { Item myItem = wfarray[x].getItem(); wfarray[x].deleteWrapper(); myItem.delete(); } WorkspaceItem [] wsarray = WorkspaceItem.findByCollection(ourContext, this); for( int x = 0; x < wsarray.length; x+...
void delete() throws SQLException, AuthorizeException, IOException { log.info(LogManager.getHeader(ourContext, "delete_collection", "collection_id=" + getID())); // remove from index DSIndexer.unIndexContent(ourContext, this); // Remove from cache o...
tri.close();
public static WorkspaceItem[] findByCollection(Context context, Collection c) throws SQLException { List wsItems = new ArrayList(); TableRowIterator tri = DatabaseManager.query(context, "workspaceitem", "SELECT workspaceitem.* FROM workspaceitem WHERE " ...
String sql = "SELECT * FROM dctyperegistry WHERE element LIKE \"" + element + "\" AND qualifier";
String sql = "SELECT * FROM dctyperegistry WHERE element LIKE '" + element + "' AND qualifier";
public static DCType findByElement(Context context, String element, String qualifier) throws SQLException { String sql = "SELECT * FROM dctyperegistry WHERE element LIKE \"" + element + "\" AND qualifier"; if (qualifier==null) { sql = sql + "=null;...
sql = sql + " LIKE \"" + qualifier + "\";";
sql = sql + " LIKE '" + qualifier + "';";
public static DCType findByElement(Context context, String element, String qualifier) throws SQLException { String sql = "SELECT * FROM dctyperegistry WHERE element LIKE \"" + element + "\" AND qualifier"; if (qualifier==null) { sql = sql + "=null;...
if (closed) throw new FBSQLException("The resultSet is closed"); if (isBeforeFirst() || isAfterLast()) throw new FBSQLException( "The resultSet is not in a row, use next", FBSQLException.SQL_STATE_NO_ROW_AVAIL); if (columnIndex> xsqlvars.length) throw new FBSQLException( "Invalid column index.", FBSQLException.SQL_ST...
FBField field = getField(columnIndex, true);
public FBField getField(int columnIndex) throws SQLException { if (closed) throw new FBSQLException("The resultSet is closed"); if (isBeforeFirst() || isAfterLast()) throw new FBSQLException( "The resultSet is not in a row, use next", FBSQLExcep...
rows = new ArrayList();
FBCachedFetcher(FBConnection c, FBStatement fbStatement , isc_stmt_handle stmt_handle, FBResultSet rs) throws SQLException { isc_stmt_handle_impl stmt = (isc_stmt_handle_impl) stmt_handle; byte[][] localRow = null; this.fbStatement = fbStatement; this.rs = rs; ...
int rowsCount = 0;
FBCachedFetcher(FBConnection c, FBStatement fbStatement , isc_stmt_handle stmt_handle, FBResultSet rs) throws SQLException { isc_stmt_handle_impl stmt = (isc_stmt_handle_impl) stmt_handle; byte[][] localRow = null; this.fbStatement = fbStatement; this.rs = rs; ...
do { c.fetch(stmt); if (stmt.rows.size() > 0){ rows.addAll(stmt.rows); stmt.rows.clear(); } } while (!stmt.allRowsFetched && (fbStatement.maxRows==0 || rows.size()<fbStatement.maxRows));
int fetchSize = fbStatement.fetchSize; if (fetchSize == 0) fetchSize = MAX_FETCH_ROWS; if (!stmt.allRowsFetched && stmt.size == 0) { do { if (fbStatement.maxRows != 0 && fetchSize > fbStatement.maxRows - stmt.size) fetchSize = fbStatement.maxRows - stmt.size; c.fetch(stmt, fetchSize); if (stmt.size > 0){ rowsSets.add(...
FBCachedFetcher(FBConnection c, FBStatement fbStatement , isc_stmt_handle stmt_handle, FBResultSet rs) throws SQLException { isc_stmt_handle_impl stmt = (isc_stmt_handle_impl) stmt_handle; byte[][] localRow = null; this.fbStatement = fbStatement; this.rs = rs; ...
for (int i=0;i< rows.size(); i++){ localRow = (byte[][]) rows.get(i);
for (int i=0;i< rowsArray.length; i++){ localRow = (byte[][])rowsArray[i];
FBCachedFetcher(FBConnection c, FBStatement fbStatement , isc_stmt_handle stmt_handle, FBResultSet rs) throws SQLException { isc_stmt_handle_impl stmt = (isc_stmt_handle_impl) stmt_handle; byte[][] localRow = null; this.fbStatement = fbStatement; this.rs = rs; ...
if (rows.size()==0)
if (rowsArray.length==0)
FBCachedFetcher(FBConnection c, FBStatement fbStatement , isc_stmt_handle stmt_handle, FBResultSet rs) throws SQLException { isc_stmt_handle_impl stmt = (isc_stmt_handle_impl) stmt_handle; byte[][] localRow = null; this.fbStatement = fbStatement; this.rs = rs; ...
isc_stmt_handle stmt, FBResultSet rs) throws SQLException
isc_stmt_handle stmth, FBResultSet rs) throws SQLException
FBStatementFetcher(FBConnection c, FBStatement fbStatement, isc_stmt_handle stmt, FBResultSet rs) throws SQLException { this.c = c; this.fbStatement = fbStatement; this.stmt = (isc_stmt_handle_impl) stmt; this.rs = rs; c.registerStatement(fbStatement); ...
this.stmt = (isc_stmt_handle_impl) stmt;
this.stmt = (isc_stmt_handle_impl) stmth;
FBStatementFetcher(FBConnection c, FBStatement fbStatement, isc_stmt_handle stmt, FBResultSet rs) throws SQLException { this.c = c; this.fbStatement = fbStatement; this.stmt = (isc_stmt_handle_impl) stmt; this.rs = rs; c.registerStatement(fbStatement); ...
if (stmt.allRowsFetched){ rowsArray = stmt.rows; size = stmt.size; }
FBStatementFetcher(FBConnection c, FBStatement fbStatement, isc_stmt_handle stmt, FBResultSet rs) throws SQLException { this.c = c; this.fbStatement = fbStatement; this.stmt = (isc_stmt_handle_impl) stmt; this.rs = rs; c.registerStatement(fbStatement); ...
public XSQLVARImpl() { this.sqlname = ""; this.relname = ""; this.ownname = ""; this.aliasname = ""; }
XSQLVARImpl( int sqltype, int sqlscale, int sqlsubtype, int sqllen, byte[] sqldata, String sqlname, String relname, String ownname, String aliasname ) { this.sqltype = sqltype; this.sqlscale = sqlscale; this.sqlsubtype = sqlsubtype; this.sqllen = sqllen; this.sqldata = sqldata; this.sqlname = sqlname; this.relname = r...
public XSQLVARImpl() { this.sqlname = ""; this.relname = ""; this.ownname = ""; this.aliasname = ""; }
JavaGDSImpl.calculateBLR(xsqlda); JavaGDSImpl.calculateIOLength(xsqlda);
AbstractJavaGDSImpl.calculateBLR(xsqlda); AbstractJavaGDSImpl.calculateIOLength(xsqlda);
private void writeBlobRecord(GDS gds, IscDbHandle database_handle, byte[] testBuffer) throws Exception { final BlobParameterBuffer blobParameterBuffer = gds.createBlobParameterBuffer(); blobParameterBuffer.addArgument(ISCConstants.isc_bpb_type, ISCConstants.isc_bpb_type_stream); IscBlob...
return DB_SERVER_URL + "/" + DB_SERVER_PORT + ":" + DB_PATH + "/" + name;
if (GDSType.EMBEDDED_STR.equals(System.getProperty("test.gds_type"))) return DB_PATH + "/" + name; else return DB_SERVER_URL + "/" + DB_SERVER_PORT + ":" + DB_PATH + "/" + name;
protected String getdbpath(String name) { return DB_SERVER_URL + "/" + DB_SERVER_PORT + ":" + DB_PATH + "/" + name; }
return (GDSType)typeMap.get(type.toUpperCase());
return (GDSType)getTypeMap().get(type.toUpperCase());
public static GDSType getType(String type) { if (type == null) return null; return (GDSType)typeMap.get(type.toUpperCase()); }
throw ex.getCause();
throw ex.getTargetException();
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { checkCorrectness(method); try { if (method.equals(PREPARED_STATEMENT_CLOSE)) { handleStatementClose(statement, proxy); return Void.TYPE; } else ...
PrintWriter log = ((FBManagedConnection)ce.getSource()).getLogWriter();
PrintWriter externalLog = ((FBManagedConnection)ce.getSource()).getLogWriter();
public void connectionClosed(ConnectionEvent ce) { PrintWriter log = ((FBManagedConnection)ce.getSource()).getLogWriter(); try { ((FBManagedConnection)ce.getSource()).destroy(); } catch (ResourceException e) { if (log != null) log.println("Exception closing unmanage...
if (log != null) log.println("Exception closing unmanaged connection: " + e);
if (externalLog != null) externalLog.println("Exception closing unmanaged connection: " + e);
public void connectionClosed(ConnectionEvent ce) { PrintWriter log = ((FBManagedConnection)ce.getSource()).getLogWriter(); try { ((FBManagedConnection)ce.getSource()).destroy(); } catch (ResourceException e) { if (log != null) log.println("Exception closing unmanage...
PrintWriter log = ((FBManagedConnection)ce.getSource()).getLogWriter();
PrintWriter externalLog = ((FBManagedConnection)ce.getSource()).getLogWriter(); log.info("ConnectionErrorOccurred, ", ce.getException());
public void connectionErrorOccurred(ConnectionEvent ce) { PrintWriter log = ((FBManagedConnection)ce.getSource()).getLogWriter(); try { ((FBManagedConnection)ce.getSource()).destroy(); } catch (ResourceException e) { if (log != null) log.println("Exception closing u...
if (log != null) log.println("Exception closing unmanaged connection: " + e);
log.info("further problems destroying connection: ", e); if (externalLog != null) externalLog.println("Exception closing unmanaged connection: " + e);
public void connectionErrorOccurred(ConnectionEvent ce) { PrintWriter log = ((FBManagedConnection)ce.getSource()).getLogWriter(); try { ((FBManagedConnection)ce.getSource()).destroy(); } catch (ResourceException e) { if (log != null) log.println("Exception closing u...