Fossil

Check-in [824083c3]
Login

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

Overview
Comment:The "fossil open" and "fossil co" commands always prompt before overwriting unless the --force option appears. Ticket [b519c1a375c106].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 824083c36a1052b1cd59e3d456eed452a3bda6e2
User & Date: drh 2011-04-15 12:22:21.394
Context
2011-04-15
15:36
Use a target= field on the hyperlink of the annotation web page. ... (check-in: 0e477a48 user: drh tags: trunk)
12:22
The "fossil open" and "fossil co" commands always prompt before overwriting unless the --force option appears. Ticket [b519c1a375c106]. ... (check-in: 824083c3 user: drh tags: trunk)
11:57
Merge the refactored "add", "del", and "addremove" commands into trunk. ... (check-in: 8ae91736 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/checkout.c.
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
  Blob cksum1, cksum1b, cksum2;
  
  db_must_be_within_tree();
  db_begin_transaction();
  forceFlag = find_option("force","f",0)!=0;
  keepFlag = find_option("keep",0,0)!=0;
  latestFlag = find_option("latest",0,0)!=0;
  promptFlag = find_option("prompt",0,0)!=0;  /* Prompt user before overwrite */
  if( (latestFlag!=0 && g.argc!=2) || (latestFlag==0 && g.argc!=3) ){
     usage("VERSION|--latest ?--force? ?--keep?");
  }
  if( !forceFlag && unsaved_changes()==1 ){
    fossil_fatal("there are unsaved changes in the current checkout");
  }
  if( forceFlag ){







|







198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
  Blob cksum1, cksum1b, cksum2;
  
  db_must_be_within_tree();
  db_begin_transaction();
  forceFlag = find_option("force","f",0)!=0;
  keepFlag = find_option("keep",0,0)!=0;
  latestFlag = find_option("latest",0,0)!=0;
  promptFlag = find_option("prompt",0,0)!=0 || forceFlag==0;
  if( (latestFlag!=0 && g.argc!=2) || (latestFlag==0 && g.argc!=3) ){
     usage("VERSION|--latest ?--force? ?--keep?");
  }
  if( !forceFlag && unsaved_changes()==1 ){
    fossil_fatal("there are unsaved changes in the current checkout");
  }
  if( forceFlag ){