Check-in [db608ee72f]
Not logged in
Overview

SHA1 Hash:db608ee72f27666be6645c6151f9e791d512ea71
Date: 2009-11-06 02:47:30
User: drh
Comment:Continuing work on the "diff" command.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/diffcmd.c from [7503ab8fa5] to [4a3e578a59].

@@ -166,11 +166,11 @@
     load_vfile_from_rid(rid);
     blob_appendf(&sql,
       "SELECT v2.pathname, v2.deleted, v2.chnged, v2.rid==0, v1.rid"
       "  FROM vfile v1, vfile v2 "
       " WHERE v1.pathname=v2.pathname AND v1.vid=%d AND v2.vid=%d"
-      "   AND (v2.deleted OR v2.chnged OR v2.rid==0)"
+      "   AND (v2.deleted OR v2.chnged OR v1.rid!=v2.rid)"
       "UNION "
       "SELECT pathname, 1, 0, 0, 0"
       "  FROM vfile v1"
       " WHERE v1.vid=%d"
       "   AND NOT EXISTS(SELECT 1 FROM vfile v2"
@@ -267,27 +267,27 @@
   zFrom = find_option("from", "r", 1);
   zTo = find_option("to", 0, 1);
 
   if( zTo==0 ){
     db_must_be_within_tree();
-    if( !isInternDiff ){
+    verify_all_options();
+    if( !isInternDiff && g.argc==3 ){
       zDiffCmd = db_get(isGDiff ? "gdiff-command" : "diff-command", 0);
     }
-    verify_all_options();
     if( g.argc==3 ){
       diff_one_against_disk(zFrom, zDiffCmd);
     }else{
       diff_all_against_disk(zFrom, zDiffCmd);
     }
   }else if( zFrom==0 ){
     fossil_fatal("must use --from if --to is present");
   }else{
     db_find_and_open_repository(1);
-    if( !isInternDiff ){
+    verify_all_options();
+    if( !isInternDiff && g.argc==3 ){
       zDiffCmd = db_get(isGDiff ? "gdiff-command" : "diff-command", 0);
     }
-    verify_all_options();
     fossil_fatal("--to not yet implemented");
 #if 0
     if( g.argc==3 ){
       diff_one_two_versions(zFrom, zTo, zDiffCmd);
     }else{