From: Eric S. Raymond Date: Thu, 6 Nov 2014 13:30:25 +0000 (-0500) Subject: Remove the cssc assumption again. X-Git-Tag: 1.9~4 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=a5d75d4ded44d34c579478fecab33dff9260bc04;p=sccs2rcs.git Remove the cssc assumption again. --- diff --git a/NEWS b/NEWS index a6f8e7b..c3642e2 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ sccs2rcs project news +Repository head: + Forward-ported to use GNU CSSC tools. Logging option added. + Tested on a collection of SCCS masters from BSD. + 1.8: 2011-08-09 Minor XML markup fix. diff --git a/sccs2rcs b/sccs2rcs index a6368c6..44c62f6 100755 --- a/sccs2rcs +++ b/sccs2rcs @@ -7,9 +7,9 @@ # It requires that the SCCS and RCS tools be installed on your system. # # This code requires only get, unget, and prs from the SCCS tools. -# it now assumes these will be called Berekely-style through an -# sccs front end, e.g. "sccs get", "sccs unget", and "sccs prs". -# This will work with the free CSSC tools. +# If what you have installed is cssc, you may have to find where +# its commands are installed (probably in a /usr/lib subdirectory +# for arch-specific binaries) and add that to your PATH. # # Run this in a directory with an SCCS subdirectory. It will convert # all the SCCS files to corresponding RCS master files in a new RCS @@ -170,7 +170,7 @@ def die(msg): record("error recovery begins") for master in os.listdir("SCCS"): if is_sccsmaster(master): - do_it("sccs unget " + master) + do_it("unget " + master) print >>sys.stderr, """\ Danger! Danger! Incomplete history in ./RCS -- remove it. @@ -229,7 +229,7 @@ if __name__ == '__main__': # If the CSSC package is installed, the SCCS commands might be here. # This assumption works under Debian/Ubuntu and will be harmless elsewhere. - os.environ["PATH"] += ":/usr/lib/cssc" + os.environ["PATH"] += ":/usr/lib/cssc:/usr/lib/x86_64-linux-gnu/cssc" logtext = "" @@ -264,7 +264,7 @@ if __name__ == '__main__': # Extract a list of revisions from the master revisions = [] try: - for line in os.popen("sccs prs " + sccsmaster(stem), "r"): + for line in os.popen("prs " + sccsmaster(stem), "r"): if line.startswith("D "): revisions.append(line.split()[1]) except OSError: @@ -293,7 +293,7 @@ if __name__ == '__main__': rcsdate = day + " " + months[int(month)-1] + " " + year + " " + tod progress("==> file %s, rev=%s, date=%s, author=%s" \ % (stem, rev, rcsdate, author)) - do_it_or_die("sccs get -e -r%s %s" % (rev, sccsmaster(stem))) + do_it_or_die("get -e -r%s %s" % (rev, sccsmaster(stem))) record("checked out of SCCS") # replace SCCS keywords with RCS keywords @@ -346,7 +346,7 @@ if __name__ == '__main__': do_it_or_die("rcs -l %s" % (stem,)) record("got trunk lock") # Extract the delta message for this revision - deltamsg = do_it_or_die("sccs prs -r%s SCCS/s.%s" % (rev, stem)) + deltamsg = do_it_or_die("prs -r%s SCCS/s.%s" % (rev, stem)) deltalines = deltamsg.split("\n") while deltalines: line = deltalines[0] @@ -368,7 +368,7 @@ if __name__ == '__main__': except OSError: die("RCS checkin of delta failed") # We're done with this master, unlock it. - do_it_or_die("sccs unget -r%s %s" % (rev, sccsmaster(stem))) + do_it_or_die("unget -r%s %s" % (rev, sccsmaster(stem))) # Generate tags from snapshots created by Emacs VC mode tagnames = os.path.join("SCCS", "VC-names") diff --git a/sccs2rcs.xml b/sccs2rcs.xml index 3626f57..46f430e 100644 --- a/sccs2rcs.xml +++ b/sccs2rcs.xml @@ -55,6 +55,15 @@ file, whether the program fails or succeeds. This is mainly useful for debugging unusual situations. +PROBLEMS +This code requires only get, unget, and prs from the SCCS tools. +If what you have installed is cssc, you may have to find where +its commands are installed (probably in a /usr/lib subdirectory +for arch-specific binaries) and add that to your PATH. + + + + ERROR RETURNS Returns 1 on any error, 0 otherwise.