Commits

ZyX_I  committed a0520d9

Made cmdutils.getrrf not ignore opts.rev

  • Participants
  • Parent commits 40d4620

Comments (0)

Files changed (3)

File README.markdown

 This plugin provides a vim <--> VCS (currently only mercurial) integration for 
 your projects. Features:
 
-  - Partially committing changes ([:AuRecord](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line320-0)).
+  - Partially committing changes ([:AuRecord](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line318-0)).
 
-  - Viewing file state at particular revision ([aurum://file](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line551-0), [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line145-0)).
+  - Viewing file state at particular revision ([aurum://file](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line549-0), [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line143-0)).
 
   - Viewing uncommited changes in a vimdiff, as well as changes between 
-    specific revisions ([:AuVimDiff](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line360-0)). It is also possible to open multiple 
+    specific revisions ([:AuVimDiff](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line358-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#line221-0)). Output is highly customizable.
+  - Viewing revisions log ([:AuLog](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line219-0)). Output is highly customizable.
 
-  - Viewing working directory status ([:AuStatus](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line324-0)).
+  - Viewing working directory status ([:AuStatus](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line322-0)).
 
-  - Commiting changes ([:AuCommit](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line86-0)), commit messages are remembered in case of 
-    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line796-0)).
+  - Commiting changes ([:AuCommit](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line84-0)), commit messages are remembered in case of 
+    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line794-0)).
 
   - Frontends for various VCS commands.
 
-Most commands can be reached with a set of mappings (see [aurum-mappings](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line693-0)), 
+Most commands can be reached with a set of mappings (see [aurum-mappings](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line691-0)), 
 all mappings are customizable.
 
 

File doc/aurum.txt

       and current revision is revision under cursor.
    5. For other buffers: current file is file name, current revision is 
       working directory revision.
-5. If file argument is not specified then revision argument (if any) will be 
-   ignored for |aurum://file|, |aurum://status| and |aurum://diff| buffers.
 
 AuAnnotate [file {file}] [rev {rev}] [repo {repo}]               *:AuAnnotate*
     Annotate rev {rev} of a file {file}. By default annotates current revision 

File plugin/aurum/cmdutils.vim

         "▶2 rev
         if a:ann==-2
             let rev=0
+        elseif has_key(a:opts, 'rev')
+            let oldrev=0
+            if exists('rev') && rev isnot 0
+                let oldrev=repo.functions.getrevhex(repo, rev)
+            endif
+            let rev=repo.functions.getrevhex(repo, a:opts.rev)
+            if hasbuf && rev isnot# oldrev
+                let hasbuf=0
+            endif
         elseif exists('rev')
             if rev isnot 0
                 let rev=repo.functions.getrevhex(repo, rev)
             endif
-        elseif has_key(a:opts, 'rev')
-            let rev=repo.functions.getrevhex(repo, a:opts.rev)
         else
             let rev=0
         endif