Commits

ZyX_I  committed d9d4340

@aurum: Made AuCommit accept “type all”
@%aurum/status: Made _r.status.parseshow parse “all”
tests: Fixed opts-remembermsg test

  • Participants
  • Parent commits da1fd49

Comments (0)

Files changed (6)

File README.markdown

 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#line407-0)).
+  - Partially committing changes ([:AuRecord](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line408-0)).
 
-  - Viewing file state at particular revision ([aurum://file](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line686-0), [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line163-0)).
+  - Viewing file state at particular revision ([aurum://file](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line687-0), [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line164-0)).
 
   - Viewing uncommited changes in a vimdiff, as well as changes between 
-    specific revisions ([:AuVimDiff](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line450-0)). It is also possible to open multiple 
+    specific revisions ([:AuVimDiff](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line451-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#line262-0)). Output is highly customizable.
+  - Viewing revisions log ([:AuLog](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line263-0)). Output is highly customizable.
 
-  - Viewing working directory status ([:AuStatus](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line411-0)).
+  - Viewing working directory status ([:AuStatus](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line412-0)).
 
   - Commiting changes ([:AuCommit](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line104-0)), commit messages are remembered in case of 
-    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line1069-0)).
+    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line1070-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#line205-0)). For mercurial it also 
+    attached: useful for sharing) ([:AuHyperlink](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line206-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#line506-0), [aurum#repository()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line502-0) and [aurum#status()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line510-0) functions 
+  - [aurum#changeset()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line507-0), [aurum#repository()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line503-0) and [aurum#status()](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line511-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#line848-0)), 
+Most commands can be reached with a set of mappings (see [aurum-mappings](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line849-0)), 
 all mappings are customizable.
 
 
 
   - [frawor](https://bitbucket.org/ZyX_I/frawor)
 
-  - Command-T, Ctrlp, FuzzyFinder, unite, ku or tlib for [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line163-0) prompt 
+  - Command-T, Ctrlp, FuzzyFinder, unite, ku or tlib for [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line164-0) prompt 
     option and a number of OpenAny/AnnotateAny mappings (optional).
 
 (with their dependencies).

File autoload/aurum/commit.vim

 execute frawor#Setup('1.1', {'@/resources': '0.0',
             \                  '@/options': '0.0',
             \                     '@aurum': '1.0',
-            \             '@%aurum/status': '1.0',
+            \             '@%aurum/status': '1.2',
             \           '@%aurum/cmdutils': '4.0',
             \            '@%aurum/bufvars': '0.0',
             \               '@%aurum/edit': '1.0',

File autoload/aurum/status.vim

 "▶1 
 scriptencoding utf-8
-execute frawor#Setup('1.1', {'@%aurum/cmdutils': '4.0',
+execute frawor#Setup('1.2', {'@%aurum/cmdutils': '4.0',
             \                    '@%aurum/edit': '1.0',
             \                          '@aurum': '1.0',
             \                       '@/options': '0.0',
 call map(copy(s:allshow),   'extend(s:showchars, {toupper(v:val[0]): v:val})')
 "▶1 parseshow :: [Either type tabbr] → [type]
 function s:F.parseshow(show)
+    if index(a:show, 'all')!=-1
+        return copy(s:allshow)
+    endif
     let r=[]
     for type in a:show
         if type[0]=~#'^\l'
     let requiresclean=0
     let requiresignored=0
     if has_key(opts, 'show')
-        if index(opts.show, 'all')==-1
-            let show=s:F.parseshow(opts.show)
-            let requiresclean=(index(show, 'clean')!=-1)
-            let requiresignored=(index(show, 'ignored')!=-1)
-        else
-            let show=s:allshow
-            let requiresclean=1
-            let requiresignored=1
-        endif
+        let show=s:F.parseshow(opts.show)
+        let requiresclean=(index(show, 'clean')!=-1)
+        let requiresignored=(index(show, 'ignored')!=-1)
     else
         let show=s:defshow
     endif

File doc/aurum.txt

     tracked files will be commited (equivalent to running “!hg commit”).
     Possible options:
     Option  Description ~
-    type    Either one of modified/added/removed/deleted/unknown or string 
+    type    Either one of modified/added/removed/deleted/unknown, string 
             containing capitalized first letters of mentined status names 
-            (additionally “?” for unknown and “!” for deleted). May be 
-            specified more then once. Determines what files should be matched 
-            against given globs: “AuCommit **” is equivalent to “AuCommit 
-            all”, but “AuCommit type MARDU **” will also add untracked and 
-            remove missing files (like “hg commit -A”). Does not affect 
-            “:AuCommit all” and “:AuCommit”, latter will always add current 
-            file if it was untracked.
+            (additionally “?” for unknown and “!” for deleted), or “all” that 
+            is equivalent to specifying all statuses. May be specified more 
+            then once. Determines what files should be matched against given 
+            globs: “AuCommit **” is equivalent to “AuCommit all”, but 
+            “AuCommit type MARDU **” will also add untracked and remove 
+            missing files (like “hg commit -A”). Does not affect “:AuCommit 
+            all” and “:AuCommit”, latter will always add current file if it 
+            was untracked.
     message Commit message.
     user    Committer.
     date    Commit date in form yy-mm-dd_HH:MM:SS. Both date and time parts 
 @%aurum/status:
     1.0: Renamed |:AuStatus| “rev1” and “rev2” options to “rev” and “wdrev” 
          respectively. Same for |aurum://status| “rev1” and “rev2” options.
+    1.1: Added |:AuStatus| changes
+    1.2: Made _r.status.parseshow handle “all” “status”
 @%aurum/commit:
     1.0: Added fifth argument to _r.commit.commit().
     1.1: Added sixth optional argument to _r.commit.commit()

File plugin/aurum.vim

             \'Commit':    { 'fwc': '{  repo '.s:nogetrepoarg.
             \                      ' *?type      (either (in [modified added '.
             \                                                'removed deleted '.
-            \                                                'unknown] ~start,'.
+            \                                                'unknown all] '.
+            \                                               '~start,'.
             \                                            'match /\v^[MARDU?!]+$/))'.
             \                      '  ?message   type ""'.
             \                      '  ?user      type ""'.

File test/opts-remembermsg.in

 :
 :WT
 :let g:aurum_remembermsg=0
-:R AuCommit **
+:R AuCommit type all **
 :try | write | catch | echom v:exception | endtry
 :bw!
 :source addmessages.vim