ZyX_I avatar ZyX_I committed 70ad833

Add bzr.strip, fix git.strip

Comments (0)

Files changed (4)

autoload/aurum/drivers/bazaar.vim

             \    'pushf': 'Failed to push the repository %s: %s',
             \    'pullf': 'Failed to pull to the repository %s: %s',
             \  'commitf': 'Failed to commit changes to the repository %s: %s',
+            \   'stripf': 'Failed to strip revision %s '.
+            \             'from the repository %s: %s',
             \  'p_empty': 'Parser error: expected 60 dashes, but got nothing',
             \  'p_nobeg': 'Parser error: expected 60 dashes, but got %s',
             \ 'p_nospec': 'Parser error: expected “spec: value”, but got %s',
     return s:_r.utils.usefile(a:repo, a:message, 'file', 'message',
                 \             s:F.bzrm, args, kwargs, 0, 'commitf')
 endfunction
+"▶1 bzr.strip :: repo, [rev[, force]]
+function s:bzr.strip(repo, ...)
+    let kwargs={'force': get(a:000, 1, 0)}
+    if a:0 && !empty(a:1)
+        let kwargs.revision=''.a:1
+    endif
+    return s:F.bzrm(a:repo, 'uncommit', [], kwargs, 0,
+                \   'stripf', get(kwargs, 'revision', -1))
+endfunction
 "▶1 bzr.branch :: repo, branchname, force → + FS
 function s:bzr.branch(repo, branch, force)
     if a:force

autoload/aurum/drivers/git.vim

             \'branchf': 'Failed to get list of branches '.
             \           'from the repository %s: %s',
             \  'grepf': 'Failed to search through the repository %s: %s',
-            \ 'stripf': 'Failed to strip revision %s from %s: %s',
+            \ 'stripf': 'Failed to strip revision %s '.
+            \           'from the repository %s: %s',
             \   'tagf': 'Failed to get list of tags from the repository %s: %s',
             \   'addf': 'Failed to add file %s to the repository %s: %s',
             \ 'cbnimp': 'Git driver is not able to close branch',
                 \             s:F.gitm, args, kwargs, 0, 'cif')
 endfunction
 "▶1 git.strip :: [rev[, force]]
-function s:git.strip(...)
+function s:git.strip(repo, ...)
     let args=[(a:0 && !empty(a:1))?(a:1):('HEAD^')]
     if a:0>1 && !empty(a:2)
         call s:_f.throw('sfnsup')

autoload/aurum/drivers/mercurial.vim

 function s:hg.strip(repo, ...)
     let kwargs={'force': (a:0>1 && !empty(a:2))}
     if a:0 && !empty(a:1)
-        let kwargs.rev=a:1
+        let kwargs.rev=''.a:1
         let cmd='strip'
     else
         let cmd='rollback'

autoload/aurum/powerline.vim

 function s:F.define_local_themes()
 python <<EOF
 buffer_type_hl = [u"aurum_buffer_type", u"line_current_symbol"]
-filler_segment = {u"type": u"string", u"width": u"auto", u"highlight_group": u"background", "draw_divider": False}
+filler_segment = {u"type": u"string", u"width": u"auto", u"highlight_group": u"background", "draw_divider": False, "draw_soft_divider": False, "draw_hard_divider": False}
 powerline.add_local_theme("aurum.powerline.is_commit", {
     u"default_module": u"aurum.powerline",
     u"segments": {
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.