From: Eric S. Raymond Date: Wed, 19 Nov 2014 22:31:58 +0000 (-0500) Subject: Unmodified status char changed from '.' to '='. Regression test passes. X-Git-Tag: 0.11~8 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=f250c1c4494de20e67e6dfcc709f14c4bbfa7f4d;p=src.git Unmodified status char changed from '.' to '='. Regression test passes. --- diff --git a/NEWS b/NEWS index d4c710c..d518558 100644 --- 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 4457f3e..b67ac64 100755 --- 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 2ddca26..e6d7cd4 100644 --- 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 e1413d6..6e13892 100755 --- 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 <tryit @@ -570,7 +570,7 @@ echo "newname1" >.srcignore cat >statuslog <tryit