Thread (14 messages) flat view 14 messages, 5 authors, 2016-06-15

Re: Asking again... [Re: how to properly import perforce history?]

From: Simon Hausmann <hidden>
Date: 2016-06-15 22:43:15

On Monday 11 June 2007 22:12:32 Alex Riesen wrote:
[...]
quoted
quoted
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help