Ignore patchfiles ending with .orig' and .rej'.

This commit is contained in:
Maxim Sobolev 2002-01-04 14:50:57 +00:00
parent 5d9acace80
commit 025beb219e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=52567

View file

@ -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,6 +434,11 @@ class PatchesCollection:
# Not reached #
for file in glob.glob(os.path.join(patchdir, Vars.PATCH_PREFIX + '*')):
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):