Bug 22482 - Pruning von .svn Unterverzecihnissen
Pruning von .svn Unterverzecihnissen
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: ucslint
UCS 3.0
All Linux
: P5 enhancement (vote)
: UCS 3.1
Assigned To: Philipp Hahn
Lukas Walter
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-11 09:05 CEST by Philipp Hahn
Modified: 2012-12-12 21:09 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2011-05-11 09:05:47 CEST
--- ucslint/0004-CheckUCR.py	(Revision 24046)
+++ ucslint/0004-CheckUCR.py	(Revision 24044)
@@ -94,10 +94,11 @@
 
 		if os.path.isdir( os.path.join(path, 'conffiles') ):
 			for dirpath, dirnames, filenames in os.walk( os.path.join( path, 'conffiles' ) ):
-				if not '/.svn/' in dirpath and not dirpath.endswith('/.svn'):   # ignore svn files
-					for fn in filenames:
-						if not fn.endswith('~'):
-							conffiles[ os.path.join( dirpath, fn ) ] = { 'headerfound': False, 'variables': [], 'placeholder': [], 'bcwarning': False, 'ucrwarning': False }
+				try: dirnames.remove('.svn') # prune svn directory
+				except ValueError: pass
+				for fn in filenames:
+					if not fn.endswith('~'):
+						conffiles[ os.path.join( dirpath, fn ) ] = { 'headerfound': False, 'variables': [], 'placeholder': [], 'bcwarning': False, 'ucrwarning': False }
 			self.debug('found conffiles: %s' % conffiles.keys())
 
 --- ucslint/0002-CopyPasteErrors.py	(Revision 24046)
+++ ucslint/0002-CopyPasteErrors.py	(Revision 24044)
@@ -44,8 +44,8 @@
 		# scan directory recursively
 		for dir in [ 'conffiles' ]:
 			for dirpath, dirnames, filenames in os.walk( os.path.join(path, dir) ):
-				if '/.svn/' in dirpath or dirpath.endswith('/.svn'):   # ignore svn files
-					continue
+				try: dirnames.remove('.svn') # prune svn directory
+				except ValueError: pass
 				for fn in filenames:
 					files.append( os.path.join( dirpath, fn ) )
 
--- ucslint/0010-Copyright.py	(Revision 24046)
+++ ucslint/0010-Copyright.py	(Revision 24044)
@@ -47,8 +47,8 @@
 
 		# looking for python files
 		for dirpath, dirnames, filenames in os.walk( path ):
-			if '.svn' in dirnames:
-				dirnames.remove('.svn')
+			try: dirnames.remove('.svn') # prune svn directory
+			except ValueError: pass
 			for fn in filenames:
 				if fn.endswith('~'):
 					continue
--- ucslint/0009-Python.py	(Revision 24046)
+++ ucslint/0009-Python.py	(Revision 24044)
@@ -34,8 +34,8 @@
 
 		py_files = []
 		for dirpath, dirnames, filenames in os.walk( path ):
-			if '/.svn/' in dirpath or dirpath.endswith('/.svn'):   # ignore svn files
-				continue
+			try: dirnames.remove('.svn') # prune svn directory
+			except ValueError: pass
 			for fn in filenames:
 				if fn.endswith('~'):
 					continue
Comment 1 Philipp Hahn univentionstaff 2012-07-20 19:59:38 CEST
Es wird jetzt durchgehend FilteredDirWalkGenerator() verwendet, was die .svn-Unterverzeichnisse richtig behandelt.

svn34322, ucslint_3.0.0-1
Comment 2 Lukas Walter univentionstaff 2012-10-15 12:36:06 CEST
(In reply to comment #1)
> Es wird jetzt durchgehend FilteredDirWalkGenerator() verwendet, was die
> .svn-Unterverzeichnisse richtig behandelt.
> 
> svn34322, ucslint_3.0.0-1

Stimmt.

Changelog passt,
Verified.
Comment 3 Stefan Gohmann univentionstaff 2012-12-12 21:09:40 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

If this error occurs again, please use "Clone This Bug".