parent
f535aa1286
commit
710937cc47
|
@ -1,3 +1,4 @@
|
||||||
|
from collections import defaultdict
|
||||||
import codecs, datetime, grp, os, pwd, re, shutil, stat, string
|
import codecs, datetime, grp, os, pwd, re, shutil, stat, string
|
||||||
import fcntl, select, pty, threading
|
import fcntl, select, pty, threading
|
||||||
import aes, dirutil, regex, highlight, lex, term
|
import aes, dirutil, regex, highlight, lex, term
|
||||||
|
|
|
@ -94,9 +94,16 @@ class CvsStatus(Method):
|
||||||
assert m, "regex6 %r" % lines[7]
|
assert m, "regex6 %r" % lines[7]
|
||||||
soptions = m.group(1)
|
soptions = m.group(1)
|
||||||
|
|
||||||
w.set_error('%s %s %s/%s [%s|%s|%s]' % (ffile, fstatus,
|
w.buffer.metadata['cvs-filename'] = ffile
|
||||||
wrev, rrev, stag,
|
w.buffer.metadata['cvs-status'] = fstatus
|
||||||
sdate, soptions))
|
w.buffer.metadata['cvs-wrev'] = wrev
|
||||||
|
w.buffer.metadata['cvs-rrev'] = rrev
|
||||||
|
w.buffer.metadata['cvs-tag'] = stag
|
||||||
|
w.buffer.metadata['cvs-date'] = sdate
|
||||||
|
w.buffer.metadata['vc-info'] = '[cvs:%s/%s]' % (wrev, rrev)
|
||||||
|
|
||||||
|
tpl = (ffile, fstatus, wrev, rrev, stag, sdate, soptions)
|
||||||
|
w.set_error('%s %s %s/%s [%s|%s|%s]' % tpl)
|
||||||
|
|
||||||
class CvsLog(Method):
|
class CvsLog(Method):
|
||||||
'''diff the current file with the version in CVS'''
|
'''diff the current file with the version in CVS'''
|
||||||
|
|
|
@ -124,11 +124,12 @@ class SvnStatus(Method):
|
||||||
except:
|
except:
|
||||||
raise Exception, '%r %r' % (fields, data[6:])
|
raise Exception, '%r %r' % (fields, data[6:])
|
||||||
|
|
||||||
w.buffer.metadata['svn-filename'] = lrev
|
w.buffer.metadata['svn-filename'] = filename
|
||||||
w.buffer.metadata['svn-status'] = lrev
|
w.buffer.metadata['svn-status'] = status
|
||||||
w.buffer.metadata['svn-lrev'] = lrev
|
w.buffer.metadata['svn-lrev'] = lrev
|
||||||
w.buffer.metadata['svn-rrev'] = lrev
|
w.buffer.metadata['svn-rrev'] = rrev
|
||||||
w.buffer.metadata['svn-author'] = lrev
|
w.buffer.metadata['svn-author'] = lauthor
|
||||||
|
|
||||||
w.set_error('%s %s %s/%s [%s]' % (filename, status, rrev, lrev, lauthor))
|
w.set_error('%s %s %s/%s [%s]' % (filename, status, rrev, lrev, lauthor))
|
||||||
|
|
||||||
class SvnLog(Method):
|
class SvnLog(Method):
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
from collections import defaultdict
|
||||||
import math, os, string
|
import math, os, string
|
||||||
import color, method
|
import color, method
|
||||||
from lex import Lexer
|
from lex import Lexer
|
||||||
|
@ -101,7 +102,8 @@ class Fundamental(Handler):
|
||||||
actions = []
|
actions = []
|
||||||
_bindings = {}
|
_bindings = {}
|
||||||
completers = {}
|
completers = {}
|
||||||
format = "%(flag)s %(bname)-18s (%(mname)s) %(indent)s %(cursor)s/%(mark)s %(perc)s"
|
#format = "%(flag)s %(bname)-18s (%(mname)s) %(indent)s %(cursor)s/%(mark)s %(perc)s"
|
||||||
|
format = "%(flag)s %(bname)-18s (%(mname)s) %(indent)s %(cursor)s %(perc)s %(vc-info)s"
|
||||||
|
|
||||||
header_size = 3
|
header_size = 3
|
||||||
header_fg = 'default'
|
header_fg = 'default'
|
||||||
|
@ -420,16 +422,19 @@ class Fundamental(Handler):
|
||||||
def get_status_names(self):
|
def get_status_names(self):
|
||||||
w = self.window
|
w = self.window
|
||||||
c = w.logical_cursor()
|
c = w.logical_cursor()
|
||||||
d = {
|
d = defaultdict(str)
|
||||||
|
d2 = {
|
||||||
'bname': w.buffer.name(),
|
'bname': w.buffer.name(),
|
||||||
'mname': self.name(),
|
'mname': self.name(),
|
||||||
'flag': self._get_flag(),
|
'flag': self._get_flag(),
|
||||||
'perc': self._get_perc(),
|
'perc': self._get_perc(),
|
||||||
'indent': self._get_indent(),
|
'indent': self._get_indent(),
|
||||||
'cursor': '(%d,%d)' % (c.y + 1, c.x + 1),
|
'cursor': '(%d,%d)' % (c.y + 1, c.x + 1),
|
||||||
'first': '(%d,%d)' % (w.first.y + 1, w.first.x + 1),
|
'first': '(%d,%d)' % (w.first.y + 1, w.first.x + 1),
|
||||||
'mark': self._get_mark(),
|
'mark': self._get_mark(),
|
||||||
}
|
}
|
||||||
|
d.update(d2)
|
||||||
|
d.update(dict(w.buffer.metadata))
|
||||||
return d
|
return d
|
||||||
def get_status_bar(self):
|
def get_status_bar(self):
|
||||||
names = self.get_status_names()
|
names = self.get_status_names()
|
||||||
|
|
Loading…
Reference in New Issue