branch : pmacs2
This commit is contained in:
moculus 2008-09-18 18:12:29 +00:00
parent b932b76c8b
commit 38d88eecbb
1 changed files with 18 additions and 0 deletions

View File

@ -98,6 +98,24 @@ class CvsStatus(Method):
wrev, rrev, stag,
sdate, soptions))
class CvsLog(Method):
'''diff the current file with the version in CVS'''
def _execute(self, w, **vargs):
if not hasattr(w.buffer, 'path'):
w.set_error("Buffer has no corresponding file")
return
cwd = os.getcwd() + os.path.sep
path = w.buffer.path
if path.startswith(cwd):
path = path[len(cwd):]
cmd = "cvs log %r" % path
(status, data) = commands.getstatusoutput(cmd)
status = status >> 8
w.application.data_buffer("*Log*", data, switch_to=True)
w.set_error("cvs log exited with %d" % status)
class CvsDiff(Method):
'''diff the current file with the version in CVS'''
def _execute(self, w, **vargs):