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