Commits

ZyX_I committed e2c73ce

Backed out changeset dd8f68e29101

There is at least one case when this commit makes logger show less revisions
then it will otherwise do: when opts.limit is set and first parent of logged
changeset differs from changeset that will be output by csiterfuncs.next()
on next call.

Ref #9

  • Participants
  • Parent commits dd8f68e
  • Branches betterinterestingparents

Comments (0)

Files changed (2)

plugin/aurum/log.vim

     "▶3 Populate self.interesting_parents
     let self.interesting_parents=[]
     for parent in a:cs.parents
-        if has_key(self.addchangesets, parent)
-            let self.interesting_parents+=[parent]
-        elseif has_key(self.skipchangesets, parent)
+        if has_key(self.skipchangesets, parent)
+            continue
         elseif !s:iterfuncs.check.check(self.checkd,
                     \              self.repo.functions.getcs(self.repo, parent))
             let self.skipchangesets[parent]=1
+            continue
         else
-            let self.addchangesets[parent]=1
             let self.interesting_parents+=[parent]
         endif
     endfor
     let graph.repo=a:opts.repo
     let graph.workcss=a:showparents
     let graph.skipchangesets=a:opts.skipchangesets
-    let graph.addchangesets=a:opts.addchangesets
     let graph.checkd=a:opts.checkd
     call extend(graph, s:F.graph)
     return graph
         let literfuncs=s:iterfuncs.hg
     endif
     "▶3 Initialize variables
-    let haslimit=(has_key(a:opts, 'limit') && a:opts.limit)
+    let haslimit=has_key(a:opts, 'limit')
     if haslimit
         let limit=a:opts.limit
     endif
     let foundfirst=0
     let csbuf=[]
     let reqprops=s:F.requiredpropslist(a:opts)
-    let a:opts.skipchangesets={}
-    let skipchangesets=a:opts.skipchangesets
-    let a:opts.addchangesets={}
-    let addchangesets=a:opts.addchangesets
     "▶3 Initialize variables not required for reading
     if !a:read
         let specials={}
         let a:bvar.rectangles=rectangles
         let a:bvar.specials=specials
         let a:bvar.csstarts=csstarts
+        let a:opts.skipchangesets={}
+        let skipchangesets=a:opts.skipchangesets
         let didredraw=0
         let procinput=a:bvar.procinput
         let lastw0line=-1
         if cs is 0 "▶3
             return r
         endif "▲3
-        let skip=!has_key(addchangesets, cs.hex) &&
-                    \(has_key(skipchangesets, cs.hex) ||
-                    \ !s:iterfuncs.check.check(checkd, cs))
+        let skip=has_key(skipchangesets, cs.hex) ||
+                    \!s:iterfuncs.check.check(checkd, cs)
         "▶3 Add cs to skipchangesets or get its properties
         if skip
             let skipchangesets[cs.hex]=1
         else
-            let addchangesets[cs.hex]=1
             call map(copy(reqprops),
                         \'a:repo.functions.getcsprop(a:repo, cs, v:val)')
             let foundfirst=1
     let r.expr=join(values(map(filter(copy(a:opts),
                 \                     'has_key(s:keytoexpr, v:key)'),
                 \              'eval(s:keytoexpr[v:key])')), '||')
-    let r.haslimit=(has_key(a:opts, 'limit') && a:opts.limit)
-    if r.haslimit
-        let r.limit=a:opts.limit
-    endif
     "▲3
     return r
 endfunction
 "▶2 iterfuncs.check.check
 function s:iterfuncs.check.check(d, cs)
     "▶3 Check simple cases
-    if (!empty(a:d.expr) && eval(a:d.expr)) || (a:d.haslimit && !a:d.limit)
+    if !empty(a:d.expr) && eval(a:d.expr)
         return 0
     endif
     "▶3 Check files
             return 0
         endif
     endif
-    "▶3 Decrement limit
-    " XXX It is duplicating glog.graphlog functionality
-    if a:d.haslimit
-        let a:d.limit-=1
-    endif
     "▲3
     return 1
 endfunction

test/git.ok

Binary file modified.