Commits

ZyX_I committed acf1a77

doc: Fixed docs for rf-annotate()
@aurum/drivers/mercurial: Made line numbers be always numbers, not strings, and revisions be always strings, not numbers

  • Participants
  • Parent commits 81fe276

Comments (0)

Files changed (3)

File doc/aurum.txt

     Check whether file is “dirty” (meaning that it has changes that can be 
     committed).
   annotate :: repo, hex, file -> [ rev ]                   *aurum-rf-annotate*
-    Returns a list of revision numbers: one revision number for each line of 
-    the file as it was at given changeset.
+    Returns a list of 3-tuples: ({hex}, {file}, {line-number}), one 3-tuple 
+    for each line of the file as it was at given changeset. {hex} must be 
+    anything supported by |aurum-rf-getcs|, {file} is a filename (in case this 
+    function is able to track copies or renames) and {line-number} is number 
+    of the corresponding line in that file as it was at that revision.
   diff :: hex, hex, [ file ], diffopts -> [ String ]           *aurum-rf-diff*
     Returns list of strings (similar to |readfile()| output with "b" flag set) 
     that contains changes made to given files between given revisions. If list 

File plugin/aurum/drivers/mercurial.vim

         if empty(match)
             call s:_f.throw('annfail', a:rev, a:file, line)
         endif
-        let r+=[[match[2], str2nr(match[1]), str2nr(match[3])]]
+        let r+=[[match[2], match[1], str2nr(match[3])]]
     endfor
     return r
 endfunction

File python/aurum.py

     try:
         ann=g_fctx(g_cs(g_repo(path), rev), filepath).annotate(follow=True,
                                                                linenumber=True)
-        ann_vim=[(line[0][0].path(), str(line[0][0].rev()), str(line[0][1]))
+        ann_vim=[(line[0][0].path(), str(line[0][0].rev()), line[0][1])
                                                                 for line in ann]
         vim.eval('extend(r, '+nonutf_dumps(ann_vim)+')')
     except AurumError: