Commits

ZyX_I committed 2c1eb80

@%aurum/repo: Added revreg
@%aurum/log/templates: Added revreg support
Fixed $parents and $children syntax rules

Comments (0)

Files changed (3)

autoload/aurum/log/templates.vim

 let s:kwmarg.empty=''''''
 let s:kwpempt=['parents', 'children', 'tags', 'bookmarks']
 let s:kwreg={
-            \'rev' : '\d\+',
-            \'parents': '\v\x{12,}( \x{12,})?',
-            \'children': '\v\x{12,}( \x{12,})*',
             \'phase': '\v(public|draft|secret)',
         \}
 let s:kwreqseqkw=['hex', 'branch', 'user', 'rev', 'time', 'parents', 'children',
                         call s:F.addgroup(r, nlgroups, 'auLog_'.kw.trail)
                     endif
                     let nextlit=get(arg, 'suf', get(lit, j+1, 0))
-                    let r+=['syn match auLog_'.kw.' '.
-                                \'/'.s:F.getkwreg(kw, nextlit).'/ '.
+                    if kw is# 'rev'
+                        let reg=get(a:repo, 'revreg', '\v\d+')
+                    elseif kw is# 'parents' || kw is# 'children'
+                        let reg=get(a:repo, 'hexreg', '\x{12,}')
+                        let reg='\v'.reg.'(\ '.reg.')*'
+                    else
+                        let reg=s:F.getkwreg(kw, nextlit)
+                    endif
+                    let r+=['syn match auLog_'.kw.' /'.reg.'/ '.
                                 \'contained nextgroup=']
                     if has_key(arg, 'suf')
                         let r[-1].='auLog_'.kw.'_suf'

autoload/aurum/repo.vim

 "▶1
-execute frawor#Setup('5.1', {'@/resources': '0.0',
+execute frawor#Setup('5.2', {'@/resources': '0.0',
             \                       '@/os': '0.0',
             \                  '@/options': '0.0',
             \          '@%aurum/lineutils': '0.0',
     rule that matches exactly 12 first hexadecimal numbers (|/\x|) followed by 
     another rule than matches any positive number of hexadecimal characters 
     and conceals them (requires |+conceal| to work properly).
+revreg :: Regex                                            *aurum-repo.revreg*
+    Like |aurum-repo.hexreg|, but for |aurum-cs.rev|. Default is \d\+ (|\d|).
 hasrevisions :: Bool                                 *aurum-repo.hasrevisions*
     Determines whether |aurum-cs.rev| contains something different from 
     abbreviated hash. If this option is false, then in log produced by 
     4.1: Added csnum key to value returned by |aurum-repo.iterfuncs|.func().
     5.0: Removed _r.repo.update, .diffoptslst and .diffoptsstr.
     5.1: Added repo.hasphases
+    5.2: Added repo.revreg
 @aurum:
     0.1: Added |:AuBranch| and |:AuName|.
     0.2: Added |:AuOther|.