Fossil

Check-in [1f4e6cf1]
Login

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

Overview
Comment:"rm" subcmd to stash, "drop"-alike functionality
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | stash_rm
Files: files | file ages | folders
SHA1:1f4e6cf1ae1ab742172d9981a8e8579e5711377a
User & Date: bch 2011-08-24 20:05:44
Context
2011-08-24
21:45
Fix code stylistic issues with the "stash rm" patch. Also document the new stash verb. Closed-Leaf check-in: d2c4a242 user: drh tags: stash_rm
20:05
"rm" subcmd to stash, "drop"-alike functionality check-in: 1f4e6cf1 user: bch tags: stash_rm
2011-08-23
18:00
go back to the old numbering on the pre-checkin checklist (ok'd drh). check-in: a87717ad user: martin.weber tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/stash.c.

273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
...
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
    }
    blob_reset(&delta);
 }
  db_finalize(&q);
}

/*
** Drop the indicates stash
*/
static void stash_drop(int stashid){
  db_multi_exec(
    "DELETE FROM stash WHERE stashid=%d;"
    "DELETE FROM stashfile WHERE stashid=%d;",
    stashid, stashid
  );
................................................................................
        fossil_print("       ");
        comment_print(zCom, 7, 79);
      }
    }
    db_finalize(&q);
    if( n==0 ) fossil_print("empty stash\n");
  }else
  if( memcmp(zCmd, "drop", nCmd)==0 ){
    int allFlag = find_option("all", 0, 0)!=0;
    if( g.argc>4 ) usage("stash apply STASHID");
    if( allFlag ){
      db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;");
    }else{
      stashid = stash_get_id(g.argc==4 ? g.argv[3] : 0);
      undo_begin();







|







 







|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
...
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
    }
    blob_reset(&delta);
 }
  db_finalize(&q);
}

/*
** Drop the indicated stash
*/
static void stash_drop(int stashid){
  db_multi_exec(
    "DELETE FROM stash WHERE stashid=%d;"
    "DELETE FROM stashfile WHERE stashid=%d;",
    stashid, stashid
  );
................................................................................
        fossil_print("       ");
        comment_print(zCom, 7, 79);
      }
    }
    db_finalize(&q);
    if( n==0 ) fossil_print("empty stash\n");
  }else
    if(( memcmp(zCmd, "drop", nCmd)==0 )||( memcmp(zCmd, "rm", nCmd)==0 )){
    int allFlag = find_option("all", 0, 0)!=0;
    if( g.argc>4 ) usage("stash apply STASHID");
    if( allFlag ){
      db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;");
    }else{
      stashid = stash_get_id(g.argc==4 ? g.argv[3] : 0);
      undo_begin();