Replace numeric fd with its human-readable constant
windows: Use a temporary file instead of UDP.

Using a local UDP socket on Windows does not block if the buffer is full, so we can lose dependency data. Using a temporary file seems to be the easiest solution since we can lock the file in case a process spawns a sub-process and both attempt to access files.
Fix error messages in watch_path().

This used to be monitor-specific code, but now it is shared by the scanner.
db: Display which SQL statement caused an error.

Just getting an "SQL reset error" is pretty useless unless you know where it came from.
display: Use job times in the percentage complete.

The percent complete metric was based only on the number of jobs. So if there are 2 jobs to do, one that takes 1s and one that takes 9s, after the first job completes tup would report 50% complete. However if we have the previous runtimes, it makes sense to instead report 10% complete. If we don't have the previous runtimes, it defaults to the job count as before.
bench.sh requires bash
Make sure all of 'tup node' is in a transaction.

This is only used for the benchmark scripts.
Use prog.exe for benchmark scripts.
Squashed commit of the following:

commit 58b394468581ae3fe71920f1732e1590487864c5
Author: Doug Rosvick <dlr365@gmail.com>
Date:   Thu Feb 2 00:23:36 2012 -0700

    fixed bin name bug by copying the bin name to a new string
    (cherry picked from commit 3da82f05d3aaf9ba03d094b3826e0c6832959f3b)

commit e1ed841ab0cb0fa93c668495baa947b90c3b2222
Author: Doug Rosvick <dlr365@gmail.com>
Date:   Thu Feb 2 09:47:48 2012 -0700

    added t2100 - check that bin names aren't clobbered coming out of runscripts
    (cherry picked from commit 728031c0c2445469545eb2594c236b78f55373ac)
Add TUP_SUDO_SUID.

If set to y, this builds the tup executable with the suid bit set so that it can run sub-processes in chroot.
display: Adjust job time before showing result.

For cases where the %-complete is shown at each result line, we need to have the job time updated before showing the result since the job we are showing is already completed. Otherwise if there is only one job, it will show 0% complete when it is finished instead of 100%.
windows: Use CreateFile instead of fopen for deps file.

It seems that the standard file buffering is getting in the way of atomically writing dependencies within the lock. FlushFileBuffers() would seem to be the answer, but that causes random other files (like 'touch foo' saying that 'foo' can't be found, when it is being used to *create* foo in the first place). The CreateFile API can allow us to specify append access, which isn't very well documented but seems to allow atomic writes to the end of the file.
Fixed warning on my ancient RHEL5 workstation

* tested on RHEL5 [glibc 2.6, gcc 4.1.2]
* re-tested on Ubuntu [glibc 2.13 & 4.6.1]
* everything seems to work inside a dynamic ClearCase view too!
updater: Initialize ms field to remove a warning.

This is an innocuous warning present on centos5.6.
tests: Check for python 2.6

We use the python -B flag to avoid writing to tup-client.pyc, but this flag was introduced in python-2.6
tests: Remove temporary python version check file.
Remove obsolete tupid_tree_for_each() macro.
Added t6062 - check for command strings of different types.

On Windows, trying to run "sh -c 'blah'" will try to open "blah", and "blah.exe" as files, causing ghosts to be created. If the 'sh -c' wrapper is removed, tup will find the existing 'blah' string in the database and use it as a command. However, it's type is a ghost. At some point commands will need to be separated from files/ghosts/directories/etc, but right now they are intermingled. Better to report an error when trying to insert it than to incorrectly add a ghost as a command and cause all sorts of trouble.
Print out the values of environment variable changes.

It is hard to go back after the fact and figure out why an environment variable had changed, since the old value is destroyed once the new one is imported. By displaying the old/new values, the user can compare and have some idea of what actually changed.
Added t2101 - run-script with missing newline.

Tup should report this as an error (or successfully parse the rules), and not crash.