View Ticket
Not logged in
Ticket UUID: 538d51575deedc883c37b8f373cf4ddc368f8893
Title: Recursive rm doesn't work
Status: Open Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution:
Last Modified: 2010-08-11 01:03:39
Version Found In: 1d713f3f4d
Description & Comments:
Deletes done on a subdirectory don't make it into the commit set.
mike /Users/mike/temp/11/db-4.2.52 $ fossil status
repository:   /Users/mike/temp/11/x
local-root:   /Users/mike/temp/11/
server-code:  91fc8a118b8bdbc657cde65291f00826ada2e4d2
checkout:     398f524c8fdc5ee7ddcb5667f714fc773431dc0e 2010-08-11 00:24:39 UTC
parent:       e8e391df27dc580a3cdcfe43823d709258053400 2010-08-11 00:19:33 UTC
tags:         trunk
mike /Users/mike/temp/11/db-4.2.52 $ fossil rm xa
DELETED  xa/tags
DELETED  xa/xa.c
DELETED  xa/xa_db.c
DELETED  xa/xa_map.c
mike /Users/mike/temp/11/db-4.2.52 $ fossil status
repository:   /Users/mike/temp/11/x
local-root:   /Users/mike/temp/11/
server-code:  91fc8a118b8bdbc657cde65291f00826ada2e4d2
checkout:     398f524c8fdc5ee7ddcb5667f714fc773431dc0e 2010-08-11 00:24:39 UTC
parent:       e8e391df27dc580a3cdcfe43823d709258053400 2010-08-11 00:19:33 UTC
tags:         trunk
mike /Users/mike/temp/11/db-4.2.52 $ fossil commit -m "test"
fossil: nothing has changed
Had I done fossil rm xa/* the delete is added to the commits correctly. Suggested patch:
Index: src/add.c
===================================================================
--- src/add.c
+++ src/add.c
@@ -213,11 +213,11 @@
         if( !db_exists(
             "SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zFilePath)
         ){
           printf("SKIPPED  %s\n", zPath);
         }else{
-          db_multi_exec("UPDATE vfile SET deleted=1 WHERE pathname=%Q", zPath);
+          db_multi_exec("UPDATE vfile SET deleted=1 WHERE pathname=%Q", zFilePath);
           printf("DELETED  %s\n", zPath);
         }
         blob_reset(&pathname);
       }
       blob_resize(&path, origSize);