From 10baa2cecbfcf37d99a7a9769fce6628af65da14 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 10 Nov 2014 17:54:35 -0500 Subject: [PATCH] 'U' (unmodified) becomes '.' in src status listings. Avoids colliding with git's U. We're already using non-alphas '?' and '!'; a period is at least inconspicuous. --- NEWS | 3 +++ src | 10 ++++------ src.asc | 2 +- srctest | 8 ++++---- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index b71b631..64190f4 100644 --- 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 ed420cd..828116b 100755 --- 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 f8c6f1c..1fab861 100644 --- 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 58c5c8a..c1f6cf2 100755 --- 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 -- 2.43.0