[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:       2009-02-05 17:34:25
Message-ID: 1233855265.814000.11867.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 921794 by marchand:

Fix svn 1.4 compatibility

Applied patch (well, one year late but still)
thanks for it ;)

BUG: 153842

 M  +24 -1     ksvnd.cpp  


--- trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.cpp #921793:921794
@@ -117,12 +117,29 @@
 
 bool KSvnd::isFileInSvnEntries ( const QString &filename, const QString &entfile ) {
 	QFile file( entfile );
+	bool potential = false;
 	if ( file.open( QIODevice::ReadOnly ) ) {
 		QTextStream stream( &file );
 		QString line;
 		while ( !stream.atEnd() ) {
 			line = stream.readLine().simplified();
-			if ( line == "name=\""+ filename + "\"" ) {
+
+			if ( potential == true ) {
+			// Check that filename is really a file or dir
+				if ( line == "dir" || line == "file" ) {
+					file.close();
+					return true;
+				} else {
+			// Reset potential to false
+				potential=false;
+				}
+			}
+
+			if ( line == filename ) {
+			// Assume we're using SVN >= 1.4
+				potential=true;
+			} else if ( line == "name=\""+ filename + "\"" ) {
+			// We could still be using SVN <= 1.3 (XML format)
 				file.close();
 				return true;
 			}
@@ -270,6 +287,12 @@
 	if ( !(listStatus & SomeAreInParentsEntries) &&
 	     !(listStatus & SomeAreExternalToParent) &&
 	     !(listStatus & SomeHaveSvn)) {
+		if ( (listStatus & AllParentsHaveSvn) ) {
+			// These files can only be added to SVN
+			result << "Add";
+			result << "_SEPARATOR_";
+		}
+
 		if( list.size() == 1 && listStatus & SomeAreFolders) {
 			result << "Checkout";
 			result << "Export";
[prev in list] [next in list] [prev in thread] [next in thread] 

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