On Monday 11 June 2007 22:12:32 Alex Riesen wrote: [...] > > > And, BTW, don't you have a small problem with filenames with > > > spaces and quoting? > > > > I'm not aware of any problems. For example in our depot we have filenames > > with spaces in them and they appear just fine in my git import. Did you > > run into any specific case? It could very well be that there's a bug > > somewhere that I'm just not hitting myself, so I'm curious :) > > No, I just looking at the source. Does python have some magic for > running programs with system() when passed a format string? Like here: > > for f in filesToAdd: > system("p4 add %s" % f) > for f in filesToDelete: > system("p4 revert %s" % f) > system("p4 delete %s" % f) Ooops, indeed. Makes me realizes that I've never actually submitted files with spaces in the name :). For now I've quoted them with double quotes like in the other places, which is better than nothing. Thanks for spotting! > BTW, sometimes you quote the names, but obviously wrong (think about > filenames containing double quotes): > > system("p4 edit \"%s\"" % path) > editedFiles.add(path) Indeed, for file names with double quotes that doesn't work. I guess I'll have to change that to subprocess.Popen then :) Simon
Attachment:
signature.asc
Description: This is a digitally signed message part.