Permalink
Browse files

Allow --max-files 0 to turn off max-files limit.

ALso documented some of the other limit commands better.
  • Loading branch information...
1 parent 0c33734 commit b254384eba8952c6d8969b08e02aefabababe417 @acaudwell committed Nov 20, 2010
Showing with 12 additions and 7 deletions.
  1. +7 −2 README
  2. +3 −3 data/gource.1
  3. +1 −1 src/gource.cpp
  4. +1 −1 src/gource_settings.cpp
View
9 README
@@ -82,7 +82,8 @@ options:
Change simulation time scale.
-i, --file-idle-time SECONDS
- Time in seconds files remain idle before they are removed.
+ Time in seconds files remain idle before they are removed or 0
+ for no limit.
-e, --elasticity FLOAT
Elasticity of nodes.
@@ -171,11 +172,15 @@ options:
Adjust the intensity of the bloom.
--max-files
- Set the maximum number of files. Excess files will be discarded.
+ Set the maximum number of files or 0 for no limit.
+
+ Excess files will be discarded.
--max-file-lag SECONDS
Max time files of a commit can take to appear.
+ Use -1 for no limit.
+
--max-user-speed UNITS
Max speed users can travel per second.
View
@@ -56,7 +56,7 @@ Realtime playback speed.
Change simulation time scale.
.TP
\fB\-i, \-\-file\-idle\-time SECONDS\fR
-Time in seconds files remain idle before they are removed.
+Time in seconds files remain idle before they are removed or 0 for no limit.
.TP
\fB\-e, \-\-elasticity FLOAT\fR
Elasticity of nodes.
@@ -143,10 +143,10 @@ Adjust the amount of bloom.
Adjust the intensity of the bloom.
.TP
\fB\-\-max\-files\fR
-Set the maximum number of files. Excess files will be discarded.
+Set the maximum number of files or 0 for no limit. Excess files will be discarded.
.TP
\fB\-\-max\-file\-lag SECONDS\fR
-Max time files of a commit can take to appear.
+Max time files of a commit can take to appear. Use -1 for no limit.
.TP
\fB\-\-max\-user\-speed UNITS\fR
Max speed users can travel per second.
View
@@ -976,7 +976,7 @@ void Gource::processCommit(RCommit& commit, float t) {
//if we already have max files in circulation
//we cant add any more
- if(files.size() >= gGourceSettings.max_files)
+ if(gGourceSettings.max_files > 0 && files.size() >= gGourceSettings.max_files)
continue;
//check filename against filters
View
@@ -887,7 +887,7 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc
max_files = entry->getInt();
- if(max_files<1) {
+ if(max_files<0 || max_files == 0 && entry->getString() != "0") {
conffile.invalidValueException(entry);
}
}

0 comments on commit b254384

Please sign in to comment.