Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
84457af2
Commit
84457af2
authored
Mar 09, 2006
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Taught svneol to look at .c and .h files too, and
it found a bunch more in need of svn:eol-style.
parent
d87f81f5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
92 deletions
+95
-92
PCbuild/make_buildinfo.c
PCbuild/make_buildinfo.c
+88
-88
Tools/scripts/svneol.py
Tools/scripts/svneol.py
+7
-4
No files found.
PCbuild/make_buildinfo.c
View file @
84457af2
Tools/scripts/svneol.py
View file @
84457af2
...
...
@@ -3,8 +3,8 @@
"""
SVN helper script.
Try to set the svn:eol-style property to "native" on every .py
and .txt file
in the directory tree rooted at the current directory.
Try to set the svn:eol-style property to "native" on every .py
, .txt, .c and
.h file
in the directory tree rooted at the current directory.
Files with the svn:eol-style property already set (to anything) are skipped.
...
...
@@ -30,16 +30,19 @@ and for a file with a binary mime-type property:
svn: File 'Lib
\
t
est
\
t
est_pep263.py' has binary mime type property
TODO: This is slow, and especially on Windows, because it invokes a new svn
command-line operation for every
.py and .txt file
.
command-line operation for every
file with the right extension
.
"""
import
re
import
os
possible_text_file
=
re
.
compile
(
r"\
.([hc]|py|
txt)$"
).
search
for
root
,
dirs
,
files
in
os
.
walk
(
'.'
):
if
'.svn'
in
dirs
:
dirs
.
remove
(
'.svn'
)
for
fn
in
files
:
if
fn
.
endswith
(
'.py'
)
or
fn
.
endswith
(
'.txt'
):
if
possible_text_file
(
fn
):
path
=
os
.
path
.
join
(
root
,
fn
)
p
=
os
.
popen
(
'svn proplist "%s"'
%
path
)
guts
=
p
.
read
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment