'Remove the lines in remote file which matchs a pattern
in pattern_list.'

def remove(self, pattern_list):

    lines = self._read_local()
    for pattern in pattern_list:
        for index in range(len(lines)):
            line = lines[index]
            if re.match(pattern, line):
                lines.remove(line)
                if ((not line.endswith('\n')) and (index > 0)):
                    lines[(index - 1)] = lines[(index - 1)].rstrip('\n')
    self._write_local(lines)
    self._push_file()
