Skip to content

Commit 5c958e7

Browse files
committed
Consolidated the 2 patches to patch.py into one.
- Legacy-Id: 15741
1 parent 1c2f990 commit 5c958e7

2 files changed

Lines changed: 14 additions & 26 deletions

File tree

patch/add-patch-already-patched-flag.patch

Lines changed: 0 additions & 19 deletions
This file was deleted.

patch/fix-patch-no-chdir.patch

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
--- patch.py.original 2018-11-02 23:17:51.816936730 -0700
2-
+++ patch.py 2018-11-02 23:21:50.794673596 -0700
3-
@@ -803,10 +803,10 @@
1+
--- patch.py.orig 2018-11-09 11:48:08.507323235 -0800
2+
+++ patch.py 2018-11-09 11:48:26.759761184 -0800
3+
@@ -263,6 +263,7 @@
4+
5+
self.errors = 0 # fatal parsing errors
6+
self.warnings = 0 # non-critical warnings
7+
+ self.already_patched = False
8+
# --- /API ---
9+
10+
if stream:
11+
@@ -803,10 +804,10 @@
412

513
def findfile(self, old, new):
614
""" return name of file to be patched or None """
@@ -14,7 +22,7 @@
1422
else:
1523
# [w] Google Code generates broken patches with its online editor
1624
debug("broken patch from Google Code, stripping prefixes..")
17-
@@ -826,10 +826,6 @@
25+
@@ -826,10 +827,6 @@
1826
from file paths. `root` parameter specifies working dir.
1927
return True on success
2028
"""
@@ -25,7 +33,7 @@
2533
total = len(self.items)
2634
errors = 0
2735
if strip:
28-
@@ -853,6 +849,8 @@
36+
@@ -853,6 +850,8 @@
2937
new = pathstrip(p.target, strip)
3038
else:
3139
old, new = p.source, p.target
@@ -34,7 +42,7 @@
3442

3543
filename = self.findfile(old, new)
3644

37-
@@ -954,9 +952,6 @@
45+
@@ -954,9 +953,6 @@
3846
# todo: proper rejects
3947
shutil.move(backupname, filename)
4048

@@ -43,4 +51,3 @@
4351
-
4452
# todo: check for premature eof
4553
return (errors == 0)
46-

0 commit comments

Comments
 (0)