Fossil SCM

Fix over-length source code lines and memory leaks in the 'clean' command.

mistachkin 2015-11-04 23:41 branch-1.34
Commit 98e694422a79a541999722c039d06df082421686
1 file changed +7 -3
+7 -3
--- src/checkin.c
+++ src/checkin.c
@@ -2,11 +2,11 @@
22
** Copyright (c) 2007 D. Richard Hipp
33
**
44
** This program is free software; you can redistribute it and/or
55
** modify it under the terms of the Simplified BSD License (also
66
** known as the "2-Clause License" or "FreeBSD License".)
7
-
7
+**
88
** This program is distributed in the hope that it will be useful,
99
** but without any warranty; without even the implied warranty of
1010
** merchantability or fitness for a particular purpose.
1111
**
1212
** Author contact information:
@@ -62,11 +62,12 @@
6262
zName, filename_collation()
6363
);
6464
}
6565
6666
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"
6869
" FROM vfile "
6970
" WHERE is_selected(id) %s"
7071
" AND (chnged OR deleted OR rid=0 OR pathname!=origname)"
7172
" ORDER BY 1 /*scan*/",
7273
blob_sql_text(&where)
@@ -435,11 +436,12 @@
435436
" ORDER BY %s",
436437
vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/
437438
);
438439
}else{
439440
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"
441443
" FROM vfile %s"
442444
" ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/
443445
);
444446
}
445447
blob_reset(&where);
@@ -796,10 +798,11 @@
796798
" command because %s.\n\n"
797799
"Remove unmanaged file \"%s\" (a=all/y/N)? ",
798800
undo_save_message(undoRc), zName+nRoot);
799801
prompt_user(prompt, &ans);
800802
cReply = blob_str(&ans)[0];
803
+ fossil_free(prompt);
801804
blob_reset(&ans);
802805
}else{
803806
cReply = 'N';
804807
}
805808
if( cReply=='a' || cReply=='A' ){
@@ -849,10 +852,11 @@
849852
Blob ans;
850853
char *prompt = mprintf("Remove empty directory \"%s\" (a=all/y/N)? ",
851854
zName+nRoot);
852855
prompt_user(prompt, &ans);
853856
cReply = blob_str(&ans)[0];
857
+ fossil_free(prompt);
854858
blob_reset(&ans);
855859
}else{
856860
cReply = 'N';
857861
}
858862
if( cReply=='a' || cReply=='A' ){
859863
--- 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

Keyboard Shortcuts

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