You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/10/22 19:11:04 UTC

svn commit: r1026408 - /subversion/trunk/tools/dev/wc-format.py

Author: danielsh
Date: Fri Oct 22 17:11:04 2010
New Revision: 1026408

URL: http://svn.apache.org/viewvc?rev=1026408&view=rev
Log:
* tools/dev/wc-format.py
  (get_format):
    Don't claim that any-random-string is of the same format as the current
    directory; instead, claim it is not a working copy.

Modified:
    subversion/trunk/tools/dev/wc-format.py

Modified: subversion/trunk/tools/dev/wc-format.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/wc-format.py?rev=1026408&r1=1026407&r2=1026408&view=diff
==============================================================================
--- subversion/trunk/tools/dev/wc-format.py (original)
+++ subversion/trunk/tools/dev/wc-format.py Fri Oct 22 17:11:04 2010
@@ -10,6 +10,8 @@ def get_format(wc_path):
   entries = os.path.join(wc_path, '.svn', 'entries')
   wc_db = os.path.join(wc_path, '.svn', 'wc.db')
 
+  formatno = 'not under version control'
+
   if os.path.exists(entries):
     formatno = int(open(entries).readline())
   elif os.path.exists(wc_db):
@@ -17,16 +19,12 @@ def get_format(wc_path):
     curs = conn.cursor()
     curs.execute('pragma user_version;')
     formatno = curs.fetchone()[0]
-  else:
+  elif os.path.exists(wc_path):
     parent_path = os.path.dirname(os.path.abspath(wc_path))
     if wc_path != parent_path:
       formatno = get_format(parent_path)
       if formatno >= MIN_SINGLE_DB_FORMAT:
       	return formatno
-      else:
-      	return 'not under version control'
-    else:
-      return 'not under version control'
 
   return formatno