I've got a daily scheduled .bat
batch script that runs Fossil, and automatically commits that day's changes to my projects' source tree. Now I've set it to run every day, including the weekends, since I also want it to pick up changes that I do when working on weekends.
Usually, though, I won't be working on weekends, and so it doesn't need to commit anything for that day (since there are effectively no changes).
Now fossil has the changes
command, which can tell me beforehand what changes there are. Unfortunately, it doesn't appear to set the errorlevel. It just doesn't print anything to the output stream (or perhaps a single CRLF) if there is no change.
My question: is there a way to detect the presence of output from a batch file, so I can still use the changes
command to detect whether to perform a commit or not?