1. nick brown
  2. aurum

Commits

ZyX_I  committed 3690fb9

ftplugin/aurumlog: Added possibility to open diff with removed file
Updated README

  • Participants
  • Parent commits 18b1e28
  • Branches default

Comments (0)

Files changed (2)

File README.markdown

View file
 This plugin provides a vim <--> VCS (currently mercurial, git and subversion) 
 integration for your projects. Features:
 
-  - Partially committing changes ([:AuRecord](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line372-0)).
+  - Partially committing changes ([:AuRecord](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line380-0)).
 
-  - Viewing file state at particular revision ([aurum://file](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line614-0), [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line158-0)).
+  - Viewing file state at particular revision ([aurum://file](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line622-0), [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line160-0)).
 
   - Viewing uncommited changes in a vimdiff, as well as changes between 
-    specific revisions ([:AuVimDiff](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line415-0)). It is also possible to open multiple 
+    specific revisions ([:AuVimDiff](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line423-0)). It is also possible to open multiple 
     tabs with all changes to all files viewed as side-by-side diffs.
 
-  - Viewing revisions log ([:AuLog](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line239-0)). Output is highly customizable.
+  - Viewing revisions log ([:AuLog](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line241-0)). Output is highly customizable.
 
-  - Viewing working directory status ([:AuStatus](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line376-0)).
+  - Viewing working directory status ([:AuStatus](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line384-0)).
 
-  - Commiting changes ([:AuCommit](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line99-0)), commit messages are remembered in case of 
-    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line903-0)).
+  - Commiting changes ([:AuCommit](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line101-0)), commit messages are remembered in case of 
+    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line911-0)).
 
   - Obtaining various URL’s out of remote repository URL (like URL of the HTML 
     version of the current file with URL fragment pointing to the current line 
-    attached: useful for sharing) ([:AuHyperlink](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line189-0)).
+    attached: useful for sharing) ([:AuHyperlink](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line191-0)). For mercurial it also 
+    supports git and subversion revisions (in case you are using hg-git and 
+    hgsubversion respectively).
 
-  - [aurum#changeset()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line463-0), [aurum#repository()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line459-0) and [aurum#status()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line467-0) functions 
+  - [aurum#changeset()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line471-0), [aurum#repository()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line467-0) and [aurum#status()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line475-0) functions 
     that are to be used from modeline.
 
   - Frontends for various other VCS commands.
 
-Most commands can be reached with a set of mappings (see [aurum-mappings](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line769-0)), 
+Most commands can be reached with a set of mappings (see [aurum-mappings](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line777-0)), 
 all mappings are customizable.
 
 

File ftplugin/aurumlog.vim

View file
     endif
 endfunction
 "▶1 gethexfile
-function s:F.gethexfile()
+function s:F.gethexfile(...)
     let bvar=s:_r.bufvars[bufnr('%')]
     let [blockstart, blockend, hex]=bvar.getblock(bvar)
     let spname=s:F.findCurSpecial(bvar, hex, blockstart[0])
     let cs=bvar.repo.changesets[hex]
     let file=0
+    let fileskey=((a:0 && a:1)?('changes'):('files'))
     if spname=~#'\v^file\d+$'
         " XXX If fileN special exists, then files property was definitely added, 
         " so no need to use getcsprop()
         let file=cs.files[str2nr(spname[4:])]
     " Above is not applicable if we don't know exactly whether such special 
     " exists
-    elseif !empty(bvar.repo.functions.getcsprop(bvar.repo, cs, 'files'))
-        if len(cs.files)==1
-            let file=cs.files[0]
+    elseif !empty(bvar.repo.functions.getcsprop(bvar.repo, cs, fileskey))
+        if len(cs[fileskey])==1
+            let file=cs[fileskey][0]
         else
             if has_key(bvar.opts, 'files') &&
                         \!has_key(bvar.opts.ignorefiles, 'open')
                 let files=copy(bvar.opts.csfiles[hex])
-                call filter(files, 'index(cs.files, v:val)!=-1')
+                call filter(files, 'index(cs[fileskey], v:val)!=-1')
                 if empty(files)
                     call s:_f.throw('novfilesff', hex)
                 endif
             else
-                let files=copy(cs.files)
+                let files=copy(cs[fileskey])
                 if empty(files)
                     call s:_f.throw('novfiles', hex)
                 endif
 endfunction
 "▶1 diff
 function s:F.diff(...)
-    let [hex, file]=s:F.gethexfile()
+    let [hex, file]=s:F.gethexfile(1)
     if file is 0
         return ''
     endif