Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nvidia-patch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
nvidia-patch
Commits
0e774055
Commit
0e774055
authored
Feb 06, 2019
by
Vladislav Yarmak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
force kwargs for compose_diff_file() options
parent
345ed93b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
win/tools/1337-diff/1337-diff.py
win/tools/1337-diff/1337-diff.py
+3
-2
No files found.
win/tools/1337-diff/1337-diff.py
View file @
0e774055
...
@@ -98,7 +98,7 @@ def diff(left, right, limit=None):
...
@@ -98,7 +98,7 @@ def diff(left, right, limit=None):
offset
+=
1
offset
+=
1
def
compose_diff_file
(
orig
,
patched
,
output
,
header
,
limit
=
None
,
offset_adjustment
=
True
):
def
compose_diff_file
(
orig
,
patched
,
output
,
header
,
*
,
limit
=
None
,
offset_adjustment
=
True
):
output
.
write
(
HEADER_FORMAT
%
(
header
.
encode
(
'latin-1'
),))
output
.
write
(
HEADER_FORMAT
%
(
header
.
encode
(
'latin-1'
),))
adj
=
OFFSET_ADJUSTMENT
if
offset_adjustment
else
0
adj
=
OFFSET_ADJUSTMENT
if
offset_adjustment
else
0
for
offset
,
a
,
b
in
diff
(
orig
,
patched
,
limit
):
for
offset
,
a
,
b
in
diff
(
orig
,
patched
,
limit
):
...
@@ -123,7 +123,8 @@ def main():
...
@@ -123,7 +123,8 @@ def main():
open
(
args
.
patched_file
,
'rb'
)
as
patched
,
\
open
(
args
.
patched_file
,
'rb'
)
as
patched
,
\
open
(
output_filename
,
'wb'
)
as
output
:
open
(
output_filename
,
'wb'
)
as
output
:
try
:
try
:
compose_diff_file
(
orig
,
patched
,
output
,
header_filename
,
args
.
limit
)
compose_diff_file
(
orig
,
patched
,
output
,
header_filename
,
limit
=
args
.
limit
)
except
LengthMismatchException
:
except
LengthMismatchException
:
print
(
"Input files have inequal length. Aborting..."
,
print
(
"Input files have inequal length. Aborting..."
,
file
=
sys
.
stderr
)
file
=
sys
.
stderr
)
...
...
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