diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2002-01-04 14:50:57 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2002-01-04 14:50:57 +0000 |
commit | 025beb219ec874855e32b0ba5de31b3533afb3fc (patch) | |
tree | 524bfd7448948d964d0a918a5ee1dad5862d825c /Tools | |
parent | Update to 0.76. (diff) |
Ignore patchfiles ending with `.orig' and `.rej'.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/patchtool.py | 8 |
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) |