Fossil

Check-in [ab6a2931]
Login

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

Overview
Comment:fix for ticket [8832434e32], wrong args for checkoutable()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fix artifact checkout
Files: files | file ages | folders
SHA1:ab6a293182e1962592fcecb9914c8bcedc889b6c
User & Date: bch 2009-04-19 06:14:53
References
2009-04-19
06:15 Closed ticket [8832434e]: build error with checkoutable() function plus 3 other changes artifact: 395b4c79 user: bch
Context
2009-04-29
03:51
test recycling "is_ticket()" from wikiformat.c as a way to avoid trying to checkout a ticket check-in: 695b1c75 user: bch tags: fix artifact checkout
2009-04-19
06:14
fix for ticket [8832434e32], wrong args for checkoutable() check-in: ab6a2931 user: bch tags: fix artifact checkout
05:48
branch, start committing hacking that will hopefully yield fix to this problem: one is allowed to checkout "artifacts" that should not be checkout-able (ie: changes to tickets); trying to check this out is permitted, but results in a segfault check-in: 4fff3661 user: bch tags: fix artifact checkout
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkout.c.

185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
  db_begin_transaction();
  forceFlag = find_option("force","f",0)!=0;
  noWrite = find_option("dontwrite",0,0)!=0;
  if( g.argc!=3 ) usage("?--force? VERSION");
  if( !forceFlag && unsaved_changes()==1 ){
    fossil_fatal("there are unsaved changes in the current checkout");
  }
  if(!checkoutable()){
    fossil_fatal("the VERSION you requested is not a checkout-able artifact");
  }
  if( forceFlag ){
    db_multi_exec("DELETE FROM vfile");
    prior = 0;
  }else{
    prior = db_lget_int("checkout",0);







|







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
  db_begin_transaction();
  forceFlag = find_option("force","f",0)!=0;
  noWrite = find_option("dontwrite",0,0)!=0;
  if( g.argc!=3 ) usage("?--force? VERSION");
  if( !forceFlag && unsaved_changes()==1 ){
    fossil_fatal("there are unsaved changes in the current checkout");
  }
  if(!checkoutable(g.argv[2])){
    fossil_fatal("the VERSION you requested is not a checkout-able artifact");
  }
  if( forceFlag ){
    db_multi_exec("DELETE FROM vfile");
    prior = 0;
  }else{
    prior = db_lget_int("checkout",0);