From: Eric S. Raymond Date: Tue, 16 Nov 2010 01:30:02 +0000 (-0500) Subject: Translate a little more. X-Git-Tag: 0.1~5 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=00f1ccdd15ab1b35d42e4d7d3b1fee9cd0438fc5;p=rcs-fast-import.git Translate a little more. --- 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