Fossil SCM
Change the name of the --tree option to --external-baseline.
Commit
356163b05d92044bfccd9b152b7224672a921df01fb45353a758b143a02fcc25
Parent
df94a3538e006db…
2 files changed
+5
-1
+28
-27
+5
-1
| --- src/diff.tcl | ||
| +++ src/diff.tcl | ||
| @@ -110,11 +110,15 @@ | ||
| 110 | 110 | |
| 111 | 111 | set fromIndex [lsearch -glob $fossilcmd *-from] |
| 112 | 112 | set toIndex [lsearch -glob $fossilcmd *-to] |
| 113 | 113 | set branchIndex [lsearch -glob $fossilcmd *-branch] |
| 114 | 114 | set checkinIndex [lsearch -glob $fossilcmd *-checkin] |
| 115 | - set fA {base check-in} | |
| 115 | + if {[string match *?--external-baseline* $fossilcmd]} { | |
| 116 | + set fA {external baseline} | |
| 117 | + } else { | |
| 118 | + set fA {base check-in} | |
| 119 | + } | |
| 116 | 120 | set fB {current check-out} |
| 117 | 121 | if {$fromIndex > -1} {set fA [lindex $fossilcmd $fromIndex+1]} |
| 118 | 122 | if {$toIndex > -1} {set fB [lindex $fossilcmd $toIndex+1]} |
| 119 | 123 | if {$branchIndex > -1} {set fA "branch point"; set fB "leaf of branch '[lindex $fossilcmd $branchIndex+1]'"} |
| 120 | 124 | if {$checkinIndex > -1} {set fA "primary parent"; set fB [lindex $fossilcmd $checkinIndex+1]} |
| 121 | 125 |
| --- src/diff.tcl | |
| +++ src/diff.tcl | |
| @@ -110,11 +110,15 @@ | |
| 110 | |
| 111 | set fromIndex [lsearch -glob $fossilcmd *-from] |
| 112 | set toIndex [lsearch -glob $fossilcmd *-to] |
| 113 | set branchIndex [lsearch -glob $fossilcmd *-branch] |
| 114 | set checkinIndex [lsearch -glob $fossilcmd *-checkin] |
| 115 | set fA {base check-in} |
| 116 | set fB {current check-out} |
| 117 | if {$fromIndex > -1} {set fA [lindex $fossilcmd $fromIndex+1]} |
| 118 | if {$toIndex > -1} {set fB [lindex $fossilcmd $toIndex+1]} |
| 119 | if {$branchIndex > -1} {set fA "branch point"; set fB "leaf of branch '[lindex $fossilcmd $branchIndex+1]'"} |
| 120 | if {$checkinIndex > -1} {set fA "primary parent"; set fB [lindex $fossilcmd $checkinIndex+1]} |
| 121 |
| --- src/diff.tcl | |
| +++ src/diff.tcl | |
| @@ -110,11 +110,15 @@ | |
| 110 | |
| 111 | set fromIndex [lsearch -glob $fossilcmd *-from] |
| 112 | set toIndex [lsearch -glob $fossilcmd *-to] |
| 113 | set branchIndex [lsearch -glob $fossilcmd *-branch] |
| 114 | set checkinIndex [lsearch -glob $fossilcmd *-checkin] |
| 115 | if {[string match *?--external-baseline* $fossilcmd]} { |
| 116 | set fA {external baseline} |
| 117 | } else { |
| 118 | set fA {base check-in} |
| 119 | } |
| 120 | set fB {current check-out} |
| 121 | if {$fromIndex > -1} {set fA [lindex $fossilcmd $fromIndex+1]} |
| 122 | if {$toIndex > -1} {set fB [lindex $fossilcmd $toIndex+1]} |
| 123 | if {$branchIndex > -1} {set fA "branch point"; set fB "leaf of branch '[lindex $fossilcmd $branchIndex+1]'"} |
| 124 | if {$checkinIndex > -1} {set fA "primary parent"; set fB [lindex $fossilcmd $checkinIndex+1]} |
| 125 |
+28
-27
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -1095,51 +1095,52 @@ | ||
| 1095 | 1095 | /* |
| 1096 | 1096 | ** Compute the difference from an external tree of files to the current |
| 1097 | 1097 | ** working checkout with its edits. |
| 1098 | 1098 | ** |
| 1099 | 1099 | ** To put it another way: Every managed file in the current working |
| 1100 | -** checkout is compared to the file with same under in zTree. The zTree | |
| 1101 | -** files are on the left and the files in the current working directory | |
| 1102 | -** are on the right. | |
| 1100 | +** checkout is compared to the file with same under in zExternBase. The | |
| 1101 | +** zExternBase files are on the left and the files in the current working | |
| 1102 | +** directory are on the right. | |
| 1103 | 1103 | */ |
| 1104 | -void diff_tree_to_checkout( | |
| 1105 | - const char *zExternTree, /* Remote tree to use as the baseline */ | |
| 1104 | +void diff_externbase_to_checkout( | |
| 1105 | + const char *zExternBase, /* Remote tree to use as the baseline */ | |
| 1106 | 1106 | DiffConfig *pCfg, /* Diff settings */ |
| 1107 | 1107 | FileDirList *pFileDir /* Only look at these files */ |
| 1108 | 1108 | ){ |
| 1109 | 1109 | int vid; |
| 1110 | 1110 | Stmt q; |
| 1111 | 1111 | |
| 1112 | 1112 | vid = db_lget_int("checkout",0); |
| 1113 | - if( file_isdir(zExternTree, ExtFILE)!=1 ){ | |
| 1114 | - fossil_fatal("\"%s\" is not a directory", zExternTree); | |
| 1113 | + if( file_isdir(zExternBase, ExtFILE)!=1 ){ | |
| 1114 | + fossil_fatal("\"%s\" is not a directory", zExternBase); | |
| 1115 | 1115 | } |
| 1116 | 1116 | db_prepare(&q, |
| 1117 | 1117 | "SELECT pathname FROM vfile WHERE vid=%d ORDER BY pathname", |
| 1118 | 1118 | vid |
| 1119 | 1119 | ); |
| 1120 | 1120 | while( db_step(&q)==SQLITE_ROW ){ |
| 1121 | - const char *zTreename = db_column_text(&q,0); /* Repo tree name of file */ | |
| 1122 | - char *zLhs; /* Full name of left-hand side file */ | |
| 1123 | - char *zRhs; /* Full name of right-hand side file */ | |
| 1124 | - Blob rhs; /* Full text of RHS */ | |
| 1125 | - Blob lhs; /* Full text of LHS */ | |
| 1126 | - | |
| 1127 | - if( !file_dir_match(pFileDir, zTreename) ) continue; | |
| 1128 | - zLhs = mprintf("%s/%s", zExternTree, zTreename); | |
| 1129 | - zRhs = mprintf("%s%s", g.zLocalRoot, zTreename); | |
| 1121 | + const char *zFile; /* Name of file in the repository */ | |
| 1122 | + char *zLhs; /* Full name of left-hand side file */ | |
| 1123 | + char *zRhs; /* Full name of right-hand side file */ | |
| 1124 | + Blob rhs; /* Full text of RHS */ | |
| 1125 | + Blob lhs; /* Full text of LHS */ | |
| 1126 | + | |
| 1127 | + zFile = db_column_text(&q,0); | |
| 1128 | + if( !file_dir_match(pFileDir, zFile) ) continue; | |
| 1129 | + zLhs = mprintf("%s/%s", zExternBase, zFile); | |
| 1130 | + zRhs = mprintf("%s%s", g.zLocalRoot, zFile); | |
| 1130 | 1131 | if( file_size(zLhs, ExtFILE)<0 ){ |
| 1131 | 1132 | blob_zero(&lhs); |
| 1132 | 1133 | }else{ |
| 1133 | 1134 | blob_read_from_file(&lhs, zLhs, ExtFILE); |
| 1134 | 1135 | } |
| 1135 | 1136 | blob_read_from_file(&rhs, zRhs, ExtFILE); |
| 1136 | 1137 | if( blob_size(&lhs)!=blob_size(&rhs) |
| 1137 | 1138 | || memcmp(blob_buffer(&lhs), blob_buffer(&rhs), blob_size(&lhs))!=0 |
| 1138 | 1139 | ){ |
| 1139 | - diff_print_index(zTreename, pCfg, 0); | |
| 1140 | - diff_file_mem(&lhs, &rhs, zTreename, pCfg); | |
| 1140 | + diff_print_index(zFile, pCfg, 0); | |
| 1141 | + diff_file_mem(&lhs, &rhs, zFile, pCfg); | |
| 1141 | 1142 | } |
| 1142 | 1143 | blob_reset(&lhs); |
| 1143 | 1144 | blob_reset(&rhs); |
| 1144 | 1145 | fossil_free(zLhs); |
| 1145 | 1146 | fossil_free(zRhs); |
| @@ -1327,12 +1328,12 @@ | ||
| 1327 | 1328 | ** --strip-trailing-cr Strip trailing CR |
| 1328 | 1329 | ** --tcl Tcl-formatted output used internally by --tk |
| 1329 | 1330 | ** --tclsh PATH Tcl/Tk shell used for --tk (default: "tclsh") |
| 1330 | 1331 | ** --tk Launch a Tcl/Tk GUI for display |
| 1331 | 1332 | ** --to VERSION Select VERSION as target for the diff |
| 1332 | -** --tree DIR Use files under DIR as the baseline | |
| 1333 | -** --undo Diff against the "undo" buffer | |
| 1333 | +** --external-baseline DIR Use files under DIR as the baseline | |
| 1334 | +** --undo Use the undo buffer as the baseline | |
| 1334 | 1335 | ** --unified Unified diff |
| 1335 | 1336 | ** -v|--verbose Output complete text of added or deleted files |
| 1336 | 1337 | ** -h|--versions Show compared versions in the diff header |
| 1337 | 1338 | ** --webpage Format output as a stand-alone HTML webpage |
| 1338 | 1339 | ** -W|--width N Width of lines in side-by-side diff |
| @@ -1342,11 +1343,11 @@ | ||
| 1342 | 1343 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1343 | 1344 | const char *zFrom; /* Source version number */ |
| 1344 | 1345 | const char *zTo; /* Target version number */ |
| 1345 | 1346 | const char *zCheckin; /* Check-in version number */ |
| 1346 | 1347 | const char *zBranch; /* Branch to diff */ |
| 1347 | - const char *zTree; /* The --tree */ | |
| 1348 | + const char *zExBase; /* The --external-baseline option */ | |
| 1348 | 1349 | int againstUndo = 0; /* Diff against files in the undo buffer */ |
| 1349 | 1350 | FileDirList *pFileDir = 0; /* Restrict the diff to these files */ |
| 1350 | 1351 | DiffConfig DCfg; /* Diff configuration object */ |
| 1351 | 1352 | |
| 1352 | 1353 | if( find_option("tk",0,0)!=0 || has_option("tclsh") ){ |
| @@ -1356,15 +1357,15 @@ | ||
| 1356 | 1357 | isGDiff = g.argv[1][0]=='g'; |
| 1357 | 1358 | zFrom = find_option("from", "r", 1); |
| 1358 | 1359 | zTo = find_option("to", 0, 1); |
| 1359 | 1360 | zCheckin = find_option("checkin", "ci", 1); |
| 1360 | 1361 | zBranch = find_option("branch", 0, 1); |
| 1361 | - zTree = find_option("tree", 0, 1); | |
| 1362 | + zExBase = find_option("external-baseline", 0, 1); | |
| 1362 | 1363 | againstUndo = find_option("undo",0,0)!=0; |
| 1363 | - if( zTree && (zFrom || zTo || zCheckin || zBranch || againstUndo) ){ | |
| 1364 | - fossil_fatal("cannot use --tree together with --from, --to, --checkin," | |
| 1365 | - " --branch, or --undo"); | |
| 1364 | + if( zExBase && (zFrom || zTo || zCheckin || zBranch || againstUndo) ){ | |
| 1365 | + fossil_fatal("cannot use --external-baseline together with any of" | |
| 1366 | + " --from, --to, --checkin, --branch, or --undo"); | |
| 1366 | 1367 | } |
| 1367 | 1368 | if( againstUndo && (zFrom!=0 || zTo!=0 || zCheckin!=0 || zBranch!=0) ){ |
| 1368 | 1369 | fossil_fatal("cannot use --undo together with --from, --to, --checkin," |
| 1369 | 1370 | " or --branch"); |
| 1370 | 1371 | } |
| @@ -1421,12 +1422,12 @@ | ||
| 1421 | 1422 | if( zFrom==0 ){ |
| 1422 | 1423 | fossil_fatal("check-in %s has no parent", zTo); |
| 1423 | 1424 | } |
| 1424 | 1425 | } |
| 1425 | 1426 | diff_begin(&DCfg); |
| 1426 | - if( zTree ){ | |
| 1427 | - diff_tree_to_checkout(zTree, &DCfg, pFileDir); | |
| 1427 | + if( zExBase ){ | |
| 1428 | + diff_externbase_to_checkout(zExBase, &DCfg, pFileDir); | |
| 1428 | 1429 | }else if( againstUndo ){ |
| 1429 | 1430 | if( db_lget_int("undo_available",0)==0 ){ |
| 1430 | 1431 | fossil_print("No undo or redo is available\n"); |
| 1431 | 1432 | return; |
| 1432 | 1433 | } |
| 1433 | 1434 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1095,51 +1095,52 @@ | |
| 1095 | /* |
| 1096 | ** Compute the difference from an external tree of files to the current |
| 1097 | ** working checkout with its edits. |
| 1098 | ** |
| 1099 | ** To put it another way: Every managed file in the current working |
| 1100 | ** checkout is compared to the file with same under in zTree. The zTree |
| 1101 | ** files are on the left and the files in the current working directory |
| 1102 | ** are on the right. |
| 1103 | */ |
| 1104 | void diff_tree_to_checkout( |
| 1105 | const char *zExternTree, /* Remote tree to use as the baseline */ |
| 1106 | DiffConfig *pCfg, /* Diff settings */ |
| 1107 | FileDirList *pFileDir /* Only look at these files */ |
| 1108 | ){ |
| 1109 | int vid; |
| 1110 | Stmt q; |
| 1111 | |
| 1112 | vid = db_lget_int("checkout",0); |
| 1113 | if( file_isdir(zExternTree, ExtFILE)!=1 ){ |
| 1114 | fossil_fatal("\"%s\" is not a directory", zExternTree); |
| 1115 | } |
| 1116 | db_prepare(&q, |
| 1117 | "SELECT pathname FROM vfile WHERE vid=%d ORDER BY pathname", |
| 1118 | vid |
| 1119 | ); |
| 1120 | while( db_step(&q)==SQLITE_ROW ){ |
| 1121 | const char *zTreename = db_column_text(&q,0); /* Repo tree name of file */ |
| 1122 | char *zLhs; /* Full name of left-hand side file */ |
| 1123 | char *zRhs; /* Full name of right-hand side file */ |
| 1124 | Blob rhs; /* Full text of RHS */ |
| 1125 | Blob lhs; /* Full text of LHS */ |
| 1126 | |
| 1127 | if( !file_dir_match(pFileDir, zTreename) ) continue; |
| 1128 | zLhs = mprintf("%s/%s", zExternTree, zTreename); |
| 1129 | zRhs = mprintf("%s%s", g.zLocalRoot, zTreename); |
| 1130 | if( file_size(zLhs, ExtFILE)<0 ){ |
| 1131 | blob_zero(&lhs); |
| 1132 | }else{ |
| 1133 | blob_read_from_file(&lhs, zLhs, ExtFILE); |
| 1134 | } |
| 1135 | blob_read_from_file(&rhs, zRhs, ExtFILE); |
| 1136 | if( blob_size(&lhs)!=blob_size(&rhs) |
| 1137 | || memcmp(blob_buffer(&lhs), blob_buffer(&rhs), blob_size(&lhs))!=0 |
| 1138 | ){ |
| 1139 | diff_print_index(zTreename, pCfg, 0); |
| 1140 | diff_file_mem(&lhs, &rhs, zTreename, pCfg); |
| 1141 | } |
| 1142 | blob_reset(&lhs); |
| 1143 | blob_reset(&rhs); |
| 1144 | fossil_free(zLhs); |
| 1145 | fossil_free(zRhs); |
| @@ -1327,12 +1328,12 @@ | |
| 1327 | ** --strip-trailing-cr Strip trailing CR |
| 1328 | ** --tcl Tcl-formatted output used internally by --tk |
| 1329 | ** --tclsh PATH Tcl/Tk shell used for --tk (default: "tclsh") |
| 1330 | ** --tk Launch a Tcl/Tk GUI for display |
| 1331 | ** --to VERSION Select VERSION as target for the diff |
| 1332 | ** --tree DIR Use files under DIR as the baseline |
| 1333 | ** --undo Diff against the "undo" buffer |
| 1334 | ** --unified Unified diff |
| 1335 | ** -v|--verbose Output complete text of added or deleted files |
| 1336 | ** -h|--versions Show compared versions in the diff header |
| 1337 | ** --webpage Format output as a stand-alone HTML webpage |
| 1338 | ** -W|--width N Width of lines in side-by-side diff |
| @@ -1342,11 +1343,11 @@ | |
| 1342 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1343 | const char *zFrom; /* Source version number */ |
| 1344 | const char *zTo; /* Target version number */ |
| 1345 | const char *zCheckin; /* Check-in version number */ |
| 1346 | const char *zBranch; /* Branch to diff */ |
| 1347 | const char *zTree; /* The --tree */ |
| 1348 | int againstUndo = 0; /* Diff against files in the undo buffer */ |
| 1349 | FileDirList *pFileDir = 0; /* Restrict the diff to these files */ |
| 1350 | DiffConfig DCfg; /* Diff configuration object */ |
| 1351 | |
| 1352 | if( find_option("tk",0,0)!=0 || has_option("tclsh") ){ |
| @@ -1356,15 +1357,15 @@ | |
| 1356 | isGDiff = g.argv[1][0]=='g'; |
| 1357 | zFrom = find_option("from", "r", 1); |
| 1358 | zTo = find_option("to", 0, 1); |
| 1359 | zCheckin = find_option("checkin", "ci", 1); |
| 1360 | zBranch = find_option("branch", 0, 1); |
| 1361 | zTree = find_option("tree", 0, 1); |
| 1362 | againstUndo = find_option("undo",0,0)!=0; |
| 1363 | if( zTree && (zFrom || zTo || zCheckin || zBranch || againstUndo) ){ |
| 1364 | fossil_fatal("cannot use --tree together with --from, --to, --checkin," |
| 1365 | " --branch, or --undo"); |
| 1366 | } |
| 1367 | if( againstUndo && (zFrom!=0 || zTo!=0 || zCheckin!=0 || zBranch!=0) ){ |
| 1368 | fossil_fatal("cannot use --undo together with --from, --to, --checkin," |
| 1369 | " or --branch"); |
| 1370 | } |
| @@ -1421,12 +1422,12 @@ | |
| 1421 | if( zFrom==0 ){ |
| 1422 | fossil_fatal("check-in %s has no parent", zTo); |
| 1423 | } |
| 1424 | } |
| 1425 | diff_begin(&DCfg); |
| 1426 | if( zTree ){ |
| 1427 | diff_tree_to_checkout(zTree, &DCfg, pFileDir); |
| 1428 | }else if( againstUndo ){ |
| 1429 | if( db_lget_int("undo_available",0)==0 ){ |
| 1430 | fossil_print("No undo or redo is available\n"); |
| 1431 | return; |
| 1432 | } |
| 1433 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1095,51 +1095,52 @@ | |
| 1095 | /* |
| 1096 | ** Compute the difference from an external tree of files to the current |
| 1097 | ** working checkout with its edits. |
| 1098 | ** |
| 1099 | ** To put it another way: Every managed file in the current working |
| 1100 | ** checkout is compared to the file with same under in zExternBase. The |
| 1101 | ** zExternBase files are on the left and the files in the current working |
| 1102 | ** directory are on the right. |
| 1103 | */ |
| 1104 | void diff_externbase_to_checkout( |
| 1105 | const char *zExternBase, /* Remote tree to use as the baseline */ |
| 1106 | DiffConfig *pCfg, /* Diff settings */ |
| 1107 | FileDirList *pFileDir /* Only look at these files */ |
| 1108 | ){ |
| 1109 | int vid; |
| 1110 | Stmt q; |
| 1111 | |
| 1112 | vid = db_lget_int("checkout",0); |
| 1113 | if( file_isdir(zExternBase, ExtFILE)!=1 ){ |
| 1114 | fossil_fatal("\"%s\" is not a directory", zExternBase); |
| 1115 | } |
| 1116 | db_prepare(&q, |
| 1117 | "SELECT pathname FROM vfile WHERE vid=%d ORDER BY pathname", |
| 1118 | vid |
| 1119 | ); |
| 1120 | while( db_step(&q)==SQLITE_ROW ){ |
| 1121 | const char *zFile; /* Name of file in the repository */ |
| 1122 | char *zLhs; /* Full name of left-hand side file */ |
| 1123 | char *zRhs; /* Full name of right-hand side file */ |
| 1124 | Blob rhs; /* Full text of RHS */ |
| 1125 | Blob lhs; /* Full text of LHS */ |
| 1126 | |
| 1127 | zFile = db_column_text(&q,0); |
| 1128 | if( !file_dir_match(pFileDir, zFile) ) continue; |
| 1129 | zLhs = mprintf("%s/%s", zExternBase, zFile); |
| 1130 | zRhs = mprintf("%s%s", g.zLocalRoot, zFile); |
| 1131 | if( file_size(zLhs, ExtFILE)<0 ){ |
| 1132 | blob_zero(&lhs); |
| 1133 | }else{ |
| 1134 | blob_read_from_file(&lhs, zLhs, ExtFILE); |
| 1135 | } |
| 1136 | blob_read_from_file(&rhs, zRhs, ExtFILE); |
| 1137 | if( blob_size(&lhs)!=blob_size(&rhs) |
| 1138 | || memcmp(blob_buffer(&lhs), blob_buffer(&rhs), blob_size(&lhs))!=0 |
| 1139 | ){ |
| 1140 | diff_print_index(zFile, pCfg, 0); |
| 1141 | diff_file_mem(&lhs, &rhs, zFile, pCfg); |
| 1142 | } |
| 1143 | blob_reset(&lhs); |
| 1144 | blob_reset(&rhs); |
| 1145 | fossil_free(zLhs); |
| 1146 | fossil_free(zRhs); |
| @@ -1327,12 +1328,12 @@ | |
| 1328 | ** --strip-trailing-cr Strip trailing CR |
| 1329 | ** --tcl Tcl-formatted output used internally by --tk |
| 1330 | ** --tclsh PATH Tcl/Tk shell used for --tk (default: "tclsh") |
| 1331 | ** --tk Launch a Tcl/Tk GUI for display |
| 1332 | ** --to VERSION Select VERSION as target for the diff |
| 1333 | ** --external-baseline DIR Use files under DIR as the baseline |
| 1334 | ** --undo Use the undo buffer as the baseline |
| 1335 | ** --unified Unified diff |
| 1336 | ** -v|--verbose Output complete text of added or deleted files |
| 1337 | ** -h|--versions Show compared versions in the diff header |
| 1338 | ** --webpage Format output as a stand-alone HTML webpage |
| 1339 | ** -W|--width N Width of lines in side-by-side diff |
| @@ -1342,11 +1343,11 @@ | |
| 1343 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1344 | const char *zFrom; /* Source version number */ |
| 1345 | const char *zTo; /* Target version number */ |
| 1346 | const char *zCheckin; /* Check-in version number */ |
| 1347 | const char *zBranch; /* Branch to diff */ |
| 1348 | const char *zExBase; /* The --external-baseline option */ |
| 1349 | int againstUndo = 0; /* Diff against files in the undo buffer */ |
| 1350 | FileDirList *pFileDir = 0; /* Restrict the diff to these files */ |
| 1351 | DiffConfig DCfg; /* Diff configuration object */ |
| 1352 | |
| 1353 | if( find_option("tk",0,0)!=0 || has_option("tclsh") ){ |
| @@ -1356,15 +1357,15 @@ | |
| 1357 | isGDiff = g.argv[1][0]=='g'; |
| 1358 | zFrom = find_option("from", "r", 1); |
| 1359 | zTo = find_option("to", 0, 1); |
| 1360 | zCheckin = find_option("checkin", "ci", 1); |
| 1361 | zBranch = find_option("branch", 0, 1); |
| 1362 | zExBase = find_option("external-baseline", 0, 1); |
| 1363 | againstUndo = find_option("undo",0,0)!=0; |
| 1364 | if( zExBase && (zFrom || zTo || zCheckin || zBranch || againstUndo) ){ |
| 1365 | fossil_fatal("cannot use --external-baseline together with any of" |
| 1366 | " --from, --to, --checkin, --branch, or --undo"); |
| 1367 | } |
| 1368 | if( againstUndo && (zFrom!=0 || zTo!=0 || zCheckin!=0 || zBranch!=0) ){ |
| 1369 | fossil_fatal("cannot use --undo together with --from, --to, --checkin," |
| 1370 | " or --branch"); |
| 1371 | } |
| @@ -1421,12 +1422,12 @@ | |
| 1422 | if( zFrom==0 ){ |
| 1423 | fossil_fatal("check-in %s has no parent", zTo); |
| 1424 | } |
| 1425 | } |
| 1426 | diff_begin(&DCfg); |
| 1427 | if( zExBase ){ |
| 1428 | diff_externbase_to_checkout(zExBase, &DCfg, pFileDir); |
| 1429 | }else if( againstUndo ){ |
| 1430 | if( db_lget_int("undo_available",0)==0 ){ |
| 1431 | fossil_print("No undo or redo is available\n"); |
| 1432 | return; |
| 1433 | } |
| 1434 |