Package: simple-revision-control
Version: 1.29-1
Severity: important
Tags: patch
X-Debbugs-Cc: rwpen...@users.sourceforge.net

Dear Maintainer,

When using simple-revision-control to import RCS histories, it appears
unable to handle RCS files that include a non-empty "description" field.
This seems to be because the "src" application treats this field
as JSON, which may be inconsistent with the RCS file format,
as well as the format used by the RCS tools currently in bookworm.

An example scenario is as follows:

$ mkdir RCS
$ echo "Interesting content" > file0.txt
$ ci -i -t-"A tiny file for testing" -m"Initial commit" file0.txt
RCS/file0.txt,v  <--  file0.txt
initial revision: 1.1
done

$ echo "Fascinating content" > file1.txt
$ ci -i -t-"" -m"Initial commit" file1.txt
RCS/file1.txt,v  <--  file1.txt
initial revision: 1.1
done

$ src srcify

$ src log file0.txt
= file0.txt
===========================================================================================================
src: legacy data A tiny file for testing in description field
src: fatal exception in popen_or_die.

$ src log file1.txt
= file1.txt
===========================================================================================================
1    | 2023-10-07T05:14:35Z | trunk
Initial commit
-----------------------------------------------------------------------------------------------------------------------


It appears that current upstream versions of simple-revision-control do not
make any use of a JSON parser, and minor changes to a try/except block
near line 448 of /usr/bin/src will resolve this issue. Without such a change
it appears to be impossible to make simple-revision-control usable
with legacy RCS histories.


-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-12-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages simple-revision-control depends on:
ii  python3  3.11.2-1+b1
ii  rcs      5.10.1-1

simple-revision-control recommends no packages.

Versions of packages simple-revision-control suggests:
pn  sccs  <none>

-- no debconf information
--- src-orig    2022-03-21 13:15:22.000000000 +0000
+++ src 2023-10-07 06:22:52.639950705 +0100
@@ -448,7 +448,7 @@
                 # is not an issue.
                 self.annotations = json.loads(self.description.strip())
             except ValueError as _e:
-                croak("legacy data %s in description field" % self.description)
+                announce("legacy data %s in description field" % 
self.description)
     def lift_headers(self):
         valid = ('author', 'author-date', 'committer', 'committer-date',
                  'mark', 'parents')

Reply via email to