]> thyrsus.com Git - src.git/commitdiff
Unmodified status char changed from '.' to '='. Regression test passes.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 19 Nov 2014 22:31:58 +0000 (17:31 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 19 Nov 2014 22:31:58 +0000 (17:31 -0500)
NEWS
src
src.asc
srctest

diff --git a/NEWS b/NEWS
index d4c710cfc2585b38e72e58c6b92f6684ab53fa82..d518558f143089cf7caa50734c34fc33573fd66c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
                        src project news
 
+Repository head:
+   File-not-modified status character changed to '=' to match Mercurial.
+
 0.10: 2014-11-19
    Modified check is now done by content, not modification date.
 
diff --git a/src b/src
index 4457f3ebcfb7492924da02cc93ac1f793cb8b8e6..b67ac64ec535cdf52f140d466f33da6fb561821f 100755 (executable)
--- a/src
+++ b/src
@@ -447,8 +447,8 @@ src cat ['revision'] ['file'...]
    Send the specified revisions of the files to standard output.
 
 src status [-a] ['file'...]
-   A = added, . = unmodified, M = modified, ! = missing, ? = not
-   tracked, I = ignored, L = locked (recover with src checkout).
+   'A' = added, '=' = unmodified, 'M' = modified, '!' = missing, '?' = not
+   tracked, 'I' = ignored, 'L' = locked (recover with src checkout).
    Find more details under 'help status'. 'st' is a synonym fot status.
 
 src tag [list|-l|create|-c|delete|del|-d] ['name'] ['revision'] ['file'...] 
@@ -521,19 +521,19 @@ Emacs VC mode.
 
 The status codes, in roughly most common to rarest, are:
 
-. = Unmodified.  File is the same as the latest stored revision.
+= - Unmodified.  File is the same as the latest stored revision.
 
-M = Modified.  File has been changed since the latest stored revision
+M - Modified.  File has been changed since the latest stored revision
 
-? = Not tracked.  SRC does not keep a history for this file.
+? - Not tracked.  SRC does not keep a history for this file.
 
-I = ignored.  This file matches the patterns in .srcignore
+I - ignored.  This file matches the patterns in .srcignore
 
-! = Missing.  There is a history for this file but the workfile is missing.
+! - Missing.  There is a history for this file but the workfile is missing.
 
-A = The file has been registered into SRC but has no commits.
+A - The file has been registered into SRC but has no commits.
 
-L = The file is locked.
+L - The file is locked.
 
 You can usually recover of file from A, L, and ! status with src
 checkout.  A and L statuses should only occur if you have used RCS
@@ -965,7 +965,7 @@ The cut line and things below it will not become part of the comment text.
                     args.pop(0)
                 except IndexError:
                     croak("%s -m requires a following string" % legend)
-            elif args.startswith("-m"):
+            elif args[0].startswith("-m"):
                 self.leader = args[2:]
                 args.pop(0)
             elif args[0] == "-f":
@@ -1153,17 +1153,20 @@ def status_method(*args):
         masterbase = os.path.basename(backend.history(fn))
         if masterbase not in registered:
             if allflag or fn in args:
-                pairs.append((fn, "?"))
+                if not os.access(fn, os.R_OK):
+                    croak("%s does not exist or is unreadable." % fn)
+                else:
+                    pairs.append((fn, "?"))
         elif not os.path.exists(fn):
             pairs.append((fn, "!"))
         elif modified(fn):
             pairs.append((fn, "M"))
-        elif not backend.has_revisions(fn):
-            pairs.append((fn, "A"))
         elif not os.access(fn, os.W_OK):
             pairs.append((fn, "L"))
+        elif not backend.has_revisions(fn):
+            pairs.append((fn, "A"))
         else:
-            pairs.append((fn, "."))
+            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 2ddca26fcc8dd90cf3363d45d5c04f65f5caaddb..e6d7cd4e5bd5fe4fe32b9932c8c340e21b69e8e1 100644 (file)
--- a/src.asc
+++ b/src.asc
@@ -72,12 +72,12 @@ src cat ['revision'] ['file'...]::
    Send the specified revision of the files to standard output.
 
 src status [-a] ['file'...]::
-   A = added, . = unmodified, M = modified, ! = missing, ? = not tracked,
-   I = ignored, L = locked (recover with src checkout).  The A and L
-   statuses should only occur if you have used RCS directly on a file.
-   Normally ? and I files are not listed; this changes if you either
-   give the -a swidth or specify which files to look at. "st" is a
-   synonym for status.
+   'A' = added, '=' = unmodified, 'M' = modified, '!' = missing, '?' =
+   not tracked, 'I' = ignored, 'L' = locked (recover with src
+   checkout).  The A and L statuses should only occur if you have used
+   RCS directly on a file.  Normally ? and I files are not listed;
+   this changes if you either give the -a swidth or specify which
+   files to look at. "st" is a synonym for status.
 
 src tag [list|-l|create|-c|delete|del|-d] ['name'] ['revision'] ['file'...]::
    List tags, create tags, or delete tags. Takes a singleton
diff --git a/srctest b/srctest
index e1413d6db4e9435e65a151297217d28f3b40aa97..6e13892280593d41615614aecc55482fa4233497 100755 (executable)
--- a/srctest
+++ b/srctest
@@ -216,8 +216,8 @@ src $TESTOPTS ls | diff -u testfile16 -
 check "ls"
 
 src $TESTOPTS commit -m "Another sample" testfile16
-src $TESTOPTS status testfile16 | grep "^[.]" >/dev/null
-check ". 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
@@ -228,8 +228,8 @@ src $TESTOPTS status testfile16 | grep "^!" >/dev/null
 check "! status check after deletion"
 
 src $TESTOPTS checkout testfile16
-src $TESTOPTS status testfile16 | grep "^[.]" >/dev/null
-check ". status check after restoration"
+src $TESTOPTS status testfile16 | grep "^=" >/dev/null
+check "= status check after restoration"
 
 rm -f .src/testfile16,v
 src $TESTOPTS status testfile16 | grep "^?" >/dev/null
@@ -558,8 +558,8 @@ diff -u tryit branchlog
 check "branch name resolved content"
 
 cat >statuslog <<EOF
-.      newname1
-.      newname2
+=      newname1
+=      newname2
 EOF
 
 src $TESTOPTS status newname1 newname2 >tryit
@@ -570,7 +570,7 @@ echo "newname1" >.srcignore
 
 cat >statuslog <<EOF
 I      newname1
-.      newname2
+=      newname2
 EOF
 
 src $TESTOPTS status newname1 newname2 >tryit