Fossil SCM

Merge the "stash rm" command into trunk.

drh 2011-08-26 14:10 trunk merge
Commit 0b4f83067aba90ec8a3a3340304b51a7cd570fae
1 file changed +3 -2
+3 -2
--- src/stash.c
+++ src/stash.c
@@ -275,11 +275,11 @@
275275
}
276276
db_finalize(&q);
277277
}
278278
279279
/*
280
-** Drop the indicates stash
280
+** Drop the indicated stash
281281
*/
282282
static void stash_drop(int stashid){
283283
db_multi_exec(
284284
"DELETE FROM stash WHERE stashid=%d;"
285285
"DELETE FROM stashfile WHERE stashid=%d;",
@@ -345,10 +345,11 @@
345345
** Update to the baseline checkout for STASHID then apply the
346346
** changes of STASHID. Keep STASHID so that it can be reused
347347
** This command is undoable.
348348
**
349349
** fossil stash drop ?STASHID? ?--all?
350
+** fossil stash rm ?STASHID? ?--all?
350351
**
351352
** Forget everything about STASHID. Forget the whole stash if the
352353
** --all flag is used. Individual drops are undoable but --all is not.
353354
**
354355
** fossil stash snapshot ?-m COMMENT? ?FILES...?
@@ -428,11 +429,11 @@
428429
}
429430
}
430431
db_finalize(&q);
431432
if( n==0 ) fossil_print("empty stash\n");
432433
}else
433
- if( memcmp(zCmd, "drop", nCmd)==0 ){
434
+ if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){
434435
int allFlag = find_option("all", 0, 0)!=0;
435436
if( g.argc>4 ) usage("stash apply STASHID");
436437
if( allFlag ){
437438
db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;");
438439
}else{
439440
--- src/stash.c
+++ src/stash.c
@@ -275,11 +275,11 @@
275 }
276 db_finalize(&q);
277 }
278
279 /*
280 ** Drop the indicates stash
281 */
282 static void stash_drop(int stashid){
283 db_multi_exec(
284 "DELETE FROM stash WHERE stashid=%d;"
285 "DELETE FROM stashfile WHERE stashid=%d;",
@@ -345,10 +345,11 @@
345 ** Update to the baseline checkout for STASHID then apply the
346 ** changes of STASHID. Keep STASHID so that it can be reused
347 ** This command is undoable.
348 **
349 ** fossil stash drop ?STASHID? ?--all?
 
350 **
351 ** Forget everything about STASHID. Forget the whole stash if the
352 ** --all flag is used. Individual drops are undoable but --all is not.
353 **
354 ** fossil stash snapshot ?-m COMMENT? ?FILES...?
@@ -428,11 +429,11 @@
428 }
429 }
430 db_finalize(&q);
431 if( n==0 ) fossil_print("empty stash\n");
432 }else
433 if( memcmp(zCmd, "drop", nCmd)==0 ){
434 int allFlag = find_option("all", 0, 0)!=0;
435 if( g.argc>4 ) usage("stash apply STASHID");
436 if( allFlag ){
437 db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;");
438 }else{
439
--- src/stash.c
+++ src/stash.c
@@ -275,11 +275,11 @@
275 }
276 db_finalize(&q);
277 }
278
279 /*
280 ** Drop the indicated stash
281 */
282 static void stash_drop(int stashid){
283 db_multi_exec(
284 "DELETE FROM stash WHERE stashid=%d;"
285 "DELETE FROM stashfile WHERE stashid=%d;",
@@ -345,10 +345,11 @@
345 ** Update to the baseline checkout for STASHID then apply the
346 ** changes of STASHID. Keep STASHID so that it can be reused
347 ** This command is undoable.
348 **
349 ** fossil stash drop ?STASHID? ?--all?
350 ** fossil stash rm ?STASHID? ?--all?
351 **
352 ** Forget everything about STASHID. Forget the whole stash if the
353 ** --all flag is used. Individual drops are undoable but --all is not.
354 **
355 ** fossil stash snapshot ?-m COMMENT? ?FILES...?
@@ -428,11 +429,11 @@
429 }
430 }
431 db_finalize(&q);
432 if( n==0 ) fossil_print("empty stash\n");
433 }else
434 if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){
435 int allFlag = find_option("all", 0, 0)!=0;
436 if( g.argc>4 ) usage("stash apply STASHID");
437 if( allFlag ){
438 db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;");
439 }else{
440

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button