]> thyrsus.com Git - src.git/commitdiff
Gice up on moveto and copyto, they're too complicated.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 8 Nov 2014 21:06:17 +0000 (16:06 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 8 Nov 2014 21:06:17 +0000 (16:06 -0500)
src
srctest

diff --git a/src b/src
index 6fa2f78ea9e82b16742b14fd1c289a441c51a751..cd8f259ac2222aa36d6a3fe6bea46c0902af52f1 100755 (executable)
--- a/src
+++ b/src
@@ -45,7 +45,7 @@ def do_or_die(dcmd, legend=b"", loud=False):
     else:
         mute = ""
     if debug >= DEBUG_COMMANDS:
-        announce(b"executing '%s'%s" % (dcmd, legend))
+        sys.stderr.write(b"executing '%s'%s\n" % (dcmd, legend))
     try:
         retcode = subprocess.call("(" + dcmd + ")" + mute, shell=True)
         if retcode < 0:
@@ -68,9 +68,9 @@ class popen_or_die:
     def __enter__(self):
         if debug >= DEBUG_COMMANDS:
             if self.mode == "rb":
-                announce(b"%s: reading from '%s'%s" % (rfc3339(time.time()), self.command, self.legend))
+                sys.stderr.write(b"%s: reading from '%s'%s\n" % (rfc3339(time.time()), self.command, self.legend))
             else:
-                announce(b"%s: writing to '%s'%s" % (rfc3339(time.time()), self.command, self.legend))
+                sys.stderr.write(b"%s: writing to '%s'%s\n" % (rfc3339(time.time()), self.command, self.legend))
         try:
             self.fp = os.popen(self.command, self.mode)
             return self.fp
@@ -87,7 +87,7 @@ class popen_or_die:
 def capture_or_die(command):
     "Run a specified command, capturing the output."
     if debug >= DEBUG_COMMANDS:
-        announce(b"%s: capturing %s" % (rfc3339(time.time()), command))
+        sys.stderr.write(b"%s: capturing %s\n" % (rfc3339(time.time()), command))
     try:
         content = subprocess.check_output(command, shell=True)
     except (subprocess.CalledProcessError, OSError) as oe:
@@ -310,12 +310,6 @@ src copy 'old' 'new'
    Rename a file and its master. Refuses to step on existing files or masters.
    'cp' is a synonym.
 
-src moveto 'directory' ['file'...]
-   Moves files and their histories to another directory.
-
-src copyto 'directory' ['file'...]
-   Copies files and their histories to another directory.
-
 src fast-export ['file'...]
    Export one or more projects to standard output as a git fast-import stream.
    The committer identification is copied from your Git configuration.
@@ -822,14 +816,6 @@ class RCS:
         do_or_die("cp {0} {1} && cp {2} {3}".format(source, target,
                                                     self.master(source),
                                                     self.master(target))) 
-    def moveto(self, arg, target):
-        "Move a file and its history to a target directory."
-        # Using mv(1) evades cross-filesystem issues
-        do_or_die("mv {0} {1} && mv {2} {3]/{4}".format(arg, target, self.master(arg), target, repodir)) 
-    def copyto(self, arg, target):
-        "Copy a file and its history to a target directory."
-        # Using cp(1) evades cross-filesystem issues
-        do_or_die("cp {0} {1} && cp {2} {3]/{4}".format(arg, target, self.master(arg), target, repodir)) 
     def diff(diffspec1, diffspec2, diffopts, arg):
         "Report a diff."
         # The || : suppresses the error return from diff(1)
diff --git a/srctest b/srctest
index 5f964d3a3f415e606df739e11352d722a4abd634..77641db270318aaf77fd961ebc8f0000a0059832 100755 (executable)
--- a/srctest
+++ b/srctest
@@ -195,6 +195,4 @@ EOF
 src $TESTOPTS ls | diff -u testfile16 -
 check "ls"
 
-# untested: moveto, copyto
-
 # end