# Requires Python 2.5 or newer and RCS 5.7 or newer.
#
"""
-Usage: rcs-fast-import [-v] [-p] [-u] [-l] [-V] [-?]
+Usage: rcs-fast-import [-v] [-p] [-u] [-l] [-V] [-?] files...
Break the content of a git-fast-import stream on stdin into individual RCS
master files in RCS subdirectories of the corresponding directory structure.
The -V option displays the program version number and exits. -? displays
this help and exits.
+
+Normally all files are unpacked. You can restrict this by listing the
+paths you are interested in on the command line.
"""
import sys, os, getopt, re, cStringIO, subprocess
announce("%5s M %s" % (event.mark, op.path))
if op.mode == "160000":
complain("cannot represent a submodule link in RCS")
- else:
+ elif not arguments or op.path in arguments:
vcs.modify(event, op.path, op.mode, op.copyname)
elif op.op in ("D", "deleteall"):
if verbose >= DEBUG_OPS:
announce("%5s D %s" % (event.mark, op.path))
- vcs.delete(event, op.path)
+ if not arguments or op.path in arguments:
+ vcs.delete(event, op.path)
elif op.op == "R":
if verbose >= DEBUG_OPS:
announce("%5s R '%s' '%s'" % (event.mark, op.source, op.target))
- vcs.rename(event, op.source, op.target)
+ if not arguments:
+ vcs.rename(event, op.source, op.target)
elif op.op == "C":
if verbose >= DEBUG_OPS:
announce("%5s C '%s' '%s'" % (event.mark, op.source, op.target))
- vcs.copy(event, op.source, op.target)
+ if not arguments:
+ vcs.copy(event, op.source, op.target)
else:
raise FatalException("unknown op type %s" % op.op)
vcs.postcommit(event)
<arg choice='opt'>-p</arg>
<arg choice='opt'>-V</arg>
<arg choice='opt'>-?</arg>
+ <arg choice='plain' rep='repeat'><replaceable>file</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<para>Import-stream branches are mapped to RCS revision branch structure.
Each RCS master produced will include a list of branch tags, each of which
has the value of the corresponding RCS branch identifier for that file.</para>
+
+<para>Normally all files are unpacked. You can restrict this by listing the
+paths you are interested in on the command line.</para>
</refsect1>
<refsect1 id='bugs'><title>BUGS</title>