コード例 #1
0
ファイル: cmdutil.py プロジェクト: Nurb432/plan9front
 def __init__(self, ui, repo, patch, diffopts, mapfile, buffered):
     changeset_printer.__init__(self, ui, repo, patch, diffopts, buffered)
     formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12])
     self.t = templater.templater(mapfile, {'formatnode': formatnode},
                                  cache={
                                      'parent': '{rev}:{node|formatnode} ',
                                      'manifest': '{rev}:{node|formatnode}',
                                      'filecopy': '{name} ({source})'})
コード例 #2
0
ファイル: cmdutil.py プロジェクト: as/9front-work
 def __init__(self, ui, repo, patch, diffopts, mapfile, buffered):
     changeset_printer.__init__(self, ui, repo, patch, diffopts, buffered)
     formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12])
     self.t = templater.templater(mapfile, {'formatnode': formatnode},
                                  cache={
                                      'parent': '{rev}:{node|formatnode} ',
                                      'manifest': '{rev}:{node|formatnode}',
                                      'filecopy': '{name} ({source})'
                                  })
コード例 #3
0
ファイル: cmdutil.py プロジェクト: c0ns0le/cygwin
 def __init__(self, ui, repo, patch, mapfile, buffered):
     changeset_printer.__init__(self, ui, repo, patch, buffered)
     filters = templatefilters.filters.copy()
     filters['formatnode'] = (ui.debugflag and (lambda x: x)
                              or (lambda x: x[:12]))
     self.t = templater.templater(mapfile, filters,
                                  cache={
                                      'parent': '{rev}:{node|formatnode} ',
                                      'manifest': '{rev}:{node|formatnode}',
                                      'filecopy': '{name} ({source})'})
コード例 #4
0
ファイル: cmdutil.py プロジェクト: saminigod/cygwin
 def __init__(self, ui, repo, patch, mapfile, buffered):
     changeset_printer.__init__(self, ui, repo, patch, buffered)
     filters = templatefilters.filters.copy()
     filters['formatnode'] = (ui.debugflag and (lambda x: x)
                              or (lambda x: x[:12]))
     self.t = templater.templater(mapfile,
                                  filters,
                                  cache={
                                      'parent': '{rev}:{node|formatnode} ',
                                      'manifest': '{rev}:{node|formatnode}',
                                      'filecopy': '{name} ({source})'
                                  })
コード例 #5
0
ファイル: cmdutil.py プロジェクト: yangdy-buji/idea-community
 def __init__(self, ui, repo, patch, diffopts, mapfile, buffered):
     changeset_printer.__init__(self, ui, repo, patch, diffopts, buffered)
     formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12])
     defaulttempl = {
         'parent': '{rev}:{node|formatnode} ',
         'manifest': '{rev}:{node|formatnode}',
         'file_copy': '{name} ({source})',
         'extra': '{key}={value|stringescape}'
     }
     # filecopy is preserved for compatibility reasons
     defaulttempl['filecopy'] = defaulttempl['file_copy']
     self.t = templater.templater(mapfile, {'formatnode': formatnode},
                                  cache=defaulttempl)
     self.cache = {}
コード例 #6
0
ファイル: cmdutil.py プロジェクト: MezzLabs/mercurial
 def __init__(self, ui, repo, patch, diffopts, mapfile, buffered):
     changeset_printer.__init__(self, ui, repo, patch, diffopts, buffered)
     formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12])
     defaulttempl = {
         'parent': '{rev}:{node|formatnode} ',
         'manifest': '{rev}:{node|formatnode}',
         'file_copy': '{name} ({source})',
         'extra': '{key}={value|stringescape}'
         }
     # filecopy is preserved for compatibility reasons
     defaulttempl['filecopy'] = defaulttempl['file_copy']
     self.t = templater.templater(mapfile, {'formatnode': formatnode},
                                  cache=defaulttempl)
     self.cache = {}
コード例 #7
0
def _formatlabels(repo, fcd, fco, labels):
    """Formats the given labels using the conflict marker template.

    Returns a list of formatted labels.
    """
    cd = fcd.changectx()
    co = fco.changectx()

    ui = repo.ui
    template = ui.config('ui', 'mergemarkertemplate', _defaultconflictmarker)
    template = templater.parsestring(template, quoted=False)
    tmpl = templater.templater(None, cache={ 'conflictmarker' : template })

    pad = max(len(labels[0]), len(labels[1]))

    return [_formatconflictmarker(repo, cd, tmpl, labels[0], pad),
            _formatconflictmarker(repo, co, tmpl, labels[1], pad)]
コード例 #8
0
def _formatlabels(repo, fcd, fco, labels):
    """Formats the given labels using the conflict marker template.

    Returns a list of formatted labels.
    """
    cd = fcd.changectx()
    co = fco.changectx()

    ui = repo.ui
    template = ui.config('ui', 'mergemarkertemplate', _defaultconflictmarker)
    template = templater.parsestring(template, quoted=False)
    tmpl = templater.templater(None, cache={'conflictmarker': template})

    pad = max(len(labels[0]), len(labels[1]))

    return [
        _formatconflictmarker(repo, cd, tmpl, labels[0], pad),
        _formatconflictmarker(repo, co, tmpl, labels[1], pad)
    ]
コード例 #9
0
def _formatlabels(repo, fcd, fco, fca, labels):
    """Formats the given labels using the conflict marker template.

    Returns a list of formatted labels.
    """
    cd = fcd.changectx()
    co = fco.changectx()
    ca = fca.changectx()

    ui = repo.ui
    template = ui.config('ui', 'mergemarkertemplate', _defaultconflictmarker)
    tmpl = templater.templater(None, cache={'conflictmarker': template})

    pad = max(len(l) for l in labels)

    newlabels = [
        _formatconflictmarker(repo, cd, tmpl, labels[0], pad),
        _formatconflictmarker(repo, co, tmpl, labels[1], pad)
    ]
    if len(labels) > 2:
        newlabels.append(_formatconflictmarker(repo, ca, tmpl, labels[2], pad))
    return newlabels
コード例 #10
0
ファイル: filemerge.py プロジェクト: pierfort123/mercurial
def _formatlabels(repo, fcd, fco, fca, labels):
    """Formats the given labels using the conflict marker template.

    Returns a list of formatted labels.
    """
    cd = fcd.changectx()
    co = fco.changectx()
    ca = fca.changectx()

    ui = repo.ui
    template = ui.config("ui", "mergemarkertemplate", _defaultconflictmarker)
    tmpl = templater.templater(None, cache={"conflictmarker": template})

    pad = max(len(l) for l in labels)

    newlabels = [
        _formatconflictmarker(repo, cd, tmpl, labels[0], pad),
        _formatconflictmarker(repo, co, tmpl, labels[1], pad),
    ]
    if len(labels) > 2:
        newlabels.append(_formatconflictmarker(repo, ca, tmpl, labels[2], pad))
    return newlabels
コード例 #11
0
ファイル: formatter.py プロジェクト: pierfort123/mercurial
def gettemplater(ui, topic, spec):
    tmpl, mapfile = lookuptemplate(ui, topic, spec)
    t = templater.templater(mapfile, {})
    if tmpl:
        t.cache[topic] = tmpl
    return t
コード例 #12
0
ファイル: formatter.py プロジェクト: pierfort123/mercurial
def gettemplater(ui, topic, spec):
    tmpl, mapfile = lookuptemplate(ui, topic, spec)
    t = templater.templater(mapfile, {})
    if tmpl:
        t.cache[topic] = tmpl
    return t