예제 #1
0
    def __init__(self, meta):
        self.meta = meta
        self.super = super(TagMap, self)
        self.super.__init__()
        self.load(self.meta.tagmap_file)

        # append tag mapping specified from the commandline
        clmap = util.configpath(self.meta.ui, 'tagmap')
        if clmap:
            self.load(clmap)
예제 #2
0
파일: maps.py 프로젝트: fuzzball81/dotfiles
    def __init__(self, meta):
        self.meta = meta
        self.super = super(TagMap, self)
        self.super.__init__()
        self.load(self.meta.tagmap_file)

        # append tag mapping specified from the commandline
        clmap = util.configpath(self.meta.ui, 'tagmap')
        if clmap:
            self.load(clmap)
예제 #3
0
    def __init__(self, ui, filepath):
        super(BaseMap, self).__init__()
        self._ui = ui

        self._commentre = re.compile(r'((^|[^\\])(\\\\)*)#.*')
        self.syntaxes = ('re', 'glob')

        self._filepath = filepath
        self.load(filepath)

        # Append mappings specified from the commandline. A little
        # magic here: our name in the config mapping is the same as
        # the class name lowercased.
        clmap = util.configpath(self._ui, self.mapname())
        if clmap:
            self.load(clmap)
예제 #4
0
파일: maps.py 프로젝트: fuzzball81/dotfiles
    def __init__(self, meta):
        '''Initialise a new FileMap.

        The ui argument is used to print diagnostic messages.

        The path argument is the location of the backing store,
        typically .hg/svn/filemap.
        '''
        self.meta = meta
        self.include = {}
        self.exclude = {}
        if os.path.isfile(self.meta.filemap_file):
            self._load()
        else:
            self._write()

        # append file mapping specified from the commandline
        clmap = util.configpath(self.meta.ui, 'filemap')
        if clmap:
            self.load(clmap)
예제 #5
0
    def __init__(self, meta):
        '''Initialise a new FileMap.

        The ui argument is used to print diagnostic messages.

        The path argument is the location of the backing store,
        typically .hg/svn/filemap.
        '''
        self.meta = meta
        self.include = {}
        self.exclude = {}
        if os.path.isfile(self.meta.filemap_file):
            self._load()
        else:
            self._write()

        # append file mapping specified from the commandline
        clmap = util.configpath(self.meta.ui, 'filemap')
        if clmap:
            self.load(clmap)
예제 #6
0
파일: maps.py 프로젝트: fuzzball81/dotfiles
    def __init__(self, meta):
        '''Initialise a new AuthorMap.

        The ui argument is used to print diagnostic messages.

        The path argument is the location of the backing store,
        typically .hg/svn/authors.
        '''
        self.meta = meta
        self.defaulthost = ''
        if meta.defaulthost:
            self.defaulthost = '@%s' % meta.defaulthost.lstrip('@')

        self.super = super(AuthorMap, self)
        self.super.__init__()
        self.load(self.meta.authormap_file)

        # append authors specified from the commandline
        clmap = util.configpath(self.meta.ui, 'authormap')
        if clmap:
            self.load(clmap)
예제 #7
0
    def __init__(self, meta):
        '''Initialise a new AuthorMap.

        The ui argument is used to print diagnostic messages.

        The path argument is the location of the backing store,
        typically .hg/svn/authors.
        '''
        self.meta = meta
        self.defaulthost = ''
        if meta.defaulthost:
            self.defaulthost = '@%s' % meta.defaulthost.lstrip('@')

        self.super = super(AuthorMap, self)
        self.super.__init__()
        self.load(self.meta.authormap_file)

        # append authors specified from the commandline
        clmap = util.configpath(self.meta.ui, 'authormap')
        if clmap:
            self.load(clmap)