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

List:       kde-commits
Subject:    KDE/kdesdk/kioslave/svn/ksvnd
From:       John Tapsell <john.tapsell () kdemail ! net>
Date:       2005-05-05 21:43:14
Message-ID: 1115329394.484330.20054.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 409876 by johnflux:

Rename 'isValid..' to 'anyValid' and create a 'anyNotValid'



 M  +18 -1     trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.cpp  
 M  +2 -1      trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.h  


--- trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.cpp #409875:409876
@@ -53,7 +53,24 @@
 		return QString::null;
 }
 
-bool KSvnd::isValidWorkingCopy( const KURL::List& wclist ) {
+bool KSvnd::anyNotValidWorkingCopy( const KURL::List& wclist ) {
+	bool result = true; //one negative match is enough
+	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 = false;
+		}
+
+		//else check if ./.svn/entries exists
+		if ( !QFile::exists( ( *it ).directory() + "/.svn/entries" ) )
+			result = false;
+	}
+	return result;
+}
+
+bool KSvnd::anyValidWorkingCopy( 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
--- trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.h #409875:409876
@@ -36,7 +36,8 @@
 k_dcop:
 //  void addAuthInfo(KIO::AuthInfo, long);
   QString commitDialog(QString);
-  bool isValidWorkingCopy( const KURL::List& wclist );
+  bool anyNotValidWorkingCopy( const KURL::List& wclist );
+  bool anyValidWorkingCopy( 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