]> thyrsus.com Git - rcs-fast-import.git/commitdiff
Removed the dryrun option.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 14 Nov 2010 06:02:19 +0000 (01:02 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 14 Nov 2010 06:02:19 +0000 (01:02 -0500)
rcs-fast-import
rcs-fast-import.xml

index 988b08dbd3494cf33587f896d1d9f4e51c37124b..0cc66e1139a58b471e5f4d4dc35ab38ff422fdab 100755 (executable)
@@ -47,8 +47,6 @@ DEBUG_SHUFFLE   = 3    # Debug directory handling
 DEBUG_COMMANDS  = 3    # Show commands as they are executed
 DEBUG_DELETE    = 4    # Debug canonicalization after deletes
 
-dryrun = False
-
 class Baton:
     "Ship progress indications to stdout."
     def __init__(self, prompt, endmsg='done', enable=False):
@@ -561,8 +559,6 @@ def do_or_die(cmd, legend=""):
         announce("executing '%s'%s" % (cmd, legend))
     if not verbose >= DEBUG_UNQUIET:
         cmd += ">/dev/null 2>&1" 
-    if dryrun:
-        return
     try:
         retcode = subprocess.call(cmd, shell=True)
         if retcode < 0:
@@ -575,14 +571,12 @@ def do_or_die(cmd, legend=""):
 def loud_remove(path):
     if verbose >= DEBUG_SHUFFLE:
         announce("removing %s" % (path,))
-    if not dryrun:
-        os.remove(path)
+    os.remove(path)
 
 def loud_rename(source, target):
     if verbose >= DEBUG_SHUFFLE:
         announce("renaming %s to %s" % (source, target))
-    if not dryrun:
-        os.rename(source, target)
+    os.rename(source, target)
 #
 # All VCS-specific code is beyond this point.  At the moment there's
 # just one VCS class, for RCS, but it would be easy to write another
@@ -679,11 +673,10 @@ class Generic:
         if copyfile:
             if verbose >= DEBUG_SHUFFLE:
                 announce("linking %s to %s" % (os.path.relpath(copyfile), path))
-            if not dryrun:
-                try:
-                    os.link(copyfile, path)
-                except OSError, e:
-                    raise FatalException("refusing to step on %s: %s." % (path, `e`))
+            try:
+                os.link(copyfile, path)
+            except OSError, e:
+                raise FatalException("refusing to step on %s: %s." % (path,`e`))
         return rcsdir
     def masterfiles(self):
         "List all masters."
@@ -772,7 +765,7 @@ class RCS(Generic):
                 do_or_die("co -u %s" % (" ".join(self.masterfiles()),))
 
 if __name__ == '__main__':
-    (options, arguments) = getopt.getopt(sys.argv[1:], "lnpuvV?")
+    (options, arguments) = getopt.getopt(sys.argv[1:], "lpuvV?")
     do_unlocked_checkouts = False
     checkout_mode = None
     roundtrip = True
@@ -784,8 +777,6 @@ if __name__ == '__main__':
             roundtrip = False
         elif switch in ('-l', '-u'):
             checkout_mode = switch
-        elif (switch == '-n'):
-            dryrun = True
        elif (switch == '-v'):
            verbose += 1
        elif (switch == '-V'):
index 19f5376eeabe3a72217fd868e4f892478868cdd6..75a2cc9382cc8c6a95cc7d1b589becda7c514d63 100644 (file)
@@ -23,7 +23,6 @@
   <arg choice='opt'>-u</arg>
   <arg choice='opt'>-l</arg>
   <arg choice='opt'>-p</arg>
-  <arg choice='opt'>-n</arg>
   <arg choice='opt'>-V</arg>
 </cmdsynopsis>
 </refsynopsisdiv>
@@ -49,10 +48,6 @@ copies checked out.</para>
 <para>The -V option displays the program version number and exits. -? displays
 this help and exits.</para>
 
-<para>The -n option sets dry-run mode; parse the import stream, then go through
-all logic other than actually creating files.  Useful for debugging in
-combination with -v.</para>
-
 <para>In order to preserve history, D file operations do not delete
 previously-created master files; instead, an empty file is checked in
 as the content and the file's RCS state tag is set to "Deleted".  R