Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mercurial
TortoiseHg
thg-hgtk
Commits
e3deec55878d
Commit
ea646253
authored
Dec 30, 2009
by
Steve Borho
Browse files
docdiff: fix use of splitext
The period is included with the extension text, and must be stripped.
parent
d74cd5429416
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/docdiff.py
View file @
e3deec55
...
...
@@ -50,7 +50,7 @@ def main():
local
,
base
,
other
,
output
=
args
base
,
ext
=
os
.
path
.
splitext
(
local
)
if
ext
.
lower
()
not
in
scripts
.
keys
():
if
not
ext
or
ext
.
lower
()
[
1
:]
not
in
scripts
.
keys
():
print
'Unsupported file type'
,
local
sys
.
exit
(
1
)
...
...
@@ -61,8 +61,11 @@ def main():
except
:
filename
=
win32api
.
GetModuleFileName
(
0
)
path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
filename
),
'diff-scripts'
)
if
not
os
.
path
.
isdir
(
path
):
print
'Diff scripts not found at'
,
path
sys
.
exit
(
1
)
use
=
scripts
[
ext
.
lower
()]
use
=
scripts
[
ext
.
lower
()
[
1
:]
]
if
len
(
args
)
==
2
:
script
=
os
.
path
.
join
(
path
,
use
[
0
])
cmdline
=
[
'wscript'
,
script
,
other
,
local
]
...
...
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