Пример #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
    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
    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
    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)