Updated the patch for patch.py
- Legacy-Id: 15691
This commit is contained in:
parent
42db540789
commit
324dddee5d
|
@ -1,6 +1,6 @@
|
|||
--- patch.py.old 2018-03-09 07:53:37.586201595 -0800
|
||||
+++ patch.py 2018-03-09 09:17:25.017418754 -0800
|
||||
@@ -804,10 +804,10 @@
|
||||
--- patch.py.original 2018-11-02 23:17:51.816936730 -0700
|
||||
+++ patch.py 2018-11-02 23:20:28.800705155 -0700
|
||||
@@ -803,10 +803,10 @@
|
||||
|
||||
def findfile(self, old, new):
|
||||
""" return name of file to be patched or None """
|
||||
|
@ -14,19 +14,18 @@
|
|||
else:
|
||||
# [w] Google Code generates broken patches with its online editor
|
||||
debug("broken patch from Google Code, stripping prefixes..")
|
||||
|
||||
@@ -827,9 +827,6 @@
|
||||
@@ -826,10 +826,6 @@
|
||||
from file paths. `root` parameter specifies working dir.
|
||||
return True on success
|
||||
"""
|
||||
- if root:
|
||||
- prevdir = os.getcwd()
|
||||
- os.chdir(root)
|
||||
|
||||
-
|
||||
total = len(self.items)
|
||||
errors = 0
|
||||
|
||||
@@ -854,6 +851,8 @@
|
||||
if strip:
|
||||
@@ -853,6 +849,8 @@
|
||||
new = pathstrip(p.target, strip)
|
||||
else:
|
||||
old, new = p.source, p.target
|
||||
|
@ -35,8 +34,7 @@
|
|||
|
||||
filename = self.findfile(old, new)
|
||||
|
||||
|
||||
@@ -956,9 +955,6 @@
|
||||
@@ -954,9 +952,6 @@
|
||||
# todo: proper rejects
|
||||
shutil.move(backupname, filename)
|
||||
|
||||
|
|
Loading…
Reference in a new issue