git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Simon Hausmann <simon@lst.de>
Date
Jun 11, 2007, 21:46 UTC
Message-ID
<200706112346.13628.simon@lst.de>
In-Reply-To
<20070611201232.GA4649@steel.home>

On Monday 11 June 2007 22:12:32 Alex Riesen wrote: [...]

Show 16 quoted lines
> > > 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!

Show 5 quoted lines
> 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
Previous: Scott LambNext: Han-Wen Nienhuys
Message 10 of 16 in “how to properly import perforce history...”
  1. Kevin GreenJun 8, 2007
  2. Asking again... [Re: how to properly import perforce history?]Kevin Green, Jun 11, 2007
  3. Simon HausmannJun 11, 2007
  4. Alex RiesenJun 11, 2007
  5. Simon HausmannJun 11, 2007
  6. Alex RiesenJun 11, 2007
  7. Scott LambJun 11, 2007
  8. Alex RiesenJun 11, 2007
  9. Scott LambJun 11, 2007
  10. Simon HausmannJun 11, 2007
  11. Han-Wen NienhuysJun 12, 2007
  12. Alex RiesenJun 12, 2007
  13. Kevin GreenJun 11, 2007
  14. Alex RiesenJun 11, 2007
  15. git-p4: check for existence of repo dir before trying to create [Was: Asking again... [Re: how to properly import perforce history?]]Kevin Green, Jun 11, 2007
  16. Simon HausmannJun 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.