1. nick brown
  2. aurum


ZyX_I  committed 947199d

@%aurum/drivers/bazaar: Fixed rf-commit(): it had --cleanup key left from git
tests: Added rf-commit() tests

  • Participants
  • Parent commits 199b3fb
  • Branches bzr-support

Comments (0)

Files changed (3)

File autoload/aurum/drivers/bazaar.vim

View file
         call map(['added', 'modified', 'kind changed'],
                     \'extend(a:cs.files, get(statdict, v:val, []))')
         if has_key(statdict, 'removed')
-            let a:cs.removes+=statdict.removes
+            let a:cs.removes+=statdict.removed
         let a:cs.renames=s:F.getrenames(statdict)
         let a:cs.removes+=sort(values(a:cs.renames))
 "▶1 bzr.commit :: repo, message[, files[, user[, date[, _]]]]
 function s:bzr.commit(repo, message, ...)
-    let kwargs={'cleanup': 'verbatim'}
+    let kwargs={}
     let args=[]
     if a:0
         if !empty(a:1)
     if empty(match)
         return 0
     elseif match[0] is# 'renamed'
-        return matchstr(match[1], '\v%(\''.*\''\V => ''\v)@<=.*%(''$)@=')
+        return matchstr(match[1], '\v%(\''.*\''\V => ''\v)@<=.*%(\''$)@=')
         return match[1][1:-2]

File test/drivers-bazaar.ok

Binary file modified.

File test/drivers-bazaar.vim

View file
                     \string(a:repo.functions.getrepoprop(a:repo, p))]
-function FormatCS(repo, cs)
+function FormatCS(repo, cs, ...)
     let g:r+=[' >> Changeset']
     let maxlen=len('description')
     let g:r+=[' # Immediately available keys:']
     for f in split('hex rev time description user parents branch tags')
+        if a:0 && index(a:1, f)!=-1
+            continue
+        endif
         let g:r+=['  '.printf('%-*s', maxlen, f).':'.string(a:cs[f])]
     let g:r+=[' # Keys needed to be obtained by getcsprop:']
     for p in split('allfiles renames changes files removes')
+        if a:0 && index(a:1, f)!=-1
+            continue
+        endif
         let g:r+=['  '.printf('%-*s', maxlen, p).':'.
                     \string(a:repo.functions.getcsprop(a:repo, a:cs, p))]
 let Brepo=aurum#repository()
 cd -
 call FormatStatus(Brepo.functions.status(Brepo, 0, 0, 0, 1, 1))
+call Brepo.functions.commit(Brepo, 'Added added, modified and unknown',
+            \                      ['added', 'modified', 'unknown'],
+            \                      'Abc <abc@example.net>',
+            \                      '2000-01-01 16:23:00')
+call FormatCS(Brepo, Brepo.functions.getwork(Brepo), ['hex'])
+call Brepo.functions.commit(Brepo, "Multiline\ncommit\ncomment")
+call FormatCS(Brepo, Brepo.functions.getwork(Brepo), ['hex', 'time', 'user',
+            \                                         'parents'])
 call WriteFile(r)
 source addEmessages.vim