mirror of
https://github.com/frej/fast-export.git
synced 2026-01-12 01:02:05 +01:00
16 lines
345 B
Python
16 lines
345 B
Python
import subprocess
|
|
import shlex
|
|
import sys
|
|
from mercurial import node
|
|
|
|
def build_filter(args):
|
|
return Filter(args)
|
|
|
|
class Filter:
|
|
def __init__(self, args):
|
|
self.filter_contents = shlex.split(args)
|
|
|
|
def file_data_filter(self,file_data):
|
|
if file_data['filename'].startswith(b'bad'):
|
|
file_data['data'] = None
|