Skip to content

Commit 324ddde

Browse files
committed
Updated the patch for patch.py
- Legacy-Id: 15691
1 parent 42db540 commit 324ddde

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

patch/fix-patch-no-chdir.patch

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- patch.py.old 2018-03-09 07:53:37.586201595 -0800
2-
+++ patch.py 2018-03-09 09:17:25.017418754 -0800
3-
@@ -804,10 +804,10 @@
1+
--- patch.py.original 2018-11-02 23:17:51.816936730 -0700
2+
+++ patch.py 2018-11-02 23:20:28.800705155 -0700
3+
@@ -803,10 +803,10 @@
44

55
def findfile(self, old, new):
66
""" return name of file to be patched or None """
@@ -14,19 +14,18 @@
1414
else:
1515
# [w] Google Code generates broken patches with its online editor
1616
debug("broken patch from Google Code, stripping prefixes..")
17-
18-
@@ -827,9 +827,6 @@
17+
@@ -826,10 +826,6 @@
1918
from file paths. `root` parameter specifies working dir.
2019
return True on success
2120
"""
2221
- if root:
2322
- prevdir = os.getcwd()
2423
- os.chdir(root)
25-
24+
-
2625
total = len(self.items)
2726
errors = 0
28-
29-
@@ -854,6 +851,8 @@
27+
if strip:
28+
@@ -853,6 +849,8 @@
3029
new = pathstrip(p.target, strip)
3130
else:
3231
old, new = p.source, p.target
@@ -35,8 +34,7 @@
3534

3635
filename = self.findfile(old, new)
3736

38-
39-
@@ -956,9 +955,6 @@
37+
@@ -954,9 +952,6 @@
4038
# todo: proper rejects
4139
shutil.move(backupname, filename)
4240

0 commit comments

Comments
 (0)