From 00f1ccdd15ab1b35d42e4d7d3b1fee9cd0438fc5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 15 Nov 2010 20:30:02 -0500 Subject: [PATCH] Translate a little more. --- rcs-fast-export | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/rcs-fast-export b/rcs-fast-export index 33c6133..3982f98 100644 --- a/rcs-fast-export +++ b/rcs-fast-export @@ -271,7 +271,7 @@ class RCS: if m: rev = command if rcs.has_revision(rev): - status.appand("revision_data") + status.append("revision_data") else: status.append("new_revision") continue @@ -303,20 +303,17 @@ class RCS: rcs.revision[rev].symbols.append(sym) else: status.pop() - when :desc - rcs.desc.replace lines.dup - status.pop - when :read_lines - # we sanitize lines as we read them - - actual_line = line.dup - - # the first line must begin with a @, which we strip - if lines.empty? - ats = line.match(/^@+/) - raise 'malformed line' unless ats - actual_line.replace line.sub(/^@/,'') - end + elif status[-1] == "desc": + rcs.desc = [] + status.pop() + elif status[-1] == "read_lines": + # we sanitize lines as we read them + # the first line must begin with a @, which we strip + if not rcs.desc: + if not line.startswith("@"): + raise FatalException('malformed line') + else: + line = line[1:] # if the line ends with an ODD number of @, it's the # last line -- we work on actual_line so that content -- 2.43.0