ZyX_I committed 2c1eb80

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

  • Participants
  • Parent commits 3370696

Comments (0)

Files changed (3)

File 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)
                     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'

File autoload/aurum/repo.vim

-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',

File doc/aurum.txt

     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
     0.1: Added |:AuBranch| and |:AuName|.
     0.2: Added |:AuOther|.