[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#321120: marked as done (cscvs: can't create any cache)



Your message dated Wed, 22 Mar 2006 15:19:16 +0100
with message-id <873bhao93v.fsf@diziet.irb.hr>
and subject line Removed
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: cscvs
Version: 1.0pre25.patch.79-4
Severity: normal
Tags: patch

Hi,
trying to import any cvs repository gives for me:

cscvs cache -b
cvs [log aborted]: received broken pipe signal
Set remote repository location to /cvs/debian
Traceback (most recent call last):
  File "/usr/share/cscvs/cscvs", line 251, in ?
    retval = main(sys.argv)
  File "/usr/share/cscvs/cscvs", line 237, in main
    try: callSubcommand()
  File "/usr/share/cscvs/cscvs", line 90, in callSubcommand
    Runner.getRunner(config, module).run()
  File "/usr/share/cscvs/modules/Runner.py", line 53, in run
    apply(self.target, self.args)
  File "/usr/share/cscvs/cmds/cache.py", line 212, in cache
    if not mode == MODE_UNSET: update_cache(config, pipe)
  File "/usr/share/cscvs/cmds/cache.py", line 92, in update_cache
    parser = CVS.Parser.Parser(config, pipe)
  File "/usr/share/cscvs/modules/CVS/Parser.py", line 135, in __init__
    total_revs = self._parse_revs(filename, tags, branches, total_revs)
  File "/usr/share/cscvs/modules/CVS/Parser.py", line 271, in _parse_revs
    raise error, "bad rlog parser, no cookie!"
Parser error: bad rlog parser, no cookie!
cvs [rlog aborted]: received broken pipe signal

This is due to the fact, that the rlog parser expects another date
format, in my case it is e.g.:

date: 2002-08-29 14:44:59 +0000;  author: agx;  state: dead;  lines: +0 -0

so I need the following patch to get cscvs to work:

--- /usr/share/cscvs/modules/CVS/Parser.py.old	2005-08-03 15:11:05.000000000 +0200
+++ /usr/share/cscvs/modules/CVS/Parser.py	2005-08-03 15:11:14.000000000 +0200
@@ -80,13 +80,13 @@
 	_re_rev_start = re.compile("^revision\s+([0-9.]+).*")
 
 	_re_rev_data_add = re.compile(
-		"^date:\s+(\d+)/(\d+)/(\d+)\s+(\d+):(\d+):(\d+);\s+"\
+		"^date:\s+(\d+)-(\d+)-(\d+)\s+(\d+):(\d+):(\d+)\s+[+|-]{1}(\d+);\s+"\
 		"author:\s+([^;]+);\s+"\
 		"state:\s+([^;]+);\s+"\
 		"lines:\s+\+(\d+)\s+\-(\d+)$")
 
 	_re_rev_data = re.compile(
-		"^date:\s+(\d+)/(\d+)/(\d+)\s+(\d+):(\d+):(\d+);\s+"\
+		"^date:\s+(\d+)-(\d+)-(\d+)\s+(\d+):(\d+):(\d+)\s+[+|-]{1}(\d+);\s+"\
 		"author:\s+([^;]+);\s+"\
 		"state:\s+([^;]+);$")
 	_re_rev_branches = re.compile("^branches:\s+([0-9.]+);")
@@ -277,8 +277,9 @@
 		hour = string.atoi(groups[3])
 		minute = string.atoi(groups[4])
 		second = string.atoi(groups[5])
-		author = groups[6]
-		state = groups[7]
+		offset = string.atoi(groups[6])
+		author = groups[7]
+		state = groups[8]
 
 		self._debug("groups %d %d %d %d:%d:%d %s %s" % (year, month, day, hour, minute, second, author, state))
 
@@ -287,8 +288,8 @@
 		# this could be a "CHANGE" or "REMOVE", you can tell if the
 		# file has been removed by looking if state == 'dead'
 		try:
-			pluscount = int(groups[8])
-			minuscount = int(groups[9])
+			pluscount = int(groups[9])
+			minuscount = int(groups[10])
 		except IndexError:
 			pluscount = 0
 			minuscount = 0

(adjusting it to read the date in iso8601 format and the offset to gmt).
Whith that the import works fine. I don't have any special cvs options
set, so I'm a bit puzzled why this seems to work for all other people.
The patch could be made more robust by using named groups, etc. But
maybe I should modify it to parse different date/time formats anyway?
Cheers,
 -- Guido

-- System Information:
Debian Release: testing/unstable
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-rc3-agx0
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages cscvs depends on:
ii  python                        2.3.5-3    An interactive high-level object-o
ii  python-sqlite                 1.0.1-2    python interface to SQLite
ii  tla                           1.3-1      arch revision control system

cscvs recommends no packages.

-- no debconf information


--- End Message ---
--- Begin Message ---
cscvs has been removed from Debian.  For more information, please see
<http://bugs.debian.org/305462>.

--- End Message ---

Reply to: