[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdesdk/kioslave/svn/ksvnd
From:       Mickael Marchand <marchand () kde ! org>
Date:       2005-05-05 20:03:36
Message-ID: 1115323416.728562.17008.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 409844 by marchand:

that should do it for John :)
(to test the new libkonq stuff)



 M  +19 -0     trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.cpp  
 M  +2 -0      trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.h  


--- trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.cpp #409843:409844
@@ -22,6 +22,8 @@
 #include <klocale.h>
 #include <kdebug.h>
 #include <kmessagebox.h>
+#include <qdir.h>
+#include <qfile.h>
 
 #include "config.h"
 
@@ -51,6 +53,23 @@
 		return QString::null;
 }
 
+bool KSvnd::isValidWorkingCopy( const KURL::List& wclist ) {
+	bool result = false; //one match is enough to run subversion on it
+	for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it \
) { +		//if is a directory check whether it contains a .svn/entries file
+		QDir dir( ( *it ).path() );
+		if ( dir.exists() ) { //it's a dir
+			if ( QFile::exists( ( *it ).path() + "/.svn/entries" ) )
+				result = true;
+		}
+
+		//else check if ./.svn/entries exists
+		if ( QFile::exists( ( *it ).directory() + "/.svn/entries" ) )
+			result = true;
+	}
+	return result;
+}
+
 #if 0
 void KSvnd::notify(const QString& path, int action, int kind, const QString& \
mime_type, int content_state, int prop_state, long int revision, const QString& \
userstring) {  kdDebug(7128) << "KDED/Subversion : notify " << path << " action : " \
<< action << " mime_type : " << mime_type << " content_state : " << content_state << \
" prop_state : " << prop_state << " revision : " << revision << " userstring : " << \
                userstring << endl; 
--- trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.h #409843:409844
@@ -23,6 +23,7 @@
 
 #include <dcopclient.h>
 #include <kdedmodule.h>
+#include <kurl.h>
 
 class KSvnd : public KDEDModule
 {
@@ -35,6 +36,7 @@
 k_dcop:
 //  void addAuthInfo(KIO::AuthInfo, long);
   QString commitDialog(QString);
+  bool isValidWorkingCopy( const KURL::List& wclist );
 //  void notify(const QString&, int ,int, const QString& , int , int, long int, \
const QString&);  //  void status(const QString& path, int text_status, int \
prop_status, int repos_text_status, int repos_prop_status ,long int rev);  //  void \
popupMessage( const QString& message );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic