Changes On Branch stash_rm
Not logged in

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

Changes In Branch stash_rm Excluding Merge-Ins

This is equivalent to a diff from a87717ad86 to d2c4a24275

2011-08-26
14:10
Merge the "stash rm" command into trunk. check-in: 0b4f83067a user: drh tags: trunk
14:09
Merge the autosetup updates into trunk. check-in: 64a2b0d51f user: drh tags: trunk
2011-08-24
22:13
Update to the latest autosetup, mainly for better temp file handling on mingw/msys, and fixes for the sun studio compiler. Leaf check-in: 4e5dd3536e user: steveb tags: autosetup
21:45
Fix code stylistic issues with the "stash rm" patch. Also document the new stash verb. Leaf check-in: d2c4a24275 user: drh tags: stash_rm
20:05
"rm" subcmd to stash, "drop"-alike functionality check-in: 1f4e6cf1ae 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: a87717ad86 user: martin.weber tags: trunk
17:57
Change numbering back so that the preliminary step is 0, the most important one is #1. check-in: 90e310ebbd user: martin.weber tags: msw-hack
16:55
Merge the msw-hack branch into trunk. check-in: d41074f862 user: drh tags: trunk

Changes to src/stash.c.

273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
...
343
344
345
346
347
348
349

350
351
352
353
354
355
356
...
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 stash goto ?STASHID?
**
**     Update to the baseline checkout for STASHID then apply the
**     changes of STASHID.  Keep STASHID so that it can be reused
**     This command is undoable.
**
**  fossil stash drop ?STASHID? ?--all?

**
**     Forget everything about STASHID.  Forget the whole stash if the
**     --all flag is used.  Individual drops are undoable but --all is not.
**
**  fossil stash snapshot ?-m COMMENT? ?FILES...?
**
**     Save the current changes in the working tress as a new stash
................................................................................
        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
...
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
...
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
    }
    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 stash goto ?STASHID?
**
**     Update to the baseline checkout for STASHID then apply the
**     changes of STASHID.  Keep STASHID so that it can be reused
**     This command is undoable.
**
**  fossil stash drop ?STASHID? ?--all?
**  fossil stash rm   ?STASHID? ?--all?
**
**     Forget everything about STASHID.  Forget the whole stash if the
**     --all flag is used.  Individual drops are undoable but --all is not.
**
**  fossil stash snapshot ?-m COMMENT? ?FILES...?
**
**     Save the current changes in the working tress as a new stash
................................................................................
        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();