]> thyrsus.com Git - src.git/commitdiff
Backward compatibility with RCS.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 8 Nov 2014 16:18:10 +0000 (11:18 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 8 Nov 2014 16:18:10 +0000 (11:18 -0500)
src
src.asc

diff --git a/src b/src
index c56df667cadc61f31d2ea183d3dd317e53ac1e3b..6f26d19c25463687d726b0597735c79f282e0898 100755 (executable)
--- a/src
+++ b/src
@@ -439,7 +439,6 @@ def commit_method(*args):
            croak("%s is not registered." % arg)
        else:
            metadata = RCSLog(arg)
-           sys.stderr.write("Foo! %s\n" % arg)
            if not comment:
                editor = os.getenv("EDITOR") or "emacsclient"
                commentfile = "/tmp/src%dtmp" % os.getpid()
@@ -742,9 +741,9 @@ dispatch = {
     "copyto":      copyto_method,
 }
 
-if __name__ == "__main__":
-    
+if __name__ == "__main__":    
     command = list(sys.argv[1:])
+    explicit = False
     while command and command[0].startswith("-"):
         if command[0] == '-d':
             debug += 1
@@ -753,9 +752,15 @@ if __name__ == "__main__":
         elif command[0] == '-T':
             pseudotime = True
         elif command[0] == '-S':
-            repodir = command[1] 
+            repodir = command[1]
+            explicit = True
             command.pop(0)
         command.pop(0)
+
+    # RCS backwards-compatibility hack
+    if not explicit and not os.path.exists(repodir) and  os.path.exists("RCS"):
+        repodir = "RCS"
+
     if not command:
         help_method()
     else:
diff --git a/src.asc b/src.asc
index 539fed349a62789ff4e9eb9bbdd1e1fad5fe83d6..969be72915ed56ba5280be7696daf790dbf490ad 100644 (file)
--- a/src.asc
+++ b/src.asc
@@ -8,6 +8,7 @@ src - simple revision control
 *src* [command]
 
 == DESCRIPTION ==
+
 SRC (or src) is simple revision control, a version-control system for
 single-file projects by solo developers and authors. It modernizes the
 venerable RCS, hence the anagrammatic acronym. The desigh is
@@ -102,14 +103,27 @@ fast-export, the listing modes of tag and branch) you will see a reply
 only if the operation failed.
 
 Other commands (add, commit, checkout, tag creation and deletion,
-moveto) give you a success message per file when operating on multiple
-files, so you will not be in doubt about which operation succeeded.
-This behavior can be suppressed with the -q option, placed 'before'
-the subcommand word.
+moveto, copyto) give you a success message per file when operating on
+multiple files, so you will not be in doubt about which operation
+succeeded.  This behavior can be suppressed with the -q option, placed
+'before' the subcommand word.
+
+== BACKWARD COMPATIBILITY ==
+
+SRC history files are RCS master files. There is no hidden state.
+
+In order to maintain complete backwards compatibility, one compromise
+was made: any commit comment containing a string exactly matching an
+RCS log delimiter (a long string of "-" characters) will be rejected
+as malformed.
+
+By default, history files are kept in a hidden subdirectory named
+".src".  But if you have an RCS subdirectory and no .src, SRC 
+will quietly operate on the files in the RCS directory.
 
 == DEBUGGING OPTIONS ==
 
-These will be of interet mainly to developers"
+These will be of interet mainly to developers.
 
 A '-d' option before the main command word turns on debugging
 messages; it can be repeated for higher debugging levels.
@@ -126,9 +140,6 @@ constant screen witch of 79. It's for regression testing.
 This is a proof-of-concept alpha release. The 'branch' command is not
 yet implemented; it is described here to document the design.
 
-== IMPLEMENTATION NOTE ==
-SRC presently uses RCS for back-end storage. This may change in the future.
-
 == REPORTING BUGS ==
 Report bugs to Eric S. Raymond <esr@thyrsus.com>.  The project page is
 at http://catb.org/~esr/src