bug fixes to make logentries for removed files work
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@59 8cb11bc2-c004-0410-86c3-e597b4017df7remotes/tags/CVSDB_PRODUCTION
parent
cd7aa6b5da
commit
d87876bb54
|
@ -32,7 +32,7 @@
|
|||
#
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
import cfg, database, rlog, commit
|
||||
import os, cfg, database, rlog, commit
|
||||
|
||||
## error
|
||||
error = 'cvsdbapi error'
|
||||
|
|
18
lib/rlog.py
18
lib/rlog.py
|
@ -58,7 +58,11 @@ class RLogData:
|
|||
"Container object for all data parsed from a 'rlog' output."
|
||||
|
||||
def __init__(self, filename):
|
||||
## remove the RCS ",v" from the filename
|
||||
if filename[-2:] == ",v":
|
||||
filename = filename[:-2]
|
||||
self.filename = filename
|
||||
|
||||
self.symbolic_name_hash = {}
|
||||
self.rlog_entry_list = []
|
||||
|
||||
|
@ -105,8 +109,18 @@ class RLog:
|
|||
arg_list.append('-r%s' % (self.revision))
|
||||
if self.date:
|
||||
arg_list.append('-d%s' % (self.date))
|
||||
|
||||
self.cmd = 'rlog %s "%s"' % (string.join(arg_list), filename)
|
||||
|
||||
## modify path if in Attic
|
||||
if self.filename[-2:] != ",v":
|
||||
self.filename = "%s,v" % (self.filename)
|
||||
|
||||
if not os.path.isfile(self.filename):
|
||||
path, basename = os.path.split(self.filename)
|
||||
self.filename = os.path.join(path, "Attic", basename)
|
||||
if not os.path.isfile(self.filename):
|
||||
raise error, "file not found"
|
||||
|
||||
self.cmd = 'rlog %s "%s"' % (string.join(arg_list), self.filename)
|
||||
self.rlog = os.popen(self.cmd, 'r')
|
||||
|
||||
def readline(self):
|
||||
|
|
|
@ -108,7 +108,7 @@ def CommitFromFileData(repository, file_data):
|
|||
|
||||
def GetUnrecordedCommitList(repository, file_data):
|
||||
filename = os.path.join(repository, file_data.directory, file_data.file)
|
||||
return cvsdbapi.GetUnrecordedCommits(repository, filename)
|
||||
return cvsdbapi.GetUnrecordedCommitList(repository, filename)
|
||||
|
||||
|
||||
def ProcessLoginfo(repository, stdin_list):
|
||||
|
|
Loading…
Reference in New Issue