Fossil SCM

minor pedantic cleanup to my last commit. it was just bugging me.

stephan 2014-02-27 19:38 trunk
Commit 59e26ebe94845245056ed07a50e338ed0fb1ce94
1 file changed +3 -3
+3 -3
--- src/browse.c
+++ src/browse.c
@@ -732,21 +732,22 @@
732732
733733
/*
734734
** Look at all file containing in the version "vid". Construct a
735735
** temporary table named "fileage" that contains the file-id for each
736736
** files, the pathname, the check-in where the file was added, and the
737
-** mtime on that checkin. If zGlob is not NULL then only files
738
-** matching the given glob are computed.
737
+** mtime on that checkin. If zGlob and *zGlob then only files matching
738
+** the given glob are computed.
739739
*/
740740
int compute_fileage(int vid, char const * zGlob){
741741
Manifest *pManifest;
742742
ManifestFile *pFile;
743743
int nFile = 0;
744744
double vmtime;
745745
Stmt ins;
746746
Stmt q1, q2, q3;
747747
Stmt upd;
748
+ if(zGlob && !*zGlob) zGlob = NULL;
748749
db_multi_exec(
749750
/*"DROP TABLE IF EXISTS temp.fileage;"*/
750751
"CREATE TEMP TABLE fileage("
751752
" fid INTEGER,"
752753
" mid INTEGER,"
@@ -832,11 +833,10 @@
832833
fossil_fatal("not a valid check-in: %s", zName);
833834
}
834835
style_submenu_element("Tree-View", "Tree-View", "%R/tree?ci=%T", zName);
835836
style_header("File Ages", zName);
836837
zGlob = P("glob");
837
- if(zGlob && !*zGlob) zGlob = NULL;
838838
compute_fileage(rid,zGlob);
839839
baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
840840
zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
841841
@ <h2>File Ages For Check-in
842842
@ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
843843
--- src/browse.c
+++ src/browse.c
@@ -732,21 +732,22 @@
732
733 /*
734 ** Look at all file containing in the version "vid". Construct a
735 ** temporary table named "fileage" that contains the file-id for each
736 ** files, the pathname, the check-in where the file was added, and the
737 ** mtime on that checkin. If zGlob is not NULL then only files
738 ** matching the given glob are computed.
739 */
740 int compute_fileage(int vid, char const * zGlob){
741 Manifest *pManifest;
742 ManifestFile *pFile;
743 int nFile = 0;
744 double vmtime;
745 Stmt ins;
746 Stmt q1, q2, q3;
747 Stmt upd;
 
748 db_multi_exec(
749 /*"DROP TABLE IF EXISTS temp.fileage;"*/
750 "CREATE TEMP TABLE fileage("
751 " fid INTEGER,"
752 " mid INTEGER,"
@@ -832,11 +833,10 @@
832 fossil_fatal("not a valid check-in: %s", zName);
833 }
834 style_submenu_element("Tree-View", "Tree-View", "%R/tree?ci=%T", zName);
835 style_header("File Ages", zName);
836 zGlob = P("glob");
837 if(zGlob && !*zGlob) zGlob = NULL;
838 compute_fileage(rid,zGlob);
839 baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
840 zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
841 @ <h2>File Ages For Check-in
842 @ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
843
--- src/browse.c
+++ src/browse.c
@@ -732,21 +732,22 @@
732
733 /*
734 ** Look at all file containing in the version "vid". Construct a
735 ** temporary table named "fileage" that contains the file-id for each
736 ** files, the pathname, the check-in where the file was added, and the
737 ** mtime on that checkin. If zGlob and *zGlob then only files matching
738 ** the given glob are computed.
739 */
740 int compute_fileage(int vid, char const * zGlob){
741 Manifest *pManifest;
742 ManifestFile *pFile;
743 int nFile = 0;
744 double vmtime;
745 Stmt ins;
746 Stmt q1, q2, q3;
747 Stmt upd;
748 if(zGlob && !*zGlob) zGlob = NULL;
749 db_multi_exec(
750 /*"DROP TABLE IF EXISTS temp.fileage;"*/
751 "CREATE TEMP TABLE fileage("
752 " fid INTEGER,"
753 " mid INTEGER,"
@@ -832,11 +833,10 @@
833 fossil_fatal("not a valid check-in: %s", zName);
834 }
835 style_submenu_element("Tree-View", "Tree-View", "%R/tree?ci=%T", zName);
836 style_header("File Ages", zName);
837 zGlob = P("glob");
 
838 compute_fileage(rid,zGlob);
839 baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
840 zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
841 @ <h2>File Ages For Check-in
842 @ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
843

Keyboard Shortcuts

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