Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | link the command line help to the gui pages, where appropriate |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | wolfgangHelpCmd |
| Files: | files | file ages | folders |
| SHA1: |
a5cd79272f1287b8aa96f170945ac0b1 |
| User & Date: | wolfgang 2010-10-09 15:34:14.000 |
Context
|
2010-10-09
| ||
| 15:39 | merge from trunk check-in: e1d15514fb user: wolfgang tags: wolfgangHelpCmd | |
| 15:34 | link the command line help to the gui pages, where appropriate check-in: a5cd79272f user: wolfgang tags: wolfgangHelpCmd | |
| 13:33 | added a gui diff form to enter the UUIDs, branches, .. and add a link to info page check-in: cee3e0812c user: wolfgang tags: wolfgangHelpCmd | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 |
** ssh-command Command used to talk to a remote machine with
** the "ssh://" protocol.
**
** web-browser A shell command used to launch your preferred
** web browser when given a URL as an argument.
** Defaults to "start" on windows, "open" on Mac,
** and "firefox" on Unix.
*/
void setting_cmd(void){
int i;
int globalFlag = find_option("global","g",0)!=0;
int unsetFlag = g.argv[1][0]=='u';
db_open_config(1);
db_find_and_open_repository(0);
| > > > > | 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 |
** ssh-command Command used to talk to a remote machine with
** the "ssh://" protocol.
**
** web-browser A shell command used to launch your preferred
** web browser when given a URL as an argument.
** Defaults to "start" on windows, "open" on Mac,
** and "firefox" on Unix.
**
** There is a simple form in the administration gui for these settings:
** * Go to the <a href="setup">Admin</a> page
** ** and click <a href="setup_settings">Settings</a>
*/
void setting_cmd(void){
int i;
int globalFlag = find_option("global","g",0)!=0;
int unsetFlag = g.argv[1][0]=='u';
db_open_config(1);
db_find_and_open_repository(0);
|
| ︙ | ︙ |
Changes to src/descendants.c.
| ︙ | ︙ | |||
253 254 255 256 257 258 259 |
timeline_query_for_tty()
);
print_timeline(&q, 20);
db_finalize(&q);
}
/*
| | > > > | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
timeline_query_for_tty()
);
print_timeline(&q, 20);
db_finalize(&q);
}
/*
** COMMAND: leaves
**
** Usage: %fossil leaves ?--all? ?--closed?
**
** Find leaves of all branches. By default show only open leaves.
** The --all flag causes all leaves (closed and open) to be shown.
** The --closed flag shows only closed leaves.
**
** This information can also be viewed in the gui:
** * Go the <a href="leaves">leaves</a> page
*/
void leaves_cmd(void){
Stmt q;
int showAll = find_option("all", 0, 0)!=0;
int showClosed = find_option("closed", 0, 0)!=0;
db_must_be_within_tree();
|
| ︙ | ︙ |
Changes to src/diff.c.
| ︙ | ︙ | |||
823 824 825 826 827 828 829 830 831 832 833 834 835 836 |
/*
** COMMAND: annotate
**
** %fossil annotate FILENAME
**
** Output the text of a file with markings to show when each line of
** the file was last modified.
*/
void annotate_cmd(void){
int fnid; /* Filename ID */
int fid; /* File instance ID */
int mid; /* Manifest where file was checked in */
Blob treename; /* FILENAME translated to canonical form */
char *zFilename; /* Cannonical filename */
| > > > | 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 |
/*
** COMMAND: annotate
**
** %fossil annotate FILENAME
**
** Output the text of a file with markings to show when each line of
** the file was last modified.
**
** This can also be viewed in the gui, if you click the "annotate" link
** on the "File History" page of files.
*/
void annotate_cmd(void){
int fnid; /* Filename ID */
int fid; /* File instance ID */
int mid; /* Manifest where file was checked in */
Blob treename; /* FILENAME translated to canonical form */
char *zFilename; /* Cannonical filename */
|
| ︙ | ︙ |
Changes to src/diffcmd.c.
| ︙ | ︙ | |||
365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
** check-out are used.
**
** The "-i" command-line option forces the use of the internal diff logic
** rather than any external diff program that might be configured using
** the <a>setting</a> command. If no external diff program is configured, then
** the "-i" option is a no-op. The "-i" option converts "gdiff" into
** "diff".
*/
void diff_cmd(void){
int isGDiff; /* True for gdiff. False for normal diff */
int isInternDiff; /* True for internal diff */
const char *zFrom; /* Source version number */
const char *zTo; /* Target version number */
const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */
| > > > > | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
** check-out are used.
**
** The "-i" command-line option forces the use of the internal diff logic
** rather than any external diff program that might be configured using
** the <a>setting</a> command. If no external diff program is configured, then
** the "-i" option is a no-op. The "-i" option converts "gdiff" into
** "diff".
**
** The results of the internal diff command can also be seen in the gui:
** 1. Go to the <a href="vdiff">vdiff</a> page
** 2. use the "diff against another version" link on the Check-in detail view.
*/
void diff_cmd(void){
int isGDiff; /* True for gdiff. False for normal diff */
int isInternDiff; /* True for internal diff */
const char *zFrom; /* Source version number */
const char *zTo; /* Target version number */
const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */
|
| ︙ | ︙ |
Changes to src/finfo.c.
| ︙ | ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
**
** Usage: %fossil finfo FILENAME
**
** Print the change history for a single file.
**
** The "--limit N" and "--offset P" options limit the output to the first
** N changes after skipping P changes.
*/
void finfo_cmd(void){
Stmt q;
int vid;
Blob dest;
const char *zFilename;
const char *zLimit;
| > > > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
**
** Usage: %fossil finfo FILENAME
**
** Print the change history for a single file.
**
** The "--limit N" and "--offset P" options limit the output to the first
** N changes after skipping P changes.
**
** The history of a file can also be viewed in the gui:
** * Go to the <a href="dir">file browser</a> and drill down to the file
*/
void finfo_cmd(void){
Stmt q;
int vid;
Blob dest;
const char *zFilename;
const char *zLimit;
|
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
556 557 558 559 560 561 562 | /* ** COMMAND: help ** ** Usage: %fossil help COMMAND ** | | > > > > | 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
/*
** COMMAND: help
**
** Usage: %fossil help COMMAND
**
** Display information on how to use COMMAND. If COMMAND is
** omitted, a list of available commands is displayed.
**
** This can also be viewed in the gui:
** * Go to the <a href="help">help</a> page and click COMMAND
*/
void help_cmd(void){
int rc, idx;
const char *z;
if( g.argc!=3 ){
printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n", g.argv[0]);
cmd_cmd_list();
|
| ︙ | ︙ | |||
582 583 584 585 586 587 588 589 590 591 592 593 594 595 |
fossil_fatal("no help available for the %s command",
aCommand[idx].zName);
}
while( *z ){
if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
printf("%s", g.argv[0]);
z += 7;
}else if( *z=='<' && strncmp(z,"<a>",3)==0 ){
putchar('"');
z += 3;
}else if( *z=='<' && strncmp(z,"</a>",4)==0 ){
putchar('"');
z += 4;
}else{
| > > > > | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
fossil_fatal("no help available for the %s command",
aCommand[idx].zName);
}
while( *z ){
if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
printf("%s", g.argv[0]);
z += 7;
}else if( *z=='<' && strncmp(z,"<a ",3)==0 ){
putchar('"');
while( *z && *z!='>') z++;
if( *z ) z++;
}else if( *z=='<' && strncmp(z,"<a>",3)==0 ){
putchar('"');
z += 3;
}else if( *z=='<' && strncmp(z,"</a>",4)==0 ){
putchar('"');
z += 4;
}else{
|
| ︙ | ︙ | |||
633 634 635 636 637 638 639 640 641 642 643 644 645 646 |
}else if( zSrc[src]=='<' && strncmp(zSrc+src, "</a>", 3)==0 ){
src += 4;
zDest[dest++]='<';
zDest[dest++]='/';
zDest[dest++]='a';
zDest[dest++]='>';
zDest[dest++]='"';
}else if( zSrc[src]=='<' && strncmp(zSrc+src, "<a>", 3)==0 ){
/* found an internal command cross reference,
** create an additional link
*/
int start;
len+=80;
| > > > > > > > > | 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
}else if( zSrc[src]=='<' && strncmp(zSrc+src, "</a>", 3)==0 ){
src += 4;
zDest[dest++]='<';
zDest[dest++]='/';
zDest[dest++]='a';
zDest[dest++]='>';
zDest[dest++]='"';
}else if( zSrc[src]=='<' && strncmp(zSrc+src, "<a ", 3)==0 ){
len += 2;
zDest=realloc(zDest,len);
zDest[dest++]='"';
while( zSrc[src] && zSrc[src]!='>' ){
zDest[dest++]=zSrc[src++];
}
if( zSrc[src] ) zDest[dest++]=zSrc[src++];
}else if( zSrc[src]=='<' && strncmp(zSrc+src, "<a>", 3)==0 ){
/* found an internal command cross reference,
** create an additional link
*/
int start;
len+=80;
|
| ︙ | ︙ | |||
924 925 926 927 928 929 930 931 932 933 934 935 936 937 |
**
** #!/usr/bin/fossil
** repository: /home/somebody/project.db
**
** The second line defines the name of the repository. After locating
** the repository, fossil will generate a webpage on stdout based on
** the values of standard CGI environment variables.
*/
void cmd_cgi(void){
const char *zFile;
const char *zNotFound = 0;
Blob config, line, key, value;
if( g.argc==3 && strcmp(g.argv[1],"cgi")==0 ){
zFile = g.argv[2];
| > > | 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 |
**
** #!/usr/bin/fossil
** repository: /home/somebody/project.db
**
** The second line defines the name of the repository. After locating
** the repository, fossil will generate a webpage on stdout based on
** the values of standard CGI environment variables.
**
** See also the <a>http</a>, <a>server</a> and <a>ui</a> commands.
*/
void cmd_cgi(void){
const char *zFile;
const char *zNotFound = 0;
Blob config, line, key, value;
if( g.argc==3 && strcmp(g.argv[1],"cgi")==0 ){
zFile = g.argv[2];
|
| ︙ | ︙ | |||
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 |
** repository.
**
** If REPOSITORY is a directory that contains one or more respositories
** with names of the form "*.fossil" then the first element of the URL
** pathname selects among the various repositories. If the pathname does
** not select a valid repository and the --notfound option is available,
** then the server redirects (HTTP code 302) to the URL of --notfound.
*/
void cmd_http(void){
const char *zIpAddr;
const char *zNotFound;
zNotFound = find_option("notfound", 0, 1);
g.cgiOutput = 1;
if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){
| > > | 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 |
** repository.
**
** If REPOSITORY is a directory that contains one or more respositories
** with names of the form "*.fossil" then the first element of the URL
** pathname selects among the various repositories. If the pathname does
** not select a valid repository and the --notfound option is available,
** then the server redirects (HTTP code 302) to the URL of --notfound.
**
** See also the <a>cgi</a>, <a>server</a> and <a>ui</a> commands.
*/
void cmd_http(void){
const char *zIpAddr;
const char *zNotFound;
zNotFound = find_option("notfound", 0, 1);
g.cgiOutput = 1;
if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){
|
| ︙ | ︙ | |||
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
** the web server. The "ui" command also binds to 127.0.0.1 and so will
** only process HTTP traffic from the local machine.
**
** In the "server" command, the REPOSITORY can be a directory (aka folder)
** that contains one or more respositories with names ending in ".fossil".
** In that case, the first element of the URL is used to select among the
** various repositories.
*/
void cmd_webserver(void){
int iPort, mxPort; /* Range of TCP ports allowed */
const char *zPort; /* Value of the --port option */
char *zBrowser; /* Name of web browser program */
char *zBrowserCmd = 0; /* Command to launch the web browser */
int isUiCmd; /* True if command is "ui", not "server' */
| > > | 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 |
** the web server. The "ui" command also binds to 127.0.0.1 and so will
** only process HTTP traffic from the local machine.
**
** In the "server" command, the REPOSITORY can be a directory (aka folder)
** that contains one or more respositories with names ending in ".fossil".
** In that case, the first element of the URL is used to select among the
** various repositories.
**
** See also the <a>cgi</a> and <a>http</a> commands.
*/
void cmd_webserver(void){
int iPort, mxPort; /* Range of TCP ports allowed */
const char *zPort; /* Value of the --port option */
char *zBrowser; /* Name of web browser program */
char *zBrowserCmd = 0; /* Command to launch the web browser */
int isUiCmd; /* True if command is "ui", not "server' */
|
| ︙ | ︙ |
Changes to src/rebuild.c.
| ︙ | ︙ | |||
483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
** Usage: %fossil reconstruct FILENAME DIRECTORY
**
** This command studies the artifacts (files) in DIRECTORY and
** reconstructs the fossil record from them. It places the new
** fossil repository in FILENAME. Subdirectories are read, files
** with leading '.' in the filename are ignored.
**
*/
void reconstruct_cmd(void) {
char *zPassword;
if( g.argc!=4 ){
usage("FILENAME DIRECTORY");
}
if( file_isdir(g.argv[3])!=1 ){
| > | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
** Usage: %fossil reconstruct FILENAME DIRECTORY
**
** This command studies the artifacts (files) in DIRECTORY and
** reconstructs the fossil record from them. It places the new
** fossil repository in FILENAME. Subdirectories are read, files
** with leading '.' in the filename are ignored.
**
** See also the <a>deconstruct</a> command.
*/
void reconstruct_cmd(void) {
char *zPassword;
if( g.argc!=4 ){
usage("FILENAME DIRECTORY");
}
if( file_isdir(g.argv[3])!=1 ){
|
| ︙ | ︙ | |||
531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
** This command exports all artifacts of o given repository and writes
** all artifacts to the file system. The DESTINATION directory will be
** populated with subdirectories AA and files AA/BBBBBBBBB.., where
** AABBBBBBBBB.. is the 40 character artifact ID and AA the first 2
** characters.
** If -L|--prefixlength is given, the length (default 2) of the directory
** prefix can be set to 0,1,..,9 characters.
*/
void deconstruct_cmd(void){
const char *zDestDir;
const char *zPrefixOpt;
Stmt s;
/* check number of arguments */
| > > | 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 |
** This command exports all artifacts of o given repository and writes
** all artifacts to the file system. The DESTINATION directory will be
** populated with subdirectories AA and files AA/BBBBBBBBB.., where
** AABBBBBBBBB.. is the 40 character artifact ID and AA the first 2
** characters.
** If -L|--prefixlength is given, the length (default 2) of the directory
** prefix can be set to 0,1,..,9 characters.
**
** See also the <a>reconstruct</a> command.
*/
void deconstruct_cmd(void){
const char *zDestDir;
const char *zPrefixOpt;
Stmt s;
/* check number of arguments */
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
** The optional TYPE argument may any types supported by the /timeline
** page. For example:
**
** w = wiki commits only
** ci = file commits only
** t = tickets only
** e = events only
*/
void timeline_cmd(void){
Stmt q;
int n, k;
const char *zCount;
const char *zType;
char *zOrigin;
| > > > | 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
** The optional TYPE argument may any types supported by the /timeline
** page. For example:
**
** w = wiki commits only
** ci = file commits only
** t = tickets only
** e = events only
**
** The information can also be used in the gui:
** * go to the <a href="timeline">timeline</a> page
*/
void timeline_cmd(void){
Stmt q;
int n, k;
const char *zCount;
const char *zType;
char *zOrigin;
|
| ︙ | ︙ |
Changes to src/tkt.c.
| ︙ | ︙ | |||
890 891 892 893 894 895 896 897 898 899 900 901 902 903 |
**
** %fossil ticket add FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
**
** like set, but create a new ticket with the given values.
**
** The values in set|add are not validated against the definitions
** given in "Ticket Common Script".
*/
void ticket_cmd(void){
int n;
/* do some ints, we want to be inside a checkout */
db_must_be_within_tree();
db_find_and_open_repository(1);
| > > > | 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 |
**
** %fossil ticket add FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
**
** like set, but create a new ticket with the given values.
**
** The values in set|add are not validated against the definitions
** given in "Ticket Common Script".
**
** All this stuff can also be done in the gui:
** * Go the the <a href="reportlist">Tickets</a> page
*/
void ticket_cmd(void){
int n;
/* do some ints, we want to be inside a checkout */
db_must_be_within_tree();
db_find_and_open_repository(1);
|
| ︙ | ︙ |
Changes to src/zip.c.
| ︙ | ︙ | |||
379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
** Usage: %fossil zip VERSION OUTPUTFILE [--name DIRECTORYNAME]
**
** Generate a ZIP archive for a specified version. If the --name option
** is used, it argument becomes the name of the top-level directory in the
** resulting ZIP archive. If --name is omitted, the top-level directory
** named is derived from the project name, the check-in date and time, and
** the artifact ID of the check-in.
*/
void baseline_zip_cmd(void){
int rid;
Blob zip;
const char *zName;
zName = find_option("name", 0, 1);
db_find_and_open_repository(1);
| > > > | 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
** Usage: %fossil zip VERSION OUTPUTFILE [--name DIRECTORYNAME]
**
** Generate a ZIP archive for a specified version. If the --name option
** is used, it argument becomes the name of the top-level directory in the
** resulting ZIP archive. If --name is omitted, the top-level directory
** named is derived from the project name, the check-in date and time, and
** the artifact ID of the check-in.
**
** The zip download can also be done through the Check-in detail view,
** accessible from the <a href="timeline">timeline</a> page.
*/
void baseline_zip_cmd(void){
int rid;
Blob zip;
const char *zName;
zName = find_option("name", 0, 1);
db_find_and_open_repository(1);
|
| ︙ | ︙ |