Fossil

Check-in [b76a547f1a]
Login

Check-in [b76a547f1a]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:added cross reference links to command line help in the gui
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | wolfgangHelpCmd
Files: files | file ages | folders
SHA1: b76a547f1aa13360c44ab900d60cddf8db77459e
User & Date: wolfgang 2010-10-08 12:02:43.000
Context
2010-10-08
12:10
shorten command lines to 80 char ... (check-in: ad29dc1132 user: wolfgang tags: wolfgangHelpCmd)
12:02
added cross reference links to command line help in the gui ... (check-in: b76a547f1a user: wolfgang tags: wolfgangHelpCmd)
2010-10-07
19:17
Merge the "ticket" command into the trunk. ... (check-in: 2f5d45eca3 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/add.c.
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
** Usage: %fossil mv|rename OLDNAME NEWNAME
**    or: %fossil mv|rename OLDNAME... DIR
**
** Move or rename one or more files within the tree
**
** This command does not rename the files on disk.  This command merely
** records the fact that filenames have changed so that appropriate notations
** can be made at the next commit/checkin.
*/
void mv_cmd(void){
  int i;
  int vid;
  char *zDest;
  Blob dest;
  Stmt q;







|







294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
** Usage: %fossil mv|rename OLDNAME NEWNAME
**    or: %fossil mv|rename OLDNAME... DIR
**
** Move or rename one or more files within the tree
**
** This command does not rename the files on disk.  This command merely
** records the fact that filenames have changed so that appropriate notations
** can be made at the next <a>commit</a>/checkin.
*/
void mv_cmd(void){
  int i;
  int vid;
  char *zDest;
  Blob dest;
  Stmt q;
Changes to src/allrepo.c.
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
**    push       Run a "push" on all repositories
**
**    rebuild    Rebuild on all repositories
**
**    sync       Run a "sync" on all repositories
**
** Respositories are automatically added to the set of known repositories
** when one of the following commands against the repository: clone, info,
** pull, push, or sync
*/
void all_cmd(void){
  int n;
  Stmt q;
  const char *zCmd;
  char *zSyscmd;
  char *zFossil;







|
|







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
**    push       Run a "push" on all repositories
**
**    rebuild    Rebuild on all repositories
**
**    sync       Run a "sync" on all repositories
**
** Respositories are automatically added to the set of known repositories
** when one of the following commands against the repository:
**   <a>clone</a>, <a>info</a>, <a>pull</a>, <a>push</a>, or <a>sync</a>
*/
void all_cmd(void){
  int n;
  Stmt q;
  const char *zCmd;
  char *zSyscmd;
  char *zFossil;
Changes to src/checkin.c.
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

/*
** COMMAND: changes
**
** Usage: %fossil changes
**
** Report on the edit status of all files in the current checkout.
** See also the "status" and "extra" commands.
*/
void changes_cmd(void){
  Blob report;
  int vid;
  db_must_be_within_tree();
  blob_zero(&report);
  vid = db_lget_int("checkout", 0);







|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

/*
** COMMAND: changes
**
** Usage: %fossil changes
**
** Report on the edit status of all files in the current checkout.
** See also the "<a>status</a>" and "<a>extra</a>" commands.
*/
void changes_cmd(void){
  Blob report;
  int vid;
  db_must_be_within_tree();
  blob_zero(&report);
  vid = db_lget_int("checkout", 0);
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
}

/*
** COMMAND: extras
** Usage: %fossil extras ?--dotfiles? ?--ignore GLOBPATTERN?
**
** Print a list of all files in the source tree that are not part of
** the current checkout.  See also the "clean" command.
**
** Files and subdirectories whose names begin with "." are normally
** ignored but can be included by adding the --dotfiles option.
*/
void extra_cmd(void){
  Blob path;
  Blob repo;







|







245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
}

/*
** COMMAND: extras
** Usage: %fossil extras ?--dotfiles? ?--ignore GLOBPATTERN?
**
** Print a list of all files in the source tree that are not part of
** the current checkout.  See also the "<a>clean</a>" command.
**
** Files and subdirectories whose names begin with "." are normally
** ignored but can be included by adding the --dotfiles option.
*/
void extra_cmd(void){
  Blob path;
  Blob repo;
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305

/*
** COMMAND: clean
** Usage: %fossil clean ?--force? ?--dotfiles?
**
** Delete all "extra" files in the source tree.  "Extra" files are
** files that are not officially part of the checkout.  See also
** the "extra" command. This operation cannot be undone. 
**
** You will be prompted before removing each file. If you are
** sure you wish to remove all "extra" files you can specify the
** optional --force flag and no prompts will be issued.
**
** Files and subdirectories whose names begin with "." are
** normally ignored.  They are included if the "--dotfiles" option







|







291
292
293
294
295
296
297
298
299
300
301
302
303
304
305

/*
** COMMAND: clean
** Usage: %fossil clean ?--force? ?--dotfiles?
**
** Delete all "extra" files in the source tree.  "Extra" files are
** files that are not officially part of the checkout.  See also
** the "<a>extras</a>" command. This operation cannot be undone. 
**
** You will be prompted before removing each file. If you are
** sure you wish to remove all "extra" files you can specify the
** optional --force flag and no prompts will be issued.
**
** Files and subdirectories whose names begin with "." are
** normally ignored.  They are included if the "--dotfiles" option
Changes to src/checkout.c.
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
** the --force option appears on the command-line.  The --keep option
** leaves files on disk unchanged, except the manifest and manifest.uuid
** files.
**
** The --latest flag can be used in place of VERSION to checkout the
** latest version in the repository.
**
** See also the "update" command.
*/
void checkout_cmd(void){
  int forceFlag;                 /* Force checkout even if edits exist */
  int keepFlag;                  /* Do not change any files on disk */
  int latestFlag;                /* Checkout the latest version */
  char *zVers;                   /* Version to checkout */
  int promptFlag;                /* True to prompt before overwriting */







|







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
** the --force option appears on the command-line.  The --keep option
** leaves files on disk unchanged, except the manifest and manifest.uuid
** files.
**
** The --latest flag can be used in place of VERSION to checkout the
** latest version in the repository.
**
** See also the "<a>update</a>" command.
*/
void checkout_cmd(void){
  int forceFlag;                 /* Force checkout even if edits exist */
  int keepFlag;                  /* Do not change any files on disk */
  int latestFlag;                /* Checkout the latest version */
  char *zVers;                   /* Version to checkout */
  int promptFlag;                /* True to prompt before overwriting */
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
}

/*
** COMMAND: close
**
** Usage: %fossil close ?-f|--force?
**
** The opposite of "open".  Close the current database connection.
** Require a -f or --force flag if there are unsaved changed in the
** current check-out.
*/
void close_cmd(void){
  int forceFlag = find_option("force","f",0)!=0;
  db_must_be_within_tree();
  if( !forceFlag && unsaved_changes()==1 ){
    fossil_fatal("there are unsaved changes in the current checkout");
  }
  db_close();
  unlink_local_database();
}







|












270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
}

/*
** COMMAND: close
**
** Usage: %fossil close ?-f|--force?
**
** The opposite of "<a>open</a>".  Close the current database connection.
** Require a -f or --force flag if there are unsaved changed in the
** current check-out.
*/
void close_cmd(void){
  int forceFlag = find_option("force","f",0)!=0;
  db_must_be_within_tree();
  if( !forceFlag && unsaved_changes()==1 ){
    fossil_fatal("there are unsaved changes in the current checkout");
  }
  db_close();
  unlink_local_database();
}
Changes to src/db.c.
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047

/*
** COMMAND: new
**
** Usage: %fossil new ?OPTIONS? FILENAME
**
** Create a repository for a new project in the file named FILENAME.
** This command is distinct from "clone".  The "clone" command makes
** a copy of an existing project.  This command starts a new project.
**
** By default, your current login name is used to create the default
** admin user. This can be overridden using the -A|--admin-user
** parameter.
**
** Options:







|







1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047

/*
** COMMAND: new
**
** Usage: %fossil new ?OPTIONS? FILENAME
**
** Create a repository for a new project in the file named FILENAME.
** This command is distinct from "clone".  The "<a>clone</a>" command makes
** a copy of an existing project.  This command starts a new project.
**
** By default, your current login name is used to create the default
** admin user. This can be overridden using the -A|--admin-user
** parameter.
**
** Options:
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
**
** Open a connection to the local repository in FILENAME.  A checkout
** for the repository is created with its root at the working directory.
** If VERSION is specified then that version is checked out.  Otherwise
** the latest version is checked out.  No files other than "manifest"
** and "manifest.uuid" are modified if the --keep option is present.
**
** See also the "close" command.
*/
void cmd_open(void){
  Blob path;
  int vid;
  int keepFlag;
  static char *azNewArgv[] = { 0, "checkout", "--prompt", "--latest", 0, 0 };
  url_proxy_options();







|







1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
**
** Open a connection to the local repository in FILENAME.  A checkout
** for the repository is created with its root at the working directory.
** If VERSION is specified then that version is checked out.  Otherwise
** the latest version is checked out.  No files other than "manifest"
** and "manifest.uuid" are modified if the --keep option is present.
**
** See also the "<a>close</a>" command.
*/
void cmd_open(void){
  Blob path;
  int vid;
  int keepFlag;
  static char *azNewArgv[] = { 0, "checkout", "--prompt", "--latest", 0, 0 };
  url_proxy_options();
Changes to src/diffcmd.c.
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
** If the "--to VERSION" option appears, it specifies the check-in from
** which the second version of the file or files is taken.  If there is
** no "--to" option then the (possibly edited) files in the current 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 "setting" 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 */







|







362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
** If the "--to VERSION" option appears, it specifies the check-in from
** which the second version of the file or files is taken.  If there is
** no "--to" option then the (possibly edited) files in the current 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 */
Changes to src/main.c.
582
583
584
585
586
587
588




589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615



616
617
618
619
620
621


622






623





























624
625
626
627
628
629
630
631
632



633
634
635
636
637
638
639
640
    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{
      putchar(*z);
      z++;
    }
  }
  putchar('\n');
}

/*
** WEBPAGE: help
** URL: /help?cmd=CMD
*/
void help_page(void){
    const char * zCmd = P("cmd");
    
    style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:"");
    if( zCmd ){
      int rc, idx;
      char *z, *s, *d;

      @ <h1>%s(zCmd)</h1>
      rc = name_search(zCmd, aCommand, count(aCommand), &idx);
      if( rc==1 ){
        @ unknown command: %s(zCmd)
      }else if( rc==2 ){
        @ ambiguous command prefix: %s(zCmd)
      }else{



        z = (char*)aCmdHelp[idx];
        if( z==0 ){
          @ no help available for the %s(aCommand[idx].zName) command
        }else{
          z=s=d=mprintf("%s",z);
	  while( *s ){


	    if( *s=='%' && strncmp(s, "%fossil", 7)==0 ){






	      s++;





























	    }else{
	      *d++ = *s++;
	    }
	  }
	  *d = 0;
	  @ <pre>%s(z)</pre>
	  free(z);
	}
      }



      @ <hr/><a href="help">available commands</a> in fossil
      @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
    }else{
      int i;
      
      @ <h1>Available commands</h1>
      for(i=0; i<count(aCommand); i++){
        if( strncmp(aCommand[i].zName,"test",4)==0 ) continue;







>
>
>
>


















<








>
>
>
|
|


<
|
>
>
|
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|


|
|
|


>
>
>
|







582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610

611
612
613
614
615
616
617
618
619
620
621
622
623
624
625

626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
    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 ){
      z += 3;
    }else if( *z=='<' && strncmp(z,"</a>",4)==0 ){
      z += 4;
    }else{
      putchar(*z);
      z++;
    }
  }
  putchar('\n');
}

/*
** WEBPAGE: help
** URL: /help?cmd=CMD
*/
void help_page(void){
    const char * zCmd = P("cmd");
    
    style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:"");
    if( zCmd ){
      int rc, idx;


      @ <h1>%s(zCmd)</h1>
      rc = name_search(zCmd, aCommand, count(aCommand), &idx);
      if( rc==1 ){
        @ unknown command: %s(zCmd)
      }else if( rc==2 ){
        @ ambiguous command prefix: %s(zCmd)
      }else{
        char *zSrc, *zDest;
        int src,dest,len;
	
        zSrc = (char*)aCmdHelp[idx];
        if( zSrc==0 || *zSrc==0 ){
          @ no help available for the %s(aCommand[idx].zName) command
        }else{

	  len = strlen(zSrc);
          zDest = malloc(len+1);
	  for(src=dest=0;zSrc[src];){
	    if( zSrc[src]=='%' && strncmp(zSrc+src, "%fossil", 7)==0 ){
	      src++; /* skip % for fossil argv[0] expansion */
	    }else if( zSrc[src]=='<' && strncmp(zSrc+src, "<a>", 3)==0 ){
	      /* found an internal command cross reference,
	      ** create an additional link
	      */
	      int start;

              len+=80;
	      zDest=realloc(zDest,len);
	      zDest[dest++]=zSrc[src++]; /* < */
              zDest[dest++]=zSrc[src++]; /* a */
              zDest[dest++]=' ';
              zDest[dest++]='h';
              zDest[dest++]='r';
              zDest[dest++]='e';
              zDest[dest++]='f';
              zDest[dest++]='=';
              zDest[dest++]='"';
              zDest[dest++]='h';
              zDest[dest++]='e';
              zDest[dest++]='l';
              zDest[dest++]='p';
              zDest[dest++]='?';
              zDest[dest++]='c';
              zDest[dest++]='m';
              zDest[dest++]='d';
              zDest[dest++]='=';
	      start = src+1;
	      for( src=start; zSrc[src] && zSrc[src]!='<'; ){
		zDest[dest++]=zSrc[src++]; /* command name */
	      }
              zDest[dest++]='"';
              zDest[dest++]='>';
	      for( src=start; zSrc[src] && zSrc[src]!='<'; ){
		zDest[dest++]=zSrc[src++]; /* command name */
	      }
	    }else{
	      zDest[dest++] = zSrc[src++];
	    }
	  }
	  zDest[dest] = 0;
	  @ <pre>%s(zDest)</pre>
	  free(zDest);
	}
      }
      @ <hr>additional information may be found in the web documentation:
      @ <a href="doc/tip/www/cmd_%s(aCommand[idx].zName).wiki">
      @ cmd_%s(aCommand[idx].zName)</a>, see also the list of
      @ <a href="help">available commands</a> in fossil
      @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
    }else{
      int i;
      
      @ <h1>Available commands</h1>
      for(i=0; i<count(aCommand); i++){
        if( strncmp(aCommand[i].zName,"test",4)==0 ) continue;
Changes to src/sync.c.
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
** Usage: %fossil pull ?URL? ?options?
**
** Pull changes from a remote repository into the local repository.
** Use the "-R REPO" or "--repository REPO" command-line options
** to specify an alternative repository file.
**
** If the URL is not specified, then the URL from the most recent
** clone, push, pull, remote-url, or sync command is used.
**
** The URL specified normally becomes the new "remote-url" used for
** subsequent push, pull, and sync operations.  However, the "--once"
** command-line option makes the URL a one-time-use URL that is not
** saved.
**
** See also: clone, push, sync, remote-url
*/
void pull_cmd(void){
  int syncFlags = process_sync_args();
  client_sync(0,1,0,syncFlags,0);
}

/*
** COMMAND: push
**
** Usage: %fossil push ?URL? ?options?
**
** Push changes in the local repository over into a remote repository.
** Use the "-R REPO" or "--repository REPO" command-line options
** to specify an alternative repository file.
**
** If the URL is not specified, then the URL from the most recent
** clone, push, pull, remote-url, or sync command is used.
**
** The URL specified normally becomes the new "remote-url" used for
** subsequent push, pull, and sync operations.  However, the "--once"
** command-line option makes the URL a one-time-use URL that is not
** saved.
**
** See also: clone, pull, sync, remote-url
*/
void push_cmd(void){
  process_sync_args();
  client_sync(1,0,0,0,0);
}


/*
** COMMAND: sync
**
** Usage: %fossil sync ?URL? ?options?
**
** Synchronize the local repository with a remote repository.  This is
** the equivalent of running both "push" and "pull" at the same time.
** Use the "-R REPO" or "--repository REPO" command-line options
** to specify an alternative repository file.
**
** If a user-id and password are required, specify them as follows:
**
**     http://userid:password@www.domain.com:1234/path
**
** If the URL is not specified, then the URL from the most recent successful
** clone, push, pull, remote-url, or sync command is used.
**
** The URL specified normally becomes the new "remote-url" used for
** subsequent push, pull, and sync operations.  However, the "--once"
** command-line option makes the URL a one-time-use URL that is not
** saved.
**
** See also:  clone, push, pull, remote-url
*/
void sync_cmd(void){
  int syncFlags = process_sync_args();
  client_sync(1,1,0,syncFlags,0);
}

/*
** COMMAND: remote-url
**
** Usage: %fossil remote-url ?URL|off?
**
** Query and/or change the default server URL used by the "pull", "push",
** and "sync" commands.
**
** The remote-url is set automatically by a "clone" command or by any
** "sync", "push", or "pull" command that specifies an explicit URL.
** The default remote-url is used by auto-syncing and by "sync", "push",
** "pull" that omit the server URL.
**
** See also: clone, push, pull, sync
*/
void remote_url_cmd(void){
  char *zUrl;
  db_find_and_open_repository(1);
  if( g.argc!=2 && g.argc!=3 ){
    usage("remote-url ?URL|off?");
  }







|






|
















|


|



|













|








|


|



|











|
|

|
|
|
|

|







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
** Usage: %fossil pull ?URL? ?options?
**
** Pull changes from a remote repository into the local repository.
** Use the "-R REPO" or "--repository REPO" command-line options
** to specify an alternative repository file.
**
** If the URL is not specified, then the URL from the most recent
** <a>clone</a>, <a>push</a>, pull, <a>remote-url</a>, or <a>sync</a> command is used.
**
** The URL specified normally becomes the new "remote-url" used for
** subsequent push, pull, and sync operations.  However, the "--once"
** command-line option makes the URL a one-time-use URL that is not
** saved.
**
** See also: <a>clone</a>, <a>push</a>, <A>sync</a>, <a>remote-url</a>
*/
void pull_cmd(void){
  int syncFlags = process_sync_args();
  client_sync(0,1,0,syncFlags,0);
}

/*
** COMMAND: push
**
** Usage: %fossil push ?URL? ?options?
**
** Push changes in the local repository over into a remote repository.
** Use the "-R REPO" or "--repository REPO" command-line options
** to specify an alternative repository file.
**
** If the URL is not specified, then the URL from the most recent
** <a>clone</a>, push, <a>pull</a>, <a>remote-url</a>, or <a>sync</a> command is used.
**
** The URL specified normally becomes the new "remote-url" used for
** subsequent <a>push</a>, <a>pull</a>, and <a>sync</a> operations.  However, the "--once"
** command-line option makes the URL a one-time-use URL that is not
** saved.
**
** See also: <a>clone</a>, <a>pull</a>, <a>sync</a>, <a>remote-url</a>
*/
void push_cmd(void){
  process_sync_args();
  client_sync(1,0,0,0,0);
}


/*
** COMMAND: sync
**
** Usage: %fossil sync ?URL? ?options?
**
** Synchronize the local repository with a remote repository.  This is
** the equivalent of running both "<a>push</a>" and "<a>pull</a>" at the same time.
** Use the "-R REPO" or "--repository REPO" command-line options
** to specify an alternative repository file.
**
** If a user-id and password are required, specify them as follows:
**
**     http://userid:password@www.domain.com:1234/path
**
** If the URL is not specified, then the URL from the most recent successful
** <a>clone</a>, <a>push</a>, <a>pull</a>, <a>remote-url</a>, or sync command is used.
**
** The URL specified normally becomes the new "remote-url" used for
** subsequent <a>push</a>, <a>pull</a>, and <a>sync</a> operations.  However, the "--once"
** command-line option makes the URL a one-time-use URL that is not
** saved.
**
** See also:  <a>clone</a>, <a>push</a>, <a>pull</a>, <a>remote-url</a>
*/
void sync_cmd(void){
  int syncFlags = process_sync_args();
  client_sync(1,1,0,syncFlags,0);
}

/*
** COMMAND: remote-url
**
** Usage: %fossil remote-url ?URL|off?
**
** Query and/or change the default server URL used by the "<a>pull</a>", "<a>push</a>",
** and "<a>sync</a>" commands.
**
** The remote-url is set automatically by a "<a>clone</a>" command or by any
** "<a>sync</a>", "<a>push</a>", or "<a>pull</a>" command that specifies an explicit URL.
** The default remote-url is used by auto-syncing and by "<a>sync</a>", "<a>push</a>",
** "<a>pull</a>" that omit the server URL.
**
** See also: <a>clone</a>, <a>push</a>, <a>pull</a>, <a>sync</a>
*/
void remote_url_cmd(void){
  char *zUrl;
  db_find_and_open_repository(1);
  if( g.argc!=2 && g.argc!=3 ){
    usage("remote-url ?URL|off?");
  }
Changes to src/tag.c.
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
** not use this option to make changes unless you are sure what
** you are doing.
**
** If you need to use a tagname that might be confused with
** a hexadecimal baseline or artifact ID, you can explicitly
** disambiguate it by prefixing it with "tag:". For instance:
**
**   fossil update decaf
**
** will be taken as an artifact or baseline ID and fossil will
** probably complain that no such revision was found. However
**
**   fossil update tag:decaf
**
** will assume that "decaf" is a tag/branch name.
**
** only allow --date-override and --user-override in 
**   %fossil tag add --date-override 'YYYY-MMM-DD HH:MM:SS' \\
**                   --user-override user 
** in order to import history from other scm systems







|




|







343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
** not use this option to make changes unless you are sure what
** you are doing.
**
** If you need to use a tagname that might be confused with
** a hexadecimal baseline or artifact ID, you can explicitly
** disambiguate it by prefixing it with "tag:". For instance:
**
**   fossil <a>update</a> decaf
**
** will be taken as an artifact or baseline ID and fossil will
** probably complain that no such revision was found. However
**
**   fossil <a>update</a> tag:decaf
**
** will assume that "decaf" is a tag/branch name.
**
** only allow --date-override and --user-override in 
**   %fossil tag add --date-override 'YYYY-MMM-DD HH:MM:SS' \\
**                   --user-override user 
** in order to import history from other scm systems
Changes to src/undo.c.
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
}

/*
** COMMAND: undo
**
** Usage: %fossil undo ?FILENAME...?
**
** Undo the most recent update or merge or revert operation.  If FILENAME is
** specified then restore the content of the named file(s) but otherwise
** leave the update or merge or revert in effect.
**
** A single level of undo/redo is supported.  The undo/redo stack
** is cleared by the commit and checkout commands.
*/
void undo_cmd(void){
  int undo_available;
  db_must_be_within_tree();
  db_begin_transaction();
  undo_available = db_lget_int("undo_available", 0);







|

|

|







242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
}

/*
** COMMAND: undo
**
** Usage: %fossil undo ?FILENAME...?
**
** Undo the most recent <a>update</a> or <a>merge</a> or <a>revert</a> operation.  If FILENAME is
** specified then restore the content of the named file(s) but otherwise
** leave the <a>update</a> or <a>merge</a> or <a>revert</a> in effect.
**
** A single level of undo/<a>redo</a> is supported.  The undo/<a>redo</a> stack
** is cleared by the commit and checkout commands.
*/
void undo_cmd(void){
  int undo_available;
  db_must_be_within_tree();
  db_begin_transaction();
  undo_available = db_lget_int("undo_available", 0);
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
}

/*
** COMMAND: redo
**
** Usage: %fossil redo ?FILENAME...?
**
** Redo an update or merge or revert operation that has been undone
** by the undo command.  If FILENAME is specified then restore the changes
** associated with the named file(s) but otherwise leave the update
** or merge undone.
**
** A single level of undo/redo is supported.  The undo/redo stack
** is cleared by the commit and checkout commands.
*/
void redo_cmd(void){
  int undo_available;
  db_must_be_within_tree();
  db_begin_transaction();
  undo_available = db_lget_int("undo_available", 0);
  if( g.argc==2 ){







|
|



|
|







281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
}

/*
** COMMAND: redo
**
** Usage: %fossil redo ?FILENAME...?
**
** Redo an <a>update</a>, <a>merge</a> or <a>revert</a> operation that has been undone
** by the <a>undo</a> command.  If FILENAME is specified then restore the changes
** associated with the named file(s) but otherwise leave the update
** or merge undone.
**
** A single level of <a>undo</a>/redo is supported.  The <a>undo</a>/redo stack
** is cleared by the <a>commit</a> and <a>checkout</a> commands.
*/
void redo_cmd(void){
  int undo_available;
  db_must_be_within_tree();
  db_begin_transaction();
  undo_available = db_lget_int("undo_available", 0);
  if( g.argc==2 ){
Changes to src/update.c.
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
** Revert to the current repository version of FILE, or to
** the version associated with baseline REVISION if the -r flag
** appears.
**
** Revert all files if no file name is provided.
**
** If a file is reverted accidently, it can be restored using
** the "fossil undo" command.
*/
void revert_cmd(void){
  const char *zFile;
  const char *zRevision;
  Blob record;
  int i;
  int errCode;







|







346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
** Revert to the current repository version of FILE, or to
** the version associated with baseline REVISION if the -r flag
** appears.
**
** Revert all files if no file name is provided.
**
** If a file is reverted accidently, it can be restored using
** the "<a>undo</a>" command.
*/
void revert_cmd(void){
  const char *zFile;
  const char *zRevision;
  Blob record;
  int i;
  int errCode;