How to make it so "tf resolve" only displays the dialog if there are conflicts?

One of the changes we've made to the resolve dialog is that it comes up immediately when requested.  We don't query the server before bringing up that dialog.  This has the nice effect that you get the dialog up immediately and get good feedback of what's going on (we're querying the server for conflicts).  One of the negative side effects is that we bring up the dialog before we know whether there are actually any conflicts to resolve.  In beta2, for instance, if you ran "tf resolve" and had no conflicts to resolve, you just got a message stating so and the command exited.  In current bits you get the resolve dialog popping up regardless and tf.exe doesn't return for the no-conflicts case.

While it's less efficient, if you want the old behavior of "no UI if no conflicts to resolve", you can call resolve once with /noprompt (or its alias /i) and then use that exit code to determine whether to run resolve "really".

One such script may look like this:

tf get /noprompt
tf resolve /i /auto:overwritelocal *.dll /recursive
tf resolve /i /auto:acceptmerge
tf resolve /i || tf resolve