]> thyrsus.com Git - src.git/commitdiff
'U' (unmodified) becomes '.' in src status listings.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 10 Nov 2014 22:54:35 +0000 (17:54 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 10 Nov 2014 22:54:35 +0000 (17:54 -0500)
Avoids colliding with git's U. We're already using non-alphas '?' and '!';
a period is at least inconspicuous.

NEWS
src
src.asc
srctest

diff --git a/NEWS b/NEWS
index b71b631999d0911d52aab5fe016604735536b90f..64190f4ce912a1fe32b73141b728dd9ac1fa5833 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 `                      src project news
 
+Repository head:
+   'U' (unmodified) becomes '.' in src status listings.
+
 0.4: 2014-11-10
    Improvements to src fast-import.
    src commit now has an -e option to force editing after -m or -f.
diff --git a/src b/src
index ed420cdcfa6bc1f3c90e0e9e6bef3422df05256f..828116ba6d6d186f67fac404492210aa3ed6c3d9 100755 (executable)
--- a/src
+++ b/src
@@ -32,7 +32,7 @@
 # status.
 #
 #                   git     hg     svn      src
-# Unmodified        ' '     'C'    ' '      'U'
+# Unmodified        ' '     'C'    ' '      '.'
 # Renamed           'R'      -      -        -
 # Deleted           'D'     'R'    'D'       -
 # Copied            'C'      -      -        -                 
@@ -44,9 +44,7 @@
 # This is a bit oversimplified; it is meant not as a technical comparison
 # but rather to illustrate how bad the letter collisions are. SRC follows
 # the majority except for absolutely *not* using a space as a status code;
-# this makes the reports too hard to machine-parse. The designer judged that
-# the semantic collisiion with git's U was less bad than suggesting that an
-# unmodified file had been copied.
+# this makes the reports too hard to machine-parse.
 
 import sys, os, subprocess, time, calendar, stat, glob, shutil
 
@@ -240,7 +238,7 @@ src checkout ['revision'] ['file'...]
    co is a synonym for checkout.
 
 src status ['file'...]
-   A = added, U = unmodified, M = modified, ! = missing, ? = not tracked,
+   A = added, . = unmodified, M = modified, ! = missing, ? = not tracked,
    I = ignored, L = locked (recover with src checkout).  The L
    status should only occur if you have used RCS directly on a file.
 
@@ -594,7 +592,7 @@ def status_method(*args):
         elif not os.access(fn, os.W_OK):
             pairs.append((fn, "L"))
         else:
-            pairs.append((fn, "U"))
+            pairs.append((fn, "."))
     if not args:
         for m in registered:
             if backend.workfile(m) not in candidates:
diff --git a/src.asc b/src.asc
index f8c6f1cbcae83a0cf93c8b090cba65ecb4d2aa95..1fab86108505484ae2f038cff6feb09828e80e75 100644 (file)
--- a/src.asc
+++ b/src.asc
@@ -63,7 +63,7 @@ src checkout [revision] ['file'...]::
    co is a synonym for checkout.
 
 src status ['file'...]::
-   A = added, U = unmodified, M = modified, ! = missing, ? = not tracked,
+   A = added, . = unmodified, M = modified, ! = missing, ? = not tracked,
    I = ignored, L = locked (recover with src checkout).  The L
    status should only occur if you have used RCS directly on a file.
 
diff --git a/srctest b/srctest
index 58c5c8ac9fc01c0d9963997ab1a6d47984a983d4..c1f6cf2a18a498882c319350e602f705b0aaae0b 100755 (executable)
--- a/srctest
+++ b/srctest
@@ -210,8 +210,8 @@ src $TESTOPTS status testfile16 | grep "^A" >/dev/null
 check "A status check after registration"
 
 src $TESTOPTS commit -m "Another sample" testfile16
-src $TESTOPTS status testfile16 | grep "^U" >/dev/null
-check "U status check after first commit"
+src $TESTOPTS status testfile16 | grep "^[.]" >/dev/null
+check ". status check after first commit"
 
 echo "Add a second line" >>testfile16
 src $TESTOPTS status testfile16 | grep "^M" >/dev/null
@@ -222,8 +222,8 @@ src $TESTOPTS status testfile16 | grep "^!" >/dev/null
 check "! status check after deletion"
 
 src $TESTOPTS checkout testfile16
-src $TESTOPTS status testfile16 | grep "^U" >/dev/null
-check "U status check after restoration"
+src $TESTOPTS status testfile16 | grep "^[.]" >/dev/null
+check ". status check after restoration"
 
 rm -f $SANDBOX/testfile16,v
 src $TESTOPTS status testfile16 | grep "^?" >/dev/null