Fossil SCM
Fix over-length source code lines and memory leaks in the 'clean' command.
Commit
98e694422a79a541999722c039d06df082421686
Parent
e0773f3d8396b4e…
1 file changed
+7
-3
+7
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2,11 +2,11 @@ | ||
| 2 | 2 | ** Copyright (c) 2007 D. Richard Hipp |
| 3 | 3 | ** |
| 4 | 4 | ** This program is free software; you can redistribute it and/or |
| 5 | 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | - | |
| 7 | +** | |
| 8 | 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | 9 | ** but without any warranty; without even the implied warranty of |
| 10 | 10 | ** merchantability or fitness for a particular purpose. |
| 11 | 11 | ** |
| 12 | 12 | ** Author contact information: |
| @@ -62,11 +62,12 @@ | ||
| 62 | 62 | zName, filename_collation() |
| 63 | 63 | ); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | db_prepare(&q, |
| 67 | - "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0), islink" | |
| 67 | + "SELECT pathname, deleted, chnged," | |
| 68 | + " rid, coalesce(origname!=pathname,0), islink" | |
| 68 | 69 | " FROM vfile " |
| 69 | 70 | " WHERE is_selected(id) %s" |
| 70 | 71 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | 72 | " ORDER BY 1 /*scan*/", |
| 72 | 73 | blob_sql_text(&where) |
| @@ -435,11 +436,12 @@ | ||
| 435 | 436 | " ORDER BY %s", |
| 436 | 437 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 437 | 438 | ); |
| 438 | 439 | }else{ |
| 439 | 440 | db_prepare(&q, |
| 440 | - "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0), islink" | |
| 441 | + "SELECT pathname, deleted, rid, chnged," | |
| 442 | + " coalesce(origname!=pathname,0), islink" | |
| 441 | 443 | " FROM vfile %s" |
| 442 | 444 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 443 | 445 | ); |
| 444 | 446 | } |
| 445 | 447 | blob_reset(&where); |
| @@ -796,10 +798,11 @@ | ||
| 796 | 798 | " command because %s.\n\n" |
| 797 | 799 | "Remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 798 | 800 | undo_save_message(undoRc), zName+nRoot); |
| 799 | 801 | prompt_user(prompt, &ans); |
| 800 | 802 | cReply = blob_str(&ans)[0]; |
| 803 | + fossil_free(prompt); | |
| 801 | 804 | blob_reset(&ans); |
| 802 | 805 | }else{ |
| 803 | 806 | cReply = 'N'; |
| 804 | 807 | } |
| 805 | 808 | if( cReply=='a' || cReply=='A' ){ |
| @@ -849,10 +852,11 @@ | ||
| 849 | 852 | Blob ans; |
| 850 | 853 | char *prompt = mprintf("Remove empty directory \"%s\" (a=all/y/N)? ", |
| 851 | 854 | zName+nRoot); |
| 852 | 855 | prompt_user(prompt, &ans); |
| 853 | 856 | cReply = blob_str(&ans)[0]; |
| 857 | + fossil_free(prompt); | |
| 854 | 858 | blob_reset(&ans); |
| 855 | 859 | }else{ |
| 856 | 860 | cReply = 'N'; |
| 857 | 861 | } |
| 858 | 862 | if( cReply=='a' || cReply=='A' ){ |
| 859 | 863 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2007 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Author contact information: |
| @@ -62,11 +62,12 @@ | |
| 62 | zName, filename_collation() |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | db_prepare(&q, |
| 67 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0), islink" |
| 68 | " FROM vfile " |
| 69 | " WHERE is_selected(id) %s" |
| 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | " ORDER BY 1 /*scan*/", |
| 72 | blob_sql_text(&where) |
| @@ -435,11 +436,12 @@ | |
| 435 | " ORDER BY %s", |
| 436 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 437 | ); |
| 438 | }else{ |
| 439 | db_prepare(&q, |
| 440 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0), islink" |
| 441 | " FROM vfile %s" |
| 442 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 443 | ); |
| 444 | } |
| 445 | blob_reset(&where); |
| @@ -796,10 +798,11 @@ | |
| 796 | " command because %s.\n\n" |
| 797 | "Remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 798 | undo_save_message(undoRc), zName+nRoot); |
| 799 | prompt_user(prompt, &ans); |
| 800 | cReply = blob_str(&ans)[0]; |
| 801 | blob_reset(&ans); |
| 802 | }else{ |
| 803 | cReply = 'N'; |
| 804 | } |
| 805 | if( cReply=='a' || cReply=='A' ){ |
| @@ -849,10 +852,11 @@ | |
| 849 | Blob ans; |
| 850 | char *prompt = mprintf("Remove empty directory \"%s\" (a=all/y/N)? ", |
| 851 | zName+nRoot); |
| 852 | prompt_user(prompt, &ans); |
| 853 | cReply = blob_str(&ans)[0]; |
| 854 | blob_reset(&ans); |
| 855 | }else{ |
| 856 | cReply = 'N'; |
| 857 | } |
| 858 | if( cReply=='a' || cReply=='A' ){ |
| 859 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2007 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | ** |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Author contact information: |
| @@ -62,11 +62,12 @@ | |
| 62 | zName, filename_collation() |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | db_prepare(&q, |
| 67 | "SELECT pathname, deleted, chnged," |
| 68 | " rid, coalesce(origname!=pathname,0), islink" |
| 69 | " FROM vfile " |
| 70 | " WHERE is_selected(id) %s" |
| 71 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 72 | " ORDER BY 1 /*scan*/", |
| 73 | blob_sql_text(&where) |
| @@ -435,11 +436,12 @@ | |
| 436 | " ORDER BY %s", |
| 437 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 438 | ); |
| 439 | }else{ |
| 440 | db_prepare(&q, |
| 441 | "SELECT pathname, deleted, rid, chnged," |
| 442 | " coalesce(origname!=pathname,0), islink" |
| 443 | " FROM vfile %s" |
| 444 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 445 | ); |
| 446 | } |
| 447 | blob_reset(&where); |
| @@ -796,10 +798,11 @@ | |
| 798 | " command because %s.\n\n" |
| 799 | "Remove unmanaged file \"%s\" (a=all/y/N)? ", |
| 800 | undo_save_message(undoRc), zName+nRoot); |
| 801 | prompt_user(prompt, &ans); |
| 802 | cReply = blob_str(&ans)[0]; |
| 803 | fossil_free(prompt); |
| 804 | blob_reset(&ans); |
| 805 | }else{ |
| 806 | cReply = 'N'; |
| 807 | } |
| 808 | if( cReply=='a' || cReply=='A' ){ |
| @@ -849,10 +852,11 @@ | |
| 852 | Blob ans; |
| 853 | char *prompt = mprintf("Remove empty directory \"%s\" (a=all/y/N)? ", |
| 854 | zName+nRoot); |
| 855 | prompt_user(prompt, &ans); |
| 856 | cReply = blob_str(&ans)[0]; |
| 857 | fossil_free(prompt); |
| 858 | blob_reset(&ans); |
| 859 | }else{ |
| 860 | cReply = 'N'; |
| 861 | } |
| 862 | if( cReply=='a' || cReply=='A' ){ |
| 863 |