summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-01-04 14:50:57 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-01-04 14:50:57 +0000
commit025beb219ec874855e32b0ba5de31b3533afb3fc (patch)
tree524bfd7448948d964d0a918a5ee1dad5862d825c /Tools
parentUpdate to 0.76. (diff)
Ignore patchfiles ending with `.orig' and `.rej'.
Notes
Notes: svn path=/head/; revision=52567
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/patchtool.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Tools/scripts/patchtool.py b/Tools/scripts/patchtool.py
index d66f6b2874ab..b830f5c74c81 100755
--- a/Tools/scripts/patchtool.py
+++ b/Tools/scripts/patchtool.py
@@ -37,6 +37,7 @@ class Vars:
DIFF_ARGS = '-du'
DIFF_SUFX = '.orig'
PATCH_PREFIX = 'patch-'
+ PATCH_IGN_SUFX = ('.orig', '.rej')
RCSDIFF_SUFX = ',v'
CD_CMD = 'cd'
@@ -433,7 +434,12 @@ class PatchesCollection:
# Not reached #
for file in glob.glob(os.path.join(patchdir, Vars.PATCH_PREFIX + '*')):
- self.addpatchfile(file, wrksrc)
+ for sufx in Vars.PATCH_IGN_SUFX:
+ if file[-len(sufx):] == sufx:
+ write_msg('WARNING: patchfile "%s" ignored\n' % file)
+ break
+ else:
+ self.addpatchfile(file, wrksrc)
def addpatchfile(self, path, wrksrc):
path = os.path.abspath(path)