提交 f3e9512b 编写于 作者: J Jason McMullan 提交者: Simon Hausmann

Remove $Id: ..$ $Header: ..$ etc from +ko and +k files during import

This patch removes the '$Keyword: ...$' '...' data, so that files
don't have spurious megre conflicts between branches.

Handles both +ko and +k styles, and leaves the '$Foo$' in
the original file.
Signed-off-by: NSimon Hausmann <simon@lst.de>
上级 d8534ada
......@@ -964,9 +964,13 @@ class P4Sync(Command):
stat = filedata[j]
j += 1
text = ''
while j < len(filedata) and filedata[j]['code'] in ('text',
'binary'):
text += filedata[j]['data']
while j < len(filedata) and filedata[j]['code'] in ('text', 'unicode', 'binary'):
tmp = filedata[j]['data']
if stat['type'] in ('text+ko', 'unicode+ko', 'binary+ko'):
tmp = re.sub(r'(?i)\$(Id|Header):[^$]*\$',r'$\1$', tmp)
elif stat['type'] in ('text+k', 'ktext', 'kxtext', 'unicode+k', 'binary+k'):
tmp = re.sub(r'(?i)\$(Id|Header|Author|Date|DateTime|Change|File|Revision):[^$]*\$',r'$\1$', tmp)
text += tmp
j += 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册