Commits

ZyX_I committed 9de8556

Consistency change: use bang instead of “force” option

Comments (0)

Files changed (3)

     Annotate rev {rev} of a file {file}. By default annotates current revision 
     of a current file (|aurum-current-file|).
 
-AuBranch {branch} [repo {repo}] [force]                            *:AuBranch*
+AuBranch[!] {branch} [repo {repo}]                                 *:AuBranch*
     Set current branch name to {branch}.
 
 AuCommit {options} [glob1 [glob2 [...]]]                           *:AuCommit*
     " TODO :AuMerge ?
     " TODO :AuExplore
     let s:addargs={'Update': {'bang': 1}, 'Move': {'bang': 1},
-                \    'Name': {'bang': 1}}
+                \  'Branch': {'bang': 1}, 'Name': {'bang': 1}}
     for s:cmd in ['Update', 'Move', 'Junk', 'Track', 'Hyperlink', 'Grep',
                 \ 'Branch', 'Name']
         let s:part=tolower(s:cmd[:3])
             \'\Vfiles \+type ""', 'files (path)', ''),
             \'\v(rev%(ision|range))\ +\Vtype ""', '\1 '.s:_r.comp.rev, 'g'))
 "▶1 branfunc
-function s:branfunc.function(branch, opts)
+function s:branfunc.function(bang, branch, opts)
     let repo=s:_r.repo.get(a:opts.repo)
     call s:_r.cmdutils.checkrepo(repo)
-    let force=get(a:opts, 'force', 0)
+    let force=a:bang
     if !force && index(repo.functions.getrepoprop(repo, 'brancheslist'),
                 \      a:branch)!=-1
         call s:_f.throw('bexsts', a:branch, repo.path)
     endif
     call repo.functions.branch(repo, a:branch, force)
 endfunction
-let s:branfunc['@FWC']=['-onlystrings '.
+let s:branfunc['@FWC']=['-onlystrings _ '.
             \           'type "" '.
             \           '{  repo '.s:_r.cmdutils.nogetrepoarg.
-            \           ' ?!force'.
             \           '}', 'filter']
 call add(s:brancomp, s:branfunc['@FWC'][0])
 "▶1 namefunc
 :R silent AuCommit type ? message Added\ deffile deffile
 :WT
 :W{{{1 force C
-:R silent AuBranch C force
+:R silent AuBranch! C
 :R call writefile(['ghi'], 'ghifile')
 :R silent AuCommit type ? message Added\ ghifile ghifile
 :WT
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.