Commits

Tim Hatch  committed 4aa13e8 Merge with conflicts

Merged in kwadrat/pygments-main (pull request #319)

Conflicts:
pygments/lexers/other.py

  • Participants
  • Parent commits 8dda1eb, 87219c9

Comments (0)

Files changed (3)

File pygments/lexers/_mapping.py

     'TreetopLexer': ('pygments.lexers.parsers', 'Treetop', ('treetop',), ('*.treetop', '*.tt'), ()),
     'TypeScriptLexer': ('pygments.lexers.web', 'TypeScript', ('ts',), ('*.ts',), ('text/x-typescript',)),
     'UrbiscriptLexer': ('pygments.lexers.other', 'UrbiScript', ('urbiscript',), ('*.u',), ('application/x-urbiscript',)),
+    'VCTreeStatusLexer': ('pygments.lexers.other', 'VCTreeStatus', ('vctreestatus',), (), ()),
     'VGLLexer': ('pygments.lexers.other', 'VGL', ('vgl',), ('*.rpf',), ()),
     'ValaLexer': ('pygments.lexers.compiled', 'Vala', ('vala', 'vapi'), ('*.vala', '*.vapi'), ('text/x-vala',)),
     'VbNetAspxLexer': ('pygments.lexers.dotnet', 'aspx-vb', ('aspx-vb',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()),

File pygments/lexers/other.py

            'MscgenLexer', 'KconfigLexer', 'VGLLexer', 'SourcePawnLexer',
            'RobotFrameworkLexer', 'PuppetLexer', 'NSISLexer', 'RPMSpecLexer',
            'CbmBasicV2Lexer', 'AutoItLexer', 'RexxLexer', 'APLLexer',
-           'LSLLexer', 'AmbientTalkLexer', 'PawnLexer']
+           'LSLLexer', 'AmbientTalkLexer', 'PawnLexer', 'VCTreeStatusLexer']
 
 
 class LSLLexer(RegexLexer):
             (r'.*?\n', Comment),
         ]
     }
+
+
+class VCTreeStatusLexer(RegexLexer):
+    """
+    For colorizing output of version control status commans, like "hg
+    status" or "svn status".
+
+    .. versionadded:: 2.0
+    """
+    name = 'VCTreeStatus'
+    aliases = ['vctreestatus']
+    filenames = []
+    mimetypes = []
+
+    tokens = {
+        'root' : [
+            (r'^A  \+  C\s+', Generic.Error),
+            (r'^A\s+\+?\s+', String),
+            (r'^M\s+', Generic.Inserted),
+            (r'^C\s+', Generic.Error),
+            (r'^D\s+', Generic.Deleted),
+            (r'^[\?!]\s+', Comment.Preproc),
+            (r'      >\s+.*\n', Comment.Preproc),
+            (r'.*\n', Text)
+        ]
+    }

File tests/examplefiles/vctreestatus_hg

+M LICENSE
+M setup.py
+! setup.cfg
+? vctreestatus_hg