Hello community,
here is the log from the commit of package kdesvn
checked in at Fri Apr 4 01:32:36 CEST 2008.
--------
--- KDE/kdesvn/kdesvn.changes 2008-02-20 19:32:55.000000000 +0100
+++ /mounts/work_src_done/STABLE/kdesvn/kdesvn.changes 2008-04-03 16:12:09.000000000 +0200
@@ -1,0 +2,8 @@
+Thu Apr 3 16:10:59 CEST 2008 - dmueller@suse.de
+
+- update to 0.14.3:
+ * fixed problems with diff between moved elements
+ * suppress useless messages
+ * fix crash in logviewer
+
+-------------------------------------------------------------------
Old:
----
kdesvn-0.14.2.tar.bz2
New:
----
kdesvn-0.14.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdesvn.spec ++++++
--- /var/tmp/diff_new_pack.U15962/_old 2008-04-04 01:32:06.000000000 +0200
+++ /var/tmp/diff_new_pack.U15962/_new 2008-04-04 01:32:06.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kdesvn (Version 0.14.2)
+# spec file for package kdesvn (Version 0.14.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -17,7 +17,7 @@
License: GPL v2 or later
Group: Development/Tools/Version Control
Summary: KDE Subversion Client
-Version: 0.14.2
+Version: 0.14.3
Release: 1
Source: %name-%version.tar.bz2
Patch: FIXME.diff
@@ -36,6 +36,7 @@
Rajko Albrecht
%package -n libsvnqt4
+License: GPL v2 or later
Summary: KDE Subversion Client
Group: Development/Tools/Version Control
@@ -49,6 +50,7 @@
Rajko Albrecht
%package -n libsvnqt-devel
+License: GPL v2 or later
Summary: KDE Subversion Client
Group: Development/Tools/Version Control
Requires: libsvnqt4 >= %version
@@ -142,6 +144,11 @@
/opt/kde3/%_lib/libsvnqt.so.*
%changelog
+* Thu Apr 03 2008 dmueller@suse.de
+- update to 0.14.3:
+ * fixed problems with diff between moved elements
+ * suppress useless messages
+ * fix crash in logviewer
* Wed Feb 20 2008 stbinner@suse.de
- update to 0.14.2:
* fixed various segfaults
@@ -151,7 +158,7 @@
- update to 0.14.1:
* fixed a crasher when deleting items
* updated frensh and lithuanian translation
-* Mon Nov 05 2007 dmueller@suse.de
+* Tue Nov 06 2007 dmueller@suse.de
- split off development files / library package
* Mon Oct 29 2007 dmueller@suse.de
- fix build for older distributions
++++++ kdesvn-0.14.2.tar.bz2 -> kdesvn-0.14.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/ChangeLog new/kdesvn-0.14.3/ChangeLog
--- old/kdesvn-0.14.2/ChangeLog 2008-02-18 22:36:47.000000000 +0100
+++ new/kdesvn-0.14.3/ChangeLog 2008-03-28 11:54:32.000000000 +0100
@@ -1,3 +1,8 @@
+version 0.14.3
+ * fixed problems with diff between copied/moved elements (#309)
+ * suppress some useless messages (#314)
+ * within some circumstances kdesvn crashed in logviewer
+
version 0.14.2
* fixed a crasher which happens (as example) when opening a folder where the svn-admin-area (eg, the .svn subdir)
is removed
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/CMakeLists.txt new/kdesvn-0.14.3/CMakeLists.txt
--- old/kdesvn-0.14.2/CMakeLists.txt 2008-02-18 22:36:47.000000000 +0100
+++ new/kdesvn-0.14.3/CMakeLists.txt 2008-03-27 18:03:57.000000000 +0100
@@ -60,7 +60,7 @@
SET(_BASE_LDADD "-L${CMAKE_BINARY_DIR}/lib")
# current version
-SET(VERSION 0.14.2)
+SET(VERSION 0.14.3)
SET(KDESVN_VERSION \"${VERSION}\")
CONFIGURE_FILE(kdesvn-config.h.in kdesvn-config.h @ONLY)
Files old/kdesvn-0.14.2/doc/en_index.cache.bz2 and new/kdesvn-0.14.3/doc/en_index.cache.bz2 differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/kdesvn.spec new/kdesvn-0.14.3/kdesvn.spec
--- old/kdesvn-0.14.2/kdesvn.spec 2008-02-18 22:54:14.000000000 +0100
+++ new/kdesvn-0.14.3/kdesvn.spec 2008-03-28 14:01:57.000000000 +0100
@@ -1,6 +1,6 @@
Summary: A subversion client for the KDE with KIO integration.
Name: kdesvn
-Version: 0.14.2
+Version: 0.14.3
Release: 1%{?dist}
License: LGPL
Vendor: Rajko Albrecht
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnfrontend/kdesvnfilelist.cpp new/kdesvn-0.14.3/src/svnfrontend/kdesvnfilelist.cpp
--- old/kdesvn-0.14.2/src/svnfrontend/kdesvnfilelist.cpp 2008-02-18 22:36:47.000000000 +0100
+++ new/kdesvn-0.14.3/src/svnfrontend/kdesvnfilelist.cpp 2008-03-28 09:06:31.000000000 +0100
@@ -2159,7 +2159,7 @@
what = relativePath(kitem);
}
// only possible on working copies - so we may say this values
- m_SvnWrapper->makeDiff(what,svn::Revision::BASE,svn::Revision::WORKING,kitem?kitem->isDir():true);
+ m_SvnWrapper->makeDiff(what,svn::Revision::BASE,svn::Revision::WORKING,svn::Revision::UNDEFINED,kitem?kitem->isDir():true);
}
void kdesvnfilelist::slotSimpleHeadDiff()
@@ -2177,7 +2177,7 @@
what = relativePath(kitem);
}
// only possible on working copies - so we may say this values
- m_SvnWrapper->makeDiff(what,svn::Revision::WORKING,svn::Revision::HEAD,kitem?kitem->isDir():true);
+ m_SvnWrapper->makeDiff(what,svn::Revision::WORKING,svn::Revision::HEAD,svn::Revision::UNDEFINED,kitem?kitem->isDir():true);
}
void kdesvnfilelist::slotDisplayLastDiff()
@@ -2317,7 +2317,8 @@
}
if (dlg->exec()==QDialog::Accepted) {
Rangeinput_impl::revision_range r = rdlg->getRange();
- m_SvnWrapper->makeDiff(what,r.first,r.second,k?k->isDir():true);
+ svn::Revision _peg=(isWorkingCopy()?svn::Revision::WORKING:remoteRevision());
+ m_SvnWrapper->makeDiff(what,r.first,r.second,_peg,k?k->isDir():true);
}
dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"revisions_dlg",false);
delete dlg;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnfrontend/svnactions.cpp new/kdesvn-0.14.3/src/svnfrontend/svnactions.cpp
--- old/kdesvn-0.14.2/src/svnfrontend/svnactions.cpp 2008-02-18 22:36:47.000000000 +0100
+++ new/kdesvn-0.14.3/src/svnfrontend/svnactions.cpp 2008-03-28 11:54:32.000000000 +0100
@@ -974,7 +974,6 @@
bool SvnActions::get(const QString&what,const QString& to,const svn::Revision&rev,const svn::Revision&peg,QWidget*p)
{
- kdDebug()<<"Downloading "<m_ParentList->realWidget());
+ makeDiff(what,start,what,end,_peg,isDir,m_Data->m_ParentList->realWidget());
}
void SvnActions::makeDiff(const QString&p1,const svn::Revision&start,const QString&p2,const svn::Revision&end)
@@ -1012,14 +1011,15 @@
kdDebug()<<"External diff..."<m_ParentList->realWidget(),i18n("Both entries seems to be the same, can not diff."));
return;
}
+ kdDebug()<<"Diff: "<isExternalDiff()) {
kdDebug()<<"External diff 2..."<m_CurrentContext) return;
QByteArray ex;
@@ -1132,15 +1134,23 @@
{
extraOptions.append("-w");
}
+ svn::Revision peg = _peg==svn::Revision::UNDEFINED?r2:_peg;
try {
StopDlg sdlg(m_Data->m_SvnContext,parent,0,"Diffing",
i18n("Diffing - hit cancel for abort"));
connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&)));
- ex = m_Data->m_Svnclient->diff(svn::Path(tn),
- svn::Path(p1),svn::Path(p2),
- r1, r2,
- true,false,false,ignore_content,extraOptions);
+ if (p1==p2 && (r1.isRemote()||r2.isRemote())) {
+ kdDebug()<<"Pegged diff"<m_Svnclient->diff_peg(svn::Path(tn),
+ svn::Path(p1),r1, r2,peg,
+ true,false,false,ignore_content,extraOptions);
+ } else {
+ ex = m_Data->m_Svnclient->diff(svn::Path(tn),
+ svn::Path(p1),svn::Path(p2),
+ r1, r2,
+ true,false,false,ignore_content,extraOptions);
+ }
} catch (svn::ClientException e) {
emit clientException(e.msg());
return;
@@ -1159,7 +1169,7 @@
if (m_Data->isExternalDiff()) {
svn::InfoEntry info;
if (singleInfo(p1,r1,info)) {
- makeDiffExternal(p1,r1,p2,r2,info.isDir(),_p,false);
+ makeDiffExternal(p1,r1,p2,r2,r2,info.isDir(),_p,false);
}
return;
}
@@ -1476,7 +1486,7 @@
svn::Revision r = ptr->toRevision();
bool openit = ptr->openAfterJob();
bool ignoreExternal=ptr->ignoreExternals();
- makeCheckout(ptr->reposURL(),ptr->targetDir(),r,ptr->forceIt(),_exp,openit,ignoreExternal);
+ makeCheckout(ptr->reposURL(),ptr->targetDir(),r,r,ptr->forceIt(),_exp,openit,ignoreExternal,true,0);
}
dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"checkout_export_dialog",false);
delete dlg;
@@ -1525,7 +1535,7 @@
svn::Revision r = ptr->toRevision();
bool openIt = ptr->openAfterJob();
bool ignoreExternal = ptr->ignoreExternals();
- makeCheckout(ptr->reposURL(),ptr->targetDir(),r,ptr->forceIt(),_exp,openIt,ignoreExternal);
+ makeCheckout(ptr->reposURL(),ptr->targetDir(),r,r,ptr->forceIt(),_exp,openIt,ignoreExternal,true,0);
}
delete dlg;
}
@@ -1541,7 +1551,7 @@
CheckoutExportCurrent(true);
}
-bool SvnActions::makeCheckout(const QString&rUrl,const QString&tPath,const svn::Revision&r,bool force_recurse,bool _exp,bool openIt,bool ignoreExternal,bool exp_rec, QWidget*_p)
+bool SvnActions::makeCheckout(const QString&rUrl,const QString&tPath,const svn::Revision&r,const svn::Revision&_peg,bool force_recurse,bool _exp,bool openIt,bool ignoreExternal,bool exp_rec, QWidget*_p)
{
QString fUrl = rUrl;
QString ex;
@@ -1549,8 +1559,8 @@
fUrl.truncate(fUrl.length()-1);
}
svn::Path p(tPath);
- svn::Revision peg = svn::Revision::UNDEFINED;
- if (r!=svn::Revision::BASE && r!=svn::Revision::WORKING) {
+ svn::Revision peg = _peg;
+ if (r!=svn::Revision::BASE && r!=svn::Revision::WORKING && _peg==svn::Revision::UNDEFINED) {
peg = r;
}
if (!_exp||!m_Data->m_CurrentContext) reInitClient();
@@ -1922,7 +1932,7 @@
if (rev1 != svn::Revision::WORKING) {
if (isDir) {
- if (!makeCheckout(src1,first,rev1,true,true,false,false,rec)) {
+ if (!makeCheckout(src1,first,rev1,svn::Revision::UNDEFINED,true,true,false,false,rec,0)) {
return;
}
} else {
@@ -1935,7 +1945,7 @@
if (!singleMerge) {
if (rev2!=svn::Revision::WORKING) {
if (isDir) {
- if (!makeCheckout(src2,second,rev2,true,true,false,false,rec)) {
+ if (!makeCheckout(src2,second,rev2,svn::Revision::UNDEFINED,true,true,false,false,rec,0)) {
return;
}
} else {
@@ -2471,7 +2481,9 @@
pm = m_Data->m_Svnclient->proplist(p,where,where);
} catch (const svn::ClientException&e) {
/* no messagebox needed */
- sendNotify(e.msg());
+ if (e.apr_err()!=SVN_ERR_WC_NOT_DIRECTORY) {
+ sendNotify(e.msg());
+ }
}
if (where != svn::Revision::WORKING && pm) {
m_Data->m_PropertiesCache.insertKey(pm,fk);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnfrontend/svnactions.h new/kdesvn-0.14.3/src/svnfrontend/svnactions.h
--- old/kdesvn-0.14.2/src/svnfrontend/svnactions.h 2008-02-18 22:36:47.000000000 +0100
+++ new/kdesvn-0.14.3/src/svnfrontend/svnactions.h 2008-03-28 11:54:32.000000000 +0100
@@ -128,7 +128,7 @@
bool makeSwitch(const QString&rUrl,const QString&tPath,const svn::Revision&r,bool rec = true);
bool makeSwitch(const QString&path,const QString&what);
bool makeRelocate(const QString&fUrl,const QString&tUrl,const QString&path,bool rec = true);
- bool makeCheckout(const QString&,const QString&,const svn::Revision&,bool,bool,bool,bool,bool exp_rec=true, QWidget*p=0);
+ bool makeCheckout(const QString&,const QString&,const svn::Revision&,const svn::Revision&,bool,bool,bool,bool,bool exp_rec,QWidget*p);
void makeInfo(QPtrList<SvnItem> lst,const svn::Revision&,const svn::Revision&,bool recursive = true);
void makeInfo(const QStringList&lst,const svn::Revision&,const svn::Revision&,bool recursive = true);
bool makeCommit(const svn::Targets&);
@@ -176,8 +176,8 @@
void CheckoutExportCurrent(bool _exp);
void makeAdd(bool rec);
CheckModifiedThread*m_CThread,*m_UThread;
- void makeDiffinternal(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*);
- void makeDiffExternal(const QString&p1,const svn::Revision&start,const QString&p2,const svn::Revision&end,bool isDir,QWidget*p,bool rec=true);
+ void makeDiffinternal(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*,const svn::Revision&peg=svn::Revision::UNDEFINED);
+ void makeDiffExternal(const QString&p1,const svn::Revision&start,const QString&p2,const svn::Revision&end,const svn::Revision&_peg,bool isDir,QWidget*p,bool rec=true);
public slots:
virtual void dispDiff(const QByteArray&);
@@ -197,9 +197,9 @@
virtual void slotSwitch();
virtual void slotResolved(const QString&);
virtual void slotResolve(const QString&);
- virtual void makeDiff(const QString&,const svn::Revision&,const svn::Revision&,bool isDir);
+ virtual void makeDiff(const QString&,const svn::Revision&,const svn::Revision&,const svn::Revision&_peg,bool isDir);
virtual void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&);
- virtual void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,bool,QWidget*p);
+ virtual void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,const svn::Revision&,bool,QWidget*p);
virtual void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*);
virtual void makeNorecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*);
virtual void slotImport(const QString&,const QString&,const QString&,bool);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnfrontend/svnlogdlgimp.cpp new/kdesvn-0.14.3/src/svnfrontend/svnlogdlgimp.cpp
--- old/kdesvn-0.14.2/src/svnfrontend/svnlogdlgimp.cpp 2007-10-15 22:10:28.000000000 +0200
+++ new/kdesvn-0.14.3/src/svnfrontend/svnlogdlgimp.cpp 2008-03-28 11:54:32.000000000 +0100
@@ -241,6 +241,7 @@
{
if (!_log) return;
_base = root;
+ m_first = m_second = 0;
m_Entries = _log;
kdDebug()<<"What: "<
#include
@@ -49,66 +50,48 @@
namespace svn
{
- /**
- * a quick way to create error messages
- */
- static void
- fail (apr_pool_t *pool, apr_status_t status, const char *fmt, ...)
- {
- va_list ap;
- char *msg;
- svn_error_t * error;
-
- va_start (ap, fmt);
- msg = apr_pvsprintf (pool, fmt, ap);
- va_end (ap);
-
- error = svn_error_create (status, NULL, msg);
- throw ClientException (error);
- }
-
- /**
- * closes and deletes temporary files that diff has been using
- */
- static void
- diffCleanup (apr_file_t * outfile, const char * outfileName,
- apr_file_t * errfile, const char * errfileName,
- apr_pool_t *pool)
- {
- if (outfile != NULL)
- apr_file_close (outfile);
-
- if (errfile != NULL)
- apr_file_close (errfile);
-
- if (outfileName != NULL)
- svn_error_clear (svn_io_remove_file (outfileName, pool));
-
- if (errfileName != NULL)
- svn_error_clear (svn_io_remove_file (errfileName, pool));
- }
-
-
QByteArray
- Client_impl::diff (const Path & tmpPath, const Path & path,
- const Revision & revision1, const Revision & revision2,
+ Client_impl::diff_peg (const Path & tmpPath, const Path & path,
+ const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
const bool recurse, const bool ignoreAncestry,
const bool noDiffDeleted,const bool ignore_contenttype) throw (ClientException)
{
- return diff(tmpPath,path,path,
- revision1,revision2,
+ return diff_peg(tmpPath,path,
+ revision1,revision2,peg_revision,
recurse,ignoreAncestry,noDiffDeleted,ignore_contenttype,
QStringList());
}
QByteArray
- Client_impl::diff (const Path & tmpPath, const Path & path,
- const Revision & revision1, const Revision & revision2,
+ Client_impl::diff_peg (const Path & tmpPath, const Path & path,
+ const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
const bool recurse, const bool ignoreAncestry,
const bool noDiffDeleted,const bool ignore_contenttype,
- const QStringList&extra) throw (ClientException)
+ const QStringList&extra) throw (ClientException)
{
- return diff(tmpPath,path,path,revision1,revision2,recurse,ignoreAncestry,noDiffDeleted,ignore_contenttype,extra);
+ Pool pool;
+ svn_error_t * error;
+ const apr_array_header_t * options;
+
+ // svn_client_diff needs an options array, even if it is empty
+ options = list2array(extra,pool);
+ DiffData ddata(tmpPath,path,revision1,path,revision2);
+
+ error = svn_client_diff_peg3(
+ options,
+ path.cstr(),
+ peg_revision,ddata.r1().revision(),ddata.r2().revision(),
+ recurse?1:0,ignoreAncestry,noDiffDeleted,ignore_contenttype,
+ APR_LOCALE_CHARSET,
+ ddata.outFile(),ddata.errFile(),
+ *m_context,
+ pool
+ );
+ if (error != NULL)
+ {
+ throw ClientException (error);
+ }
+ return ddata.content();
}
QByteArray
@@ -132,109 +115,38 @@
Pool pool;
svn_error_t * error;
- apr_status_t status;
- apr_file_t * outfile = 0L;
- const char * outfileName = 0L;
- apr_file_t * errfile = 0L;
- const char * errfileName = 0L;
const apr_array_header_t * options;
- bool working_copy_present = false;
- bool url_is_present = false;
- Revision r1,r2;
- r1 = revision1;
- r2 = revision2;
-
- if (svn_path_is_url(path1.cstr())) {
- url_is_present = true;
- } else {
- working_copy_present = true;
- }
- if (svn_path_is_url(path2.cstr())) {
- url_is_present = true;
- } else {
- working_copy_present = true;
- }
- if (revision1.revision()->kind==svn_opt_revision_unspecified && working_copy_present) {
- r1 = svn_opt_revision_base;
- }
- if (revision2.revision()->kind==svn_opt_revision_unspecified) {
- r2 = working_copy_present?svn_opt_revision_working : svn_opt_revision_head;
- }
// svn_client_diff needs an options array, even if it is empty
options = list2array(extra,pool);
-
- // svn_client_diff needs a temporary file to write diff output to
- error = svn_io_open_unique_file (&outfile, &outfileName,
- tmpPath.path().TOUTF8(),
- ".tmp",
- FALSE, pool);
-
- if (error != NULL)
- {
- diffCleanup (outfile, outfileName, errfile, errfileName, pool);
- throw ClientException (error);
- }
-
- // and another one to write errors to
- error = svn_io_open_unique_file (&errfile, &errfileName,
- tmpPath.path().TOUTF8(), ".error.tmp",
- FALSE, pool);
-
- if (error != NULL)
- {
- diffCleanup (outfile, outfileName, errfile, errfileName, pool);
- throw ClientException (error);
- }
+ DiffData ddata(tmpPath,path1,revision1,path2,revision2);
// run diff
#if (SVN_VER_MAJOR >= 1) && (SVN_VER_MINOR >= 3)
error = svn_client_diff3 (options,
- path1.cstr (), r1.revision (),
- path2.cstr (), r2.revision (),
+ path1.cstr (), ddata.r1().revision (),
+ path2.cstr (), ddata.r2().revision (),
recurse?1:0, ignoreAncestry, noDiffDeleted, ignore_contenttype,
APR_LOCALE_CHARSET,
- outfile, errfile,
+ ddata.outFile(),ddata.errFile(),
*m_context,
pool);
#else
error = svn_client_diff2 (options,
- path1.cstr (), r1.revision (),
- path2.cstr (), r2.revision (),
+ path1.cstr (), ddata.r1().revision (),
+ path2.cstr (), ddata.r2().revision (),
recurse?1:0, ignoreAncestry, noDiffDeleted, ignore_contenttype,
- outfile, errfile,
+ ddata.outFile(),ddata.errFile(),
*m_context,
pool);
#endif
if (error != NULL)
{
- diffCleanup (outfile, outfileName, errfile, errfileName, pool);
- throw ClientException (error);
- }
-
- status = apr_file_close (outfile);
- if (status)
- {
- diffCleanup (outfile, outfileName, errfile, errfileName, pool);
- fail (pool, status, "failed to close '%s'", outfileName);
+ throw ClientException (error);
}
+ return ddata.content();
- QFile fi(outfileName);
-#if QT_VERSION < 0x040000
- if (!fi.open(IO_ReadOnly|IO_Raw)) {
-#else
- if (!fi.open(QIODevice::ReadOnly)) {
-#endif
- diffCleanup (outfile, outfileName, errfile, errfileName, pool);
- fail(pool,0,fi.errorString().TOUTF8() + "'%s'",outfileName);
- }
-
- QByteArray res = fi.readAll();
- fi.close();
-
- diffCleanup (outfile, outfileName, errfile, errfileName, pool);
- return res;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnqt/client.hpp new/kdesvn-0.14.3/src/svnqt/client.hpp
--- old/kdesvn-0.14.2/src/svnqt/client.hpp 2007-09-05 15:16:02.000000000 +0200
+++ new/kdesvn-0.14.3/src/svnqt/client.hpp 2008-03-26 16:51:16.000000000 +0100
@@ -529,8 +529,8 @@
* @exception ClientException
*/
virtual QByteArray
- diff (const Path & tmpPath, const Path & path,
- const Revision & revision1, const Revision & revision2,
+ diff_peg(const Path & tmpPath, const Path & path,
+ const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
const bool recurse, const bool ignoreAncestry,
const bool noDiffDeleted,const bool ignore_contenttype,const QStringList&extra) throw (ClientException)=0;
@@ -538,8 +538,8 @@
* Same as other diff but extra options always set to empty list.
*/
virtual QByteArray
- diff (const Path & tmpPath, const Path & path,
- const Revision & revision1, const Revision & revision2,
+ diff_peg (const Path & tmpPath, const Path & path,
+ const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
const bool recurse, const bool ignoreAncestry,
const bool noDiffDeleted,const bool ignore_contenttype) throw (ClientException)=0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnqt/client_impl.hpp new/kdesvn-0.14.3/src/svnqt/client_impl.hpp
--- old/kdesvn-0.14.2/src/svnqt/client_impl.hpp 2007-08-31 16:24:28.000000000 +0200
+++ new/kdesvn-0.14.3/src/svnqt/client_impl.hpp 2008-03-26 16:51:16.000000000 +0100
@@ -499,8 +499,8 @@
* @exception ClientException
*/
virtual QByteArray
- diff (const Path & tmpPath, const Path & path,
- const Revision & revision1, const Revision & revision2,
+ diff_peg (const Path & tmpPath, const Path & path,
+ const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
const bool recurse, const bool ignoreAncestry,
const bool noDiffDeleted,const bool ignore_contenttype,
const QStringList&extra)
@@ -510,8 +510,8 @@
* Same as other diff but extra options always set to empty list.
*/
virtual QByteArray
- diff (const Path & tmpPath, const Path & path,
- const Revision & revision1, const Revision & revision2,
+ diff_peg (const Path & tmpPath, const Path & path,
+ const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
const bool recurse, const bool ignoreAncestry,
const bool noDiffDeleted,const bool ignore_contenttype)
throw (ClientException);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnqt/CMakeLists.txt new/kdesvn-0.14.3/src/svnqt/CMakeLists.txt
--- old/kdesvn-0.14.2/src/svnqt/CMakeLists.txt 2008-02-18 22:36:47.000000000 +0100
+++ new/kdesvn-0.14.3/src/svnqt/CMakeLists.txt 2008-03-28 12:26:42.000000000 +0100
@@ -32,6 +32,7 @@
repositorydata.cpp
repositorylistener.cpp
svnstream.cpp
+ diff_data.cpp
svnfilestream.cpp)
SET(INST_HEADERS
@@ -120,7 +121,7 @@
#SET(LIB_RELEASE ${LIBLA_REVISION})
SET(LIB_MAJOR 4)
-SET(LIB_MINOR 0)
+SET(LIB_MINOR 1)
SET(LIB_RELEASE 0)
SET(_soversion ${LIB_MAJOR}.${LIB_MINOR}.${LIB_RELEASE})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnqt/diff_data.cpp new/kdesvn-0.14.3/src/svnqt/diff_data.cpp
--- old/kdesvn-0.14.2/src/svnqt/diff_data.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kdesvn-0.14.3/src/svnqt/diff_data.cpp 2008-03-27 18:03:57.000000000 +0100
@@ -0,0 +1,144 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Rajko Albrecht ral@alwins-world.de *
+ * http://kdesvn.alwins-world.de/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+#include "diff_data.hpp"
+#include "svnqt/svnqt_defines.hpp"
+#include "svnqt/exception.hpp"
+
+#include
+
+#include
+#include
+#include
+
+namespace svn
+{
+ DiffData::DiffData(const Path&aTmpPath,const Path&_p1,const Revision&_r1,const Path&_p2,const Revision&_r2)
+ :m_Pool(),m_tmpPath(aTmpPath),
+ m_outFile(0),m_errFile(0),m_outFileName(0),m_errFileName(0),
+ m_p1(_p1),m_p2(_p2),m_r1(_r1),m_r2(_r2),
+ m_working_copy_present(false),m_url_is_present(false)
+ {
+ init();
+ }
+
+ void DiffData::init()
+ {
+ svn_error_t * error;
+#if (SVN_VER_MAJOR >= 1) && (SVN_VER_MINOR >= 4)
+ error = svn_io_open_unique_file2(&m_outFile, &m_outFileName,
+ m_tmpPath.path().TOUTF8(),
+ ".tmp",
+ svn_io_file_del_on_pool_cleanup, m_Pool);
+#else
+ error = svn_io_open_unique_file (&m_outFile, &m_outFileName,
+ m_tmpPath.path().TOUTF8(),
+ ".tmp",
+ FALSE, m_Pool);
+#endif
+ if (error!=0) {
+ clean();
+ throw ClientException (error);
+ }
+#if (SVN_VER_MAJOR >= 1) && (SVN_VER_MINOR >= 4)
+ error = svn_io_open_unique_file2(&m_errFile, &m_errFileName,
+ m_tmpPath.path().TOUTF8(),
+ ".tmp",
+ svn_io_file_del_on_pool_cleanup, m_Pool);
+#else
+ error = svn_io_open_unique_file (&m_errFile, &m_errFileName,
+ m_tmpPath.path().TOUTF8(),
+ ".tmp",
+ FALSE, m_Pool);
+#endif
+ if (error!=0) {
+ clean();
+ throw ClientException (error);
+ }
+ if (svn_path_is_url(m_p1.cstr())) {
+ m_url_is_present = true;
+ } else {
+ m_working_copy_present = true;
+ }
+ if (svn_path_is_url(m_p2.cstr())) {
+ m_url_is_present = true;
+ } else {
+ m_working_copy_present = true;
+ }
+
+ if (m_r1.revision()->kind==svn_opt_revision_unspecified && m_working_copy_present) {
+ m_r1 = svn_opt_revision_base;
+ }
+ if (m_r2.revision()->kind==svn_opt_revision_unspecified) {
+ m_r2 = m_working_copy_present?svn_opt_revision_working : svn_opt_revision_head;
+ }
+ }
+
+ DiffData::~DiffData()
+ {
+ clean();
+ }
+
+ void DiffData::clean()
+ {
+ close();
+#if !((SVN_VER_MAJOR >= 1) && (SVN_VER_MINOR >= 4))
+ if (m_outFileName != 0) {
+ svn_esrror_clear (svn_io_remove_file (m_outFileName, m_Pool));
+ m_outFileName=0;
+ }
+ if (m_errFileName != 0) {
+ svn_error_clear (svn_io_remove_file (m_errFileName, m_Pool));
+ m_errFileName=0;
+ }
+#endif
+ }
+
+ void DiffData::close()
+ {
+ if (m_outFile != 0) {
+ svn_io_file_close(m_outFile,m_Pool);
+ m_outFile=0;
+ }
+ if (m_errFile != 0) {
+ svn_io_file_close(m_errFile,m_Pool);
+ m_errFile=0;
+ }
+ }
+
+ QByteArray DiffData::content()
+ {
+ if (!m_outFileName) {
+ return QByteArray();
+ }
+ close();
+ QFile fi(m_outFileName);
+#if QT_VERSION < 0x040000
+ if (!fi.open(IO_ReadOnly|IO_Raw)) {
+#else
+ if (!fi.open(QIODevice::ReadOnly)) {
+#endif
+ throw ClientException(QString("%1 '%2'").arg(fi.errorString()).arg(m_outFileName));
+ }
+
+ QByteArray res = fi.readAll();
+ fi.close();
+ return res;
+ }
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnqt/diff_data.hpp new/kdesvn-0.14.3/src/svnqt/diff_data.hpp
--- old/kdesvn-0.14.2/src/svnqt/diff_data.hpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kdesvn-0.14.3/src/svnqt/diff_data.hpp 2008-03-27 18:03:57.000000000 +0100
@@ -0,0 +1,75 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Rajko Albrecht ral@alwins-world.de *
+ * http://kdesvn.alwins-world.de/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef __DIFF_DATA
+#define __DIFF_DATA
+
+#include "svnqt/svnqt_defines.hpp"
+#include "svnqt/pool.hpp"
+#include "path.hpp"
+#include "revision.hpp"
+
+#include
+
+#if QT_VERSION < 0x040000
+ #include
+#else
+ #include <QtCore>
+#endif
+
+struct apr_file_t;
+
+namespace svn
+{
+ class Path;
+
+ class SVNQT_NOEXPORT DiffData
+ {
+ protected:
+ Pool m_Pool;
+ Path m_tmpPath;
+ apr_file_t*m_outFile;
+ apr_file_t*m_errFile;
+ const char*m_outFileName;
+ const char*m_errFileName;
+
+ Path m_p1,m_p2;
+ Revision m_r1,m_r2;
+
+ bool m_working_copy_present,m_url_is_present;
+
+ void init();
+ void clean();
+ void close();
+
+ public:
+ DiffData(const Path&aTmpPath,const Path&,const Revision&,const Path&,const Revision&);
+ virtual ~DiffData();
+
+ apr_file_t*outFile(){return m_outFile;}
+ apr_file_t*errFile(){return m_errFile;}
+ const Revision& r1()const{return m_r1;}
+ const Revision& r2()const{return m_r2;}
+
+ QByteArray content();
+ };
+}
+
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnqt/revision.cpp new/kdesvn-0.14.3/src/svnqt/revision.cpp
--- old/kdesvn-0.14.2/src/svnqt/revision.cpp 2007-10-13 12:45:39.000000000 +0200
+++ new/kdesvn-0.14.3/src/svnqt/revision.cpp 2008-03-27 18:03:57.000000000 +0100
@@ -93,6 +93,8 @@
} else if (revstring=="START"){
m_revision.kind = Revision::START;
m_revision.value.number = 0;
+ } else if (revstring=="PREV"){
+ m_revision.kind = Revision::PREV;
} else if (!revstring.isNull()) {
Pool pool;
svn_opt_revision_t endrev;
@@ -186,6 +188,9 @@
case svn_opt_revision_working:
value = "WORKING";
break;
+ case svn_opt_revision_previous:
+ value="PREVIOUS";
+ break;
case svn_opt_revision_unspecified:
default:
value="-1";
@@ -260,6 +265,11 @@
return kind()!=UNDEFINED;
}
+ bool Revision::isRemote()const
+ {
+ return kind()!=UNDEFINED && kind()!=BASE && kind()!=WORKING;
+ }
+
}
/* -----------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdesvn-0.14.2/src/svnqt/revision.hpp new/kdesvn-0.14.3/src/svnqt/revision.hpp
--- old/kdesvn-0.14.2/src/svnqt/revision.hpp 2007-10-13 12:45:39.000000000 +0200
+++ new/kdesvn-0.14.3/src/svnqt/revision.hpp 2008-03-27 18:03:57.000000000 +0100
@@ -177,6 +177,8 @@
operator QString ()const;
QString toString()const;
+ bool isRemote()const;
+
/**
* @return date
*/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org