7
7
# returns as a dictionary, where the key is the base
8
8
# folder, and the values lists with all .svn folders
9
9
# under the base folder. All absolute paths.
10
- # ------------------------------------------------------
10
+ # ---------------------------------------------------------
11
11
def findSvnRepos (folderToSearch ):
12
12
svnFolders = {}
13
13
foldersToSearch = [folderToSearch ]
@@ -39,6 +39,7 @@ def findSvnRepos(folderToSearch):
39
39
40
40
41
41
# Formatting functions
42
+ # ---------------------------------------------------------
42
43
def getEscapeChars (inString ):
43
44
return '\b ' * len (inString )
44
45
@@ -56,7 +57,9 @@ def renderPercentage(num, max):
56
57
percentage = int (num / max * 100 )
57
58
return getLeadingFiller (percentage , 100 ) + str (percentage ) + "%"
58
59
60
+
59
61
# Repair SVN directories. Print status while it's happening
62
+ # ---------------------------------------------------------
60
63
def repairSvnDirs (repos ):
61
64
svnStructure = ['prop-base' , 'props' , 'text-base' , 'tmp' , join ('tmp' ,'prop-base' ), join ('tmp' ,'props' ), join ('tmp' ,'text-base' )]
62
65
@@ -85,6 +88,8 @@ def repairSvnDirs(repos):
85
88
print ("\n Rebuilt" , rebuildCount , "of" , dirCount , "directories." )
86
89
87
90
91
+ # Clean and update SVN directories.
92
+ # ---------------------------------------------------------
88
93
def updateSvnDirs (repos ):
89
94
for repoIndex , repo in enumerate (repos .keys ()):
90
95
repoString = renderRepoCounter (repoIndex + 1 , len (repos )) + " Cleaning " + split (repo )[1 ] + "..."
@@ -96,10 +101,11 @@ def updateSvnDirs(repos):
96
101
repoString = renderRepoCounter (repoIndex + 1 , len (repos )) + " Updating " + split (repo )[1 ] + "..."
97
102
print (repoString )
98
103
os .system ("svn update " + repo )
99
-
100
- # Basic settings
104
+
105
+
106
+
107
+ # Default settings
101
108
# ------------------------------------------------------
102
- # .svn folder structure
103
109
startDir = abspath (os .getcwd ())
104
110
105
111
print ("Locating SVN directories..." )
0 commit comments