[p4] Slowdown and unquoted wildcard paths

Shawn Hladky p4shawn at gmail.com
Tue Jun 6 07:28:19 PDT 2006


On 6/6/06, Javier Arevalo <jare at pyrostudios.com> wrote:Shawn Hladky wrote:
> Hm... I don't believe that the windows command interpreter expands
> wildcards. To my knowledge, neither command.com nor CMD.exe have ever
> done anything like that.

You're right about the windows command shell.  I've been fooled by a number
of utilities that all seem to work that way.  With a little research, I
found that you can use a link
option<http://msdn2.microsoft.com/en-US/library/8bch7bkk.aspx>on an
exe to emulate this behavior (with VC++
cl.exe).  From the Jamrules file in the P4API, it appears that p4.exe is
linked with this option, which explains its behavior at the command-line.

You should definitely be wary of the commands p4v shows you it's executing.
And not just b/c wildcard and space issues work differently.  P4V is doing a
lot to maintain it's state as a full-fledged GUI, and not only executing the
commands you think it should be.  I'm also suspicious that p4v is not
showing every command it executes.

As a really bad example of drawing too much from the command output, I found
a developer running a script that literally walked the tree to get a
recursive file listing (p4 dirs + p4 fstat on every folder).  He figured out
how to do it purely by watching the commands in P4Win as he expanded the
tree.

On 6/6/06, Javier Arevalo <jare at pyrostudios.com> wrote:
>
> Shawn Hladky wrote:
> > I would be surprised if this problem were related to wildcard
> > expansion.  At the command line, it's the windows command shell that's
> > trying to expand the wildcard before passing on to the p4.exe...
>
> Hm... I don't believe that the windows command interpreter expands
> wildcards. To my knowledge, neither command.com nor CMD.exe have ever
> done anything like that.
>
> On the other hand, it's obvious that the P4V log is not a direct
> reflection of what's happening under the hood, since it includes the
> "p4" command (which wouldn't be part of API calls), and doesn't show
> quotes in filenames that contain spaces.
>
> Ah well it was a nice try. These periodic slowdowns are starting to
> annoy many people, and they turn to me in anger. ;)
>
> --
> Javier Arévalo
> Pyro Studios
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>


More information about the perforce-user mailing list