headerLength = p - _ptr;
_ptr = p;
-
- if (sourceViewOffset != 0) {
- cout << "sourceViewOffset:" << sourceViewOffset << endl;
- }
}
bool apply(std::vector<char>& output, std::istream& source)
while (_ptr < pEnd) {
int op = ((*_ptr >> 6) & 0x3);
if (op >= 3) {
- std::cerr << "weird opcode" << endl;
+ SG_LOG(SG_IO, SG_INFO, "SVNDeltaWindow: bad opcode:" << op);
return false;
}
}
if (length == 0) {
- std::cerr << "malformed stream, 0 length" << std::endl;
+ SG_LOG(SG_IO, SG_INFO, "SVNDeltaWindow: malformed stream, 0 length" << op);
return false;
}
public:
SVNReportParserPrivate(SVNRepository* repo) :
tree(repo),
- status(SVNRepository::NO_ERROR),
+ status(SVNRepository::SVN_NO_ERROR),
parserInited(false),
currentPath(repo->fsBase())
{
void startElement (const char * name, const char** attributes)
{
- if (status != SVNRepository::NO_ERROR) {
+ if (status != SVNRepository::SVN_NO_ERROR) {
return;
}
void endElement (const char * name)
{
- if (status != SVNRepository::NO_ERROR) {
+ if (status != SVNRepository::SVN_NO_ERROR) {
return;
}
tagStack.pop_back();
if (!strcmp(name, SVN_TXDELTA_TAG)) {
if (!decodeTextDelta(currentPath)) {
- fail(SVNRepository::ERROR_TXDELTA);
+ fail(SVNRepository::SVN_ERROR_TXDELTA);
}
} else if (!strcmp(name, SVN_ADD_FILE_TAG)) {
finishFile(currentDir->addChildFile(currentPath.file()));
} else if (!strcmp(name, SVN_DAV_MD5_CHECKSUM)) {
// validate against (presumably) just written file
if (decodedFileMd5 != md5Sum) {
- fail(SVNRepository::ERROR_CHECKSUM);
+ fail(SVNRepository::SVN_ERROR_CHECKSUM);
}
} else if (!strcmp(name, SVN_OPEN_DIRECTORY_TAG)) {
if (currentDir->parent()) {
void data (const char * s, int length)
{
- if (status != SVNRepository::NO_ERROR) {
+ if (status != SVNRepository::SVN_NO_ERROR) {
return;
}
SVNRepository::ResultCode
SVNReportParser::innerParseXML(const char* data, int size)
{
- if (_d->status != SVNRepository::NO_ERROR) {
+ if (_d->status != SVNRepository::SVN_NO_ERROR) {
return _d->status;
}
XML_ParserFree(_d->xmlParser);
_d->parserInited = false;
- return SVNRepository::ERROR_XML;
+ return SVNRepository::SVN_ERROR_XML;
} else if (isEnd) {
XML_ParserFree(_d->xmlParser);
_d->parserInited = false;
SVNRepository::ResultCode
SVNReportParser::parseXML(const char* data, int size)
{
- if (_d->status != SVNRepository::NO_ERROR) {
+ if (_d->status != SVNRepository::SVN_NO_ERROR) {
return _d->status;
}
SVNRepository::ResultCode SVNReportParser::finishParse()
{
- if (_d->status != SVNRepository::NO_ERROR) {
+ if (_d->status != SVNRepository::SVN_NO_ERROR) {
return _d->status;
}
SVNRepoPrivate(SVNRepository* parent) :
p(parent),
isUpdating(false),
- status(SVNRepository::NO_ERROR)
+ status(SVNRepository::SVN_NO_ERROR)
{ ; }
SVNRepository* p; // link back to outer
if (responseCode() == 207) {
// fine
} else if (responseCode() == 404) {
- _repo->propFindFailed(this, SVNRepository::ERROR_NOT_FOUND);
+ _repo->propFindFailed(this, SVNRepository::SVN_ERROR_NOT_FOUND);
} else {
SG_LOG(SG_IO, SG_WARN, "request for:" << url() <<
" return code " << responseCode());
- _repo->propFindFailed(this, SVNRepository::ERROR_SOCKET);
+ _repo->propFindFailed(this, SVNRepository::SVN_ERROR_SOCKET);
}
}
_repo->svnUpdateDone();
}
} else if (responseCode() == 404) {
- _repo->updateFailed(this, SVNRepository::ERROR_NOT_FOUND);
+ _repo->updateFailed(this, SVNRepository::SVN_ERROR_NOT_FOUND);
_failed = true;
} else {
SG_LOG(SG_IO, SG_WARN, "SVN: request for:" << url() <<
" return code " << responseCode());
- _repo->updateFailed(this, SVNRepository::ERROR_SOCKET);
+ _repo->updateFailed(this, SVNRepository::SVN_ERROR_SOCKET);
_failed = true;
}
}
void SVNRepository::update()
{
- _d->status = NO_ERROR;
+ _d->status = SVN_NO_ERROR;
if (_d->targetRevision.empty() || _d->vccUrl.empty()) {
_d->isUpdating = true;
PropFindRequest* pfr = new PropFindRequest(_d.get());
bool SVNRepository::isDoingSync() const
{
- if (_d->status != NO_ERROR) {
+ if (_d->status != SVN_NO_ERROR) {
return false;
}
void SVNRepoPrivate::propFindFailed(HTTP::Request *req, SVNRepository::ResultCode err)
{
- if (err != SVNRepository::ERROR_NOT_FOUND) {
+ if (err != SVNRepository::SVN_ERROR_NOT_FOUND) {
SG_LOG(SG_IO, SG_WARN, "PropFind failed for:" << req->url());
}