Fossil

Check-in [d2c4a242]
Login

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

Overview
Comment:Fix code stylistic issues with the "stash rm" patch. Also document the new stash verb.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | stash_rm
Files: files | file ages | folders
SHA1: d2c4a24275e6aac557208242d229272f4e52ab3d
User & Date: drh 2011-08-24 21:45:19
Context
2011-08-26
14:10
Merge the "stash rm" command into trunk. check-in: 0b4f8306 user: drh tags: trunk
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
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/stash.c.

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
**  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 )||( 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();







>







 







|







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
**  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();