` src project news
Repository head:
- There is now a "src status" command.
+ There is now a "src status" command, and .srcignore affects it.
src fast-import is implemented (by callout to rcs-fast-import).
0.2: 2014-11-08
* src branch
* vc.el
-
-* .srcignore
#
# src - simple revision control.
#
-import sys, os, subprocess, time, calendar, stat
+import sys, os, subprocess, time, calendar, stat, glob
version=0.2
co is a synonym for checkout.
src status ['file'...]
- A = added, U = unmodified, M = modified, ! = missing, ? = not tracked.
+ A = added, U = unmodified, M = modified, ! = missing, ? = not tracked,
+ I = ignored.
src cat [revision-spec] ['file'...]
Send the specified revisions of the files to standard output.
else:
candidates = [f for f in os.listdir(".") if f != repodir]
pairs = []
+ ignorable = []
+ if os.path.exists(".srcignore"):
+ for line in open(".srcignore"):
+ if not line.startswith("#") and line.strip():
+ ignorable += glob.glob(line.strip())
for fn in candidates:
+ if fn in ignorable:
+ if fn in args:
+ pairs.append((fn, "I"))
+ continue
masterbase = os.path.basename(backend.master(fn))
if masterbase not in registered:
pairs.append((fn, "?"))
co is a synonym for checkout.
src status ['file'...]::
- A = added, U = unmodified, M = modified, ! = missing, ? = not tracked.
+ A = added, U = unmodified, M = modified, ! = missing, ? = not tracked,
+ I = ignored.
src cat [revision-spec] ['file'...]::
Send the specified revisions of the files to standard output.
behavior can be suppressed with the -q option, placed 'before' the
subcommand word.
+If your directory contains a file named ".srcignore", each line that
+is neither blank nor begins with a "#" is interpreted as an ignore
+pattern. It is expanded with glob(3), and files in the expansion are
+omitted from +src status+ - unless the file is named as an argument,
+of the status comand, in which case its status is "I". Thus, for
+example, a line reading "*.html" will cause all files with an HTML
+extension to be omitted from the output of "git status", but the
+output of "git status *" will list them with ststus "I".
+
== BACKWARD COMPATIBILITY ==
SRC history files are RCS master files. SRC maintains no state other