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

Re: is git-p4 compatible with p4/linux?

From
PWPete Wyckoff <pw@padd.com>
Date
Apr 19, 2013, 11:55 UTC
Message-ID
<20130419115513.GA7966@padd.com>
In-Reply-To
<14D98038-C656-47B9-ABF2-CC12914F0C75@aivor.com>
alex@aivor.com wrote on Thu, 18 Apr 2013 20:34 -0500:
Show 9 quoted lines
> Perhaps it is a configuration item on the server and/or client.   It seems we
> are running the same version of p4.  But just to be sure, check yours against
> mine:
> 
> $ cksum $(which p4)
> 3254530484 2420552 /usr/bin/p4
> 
> If yours if different, can you email a copy of your p4 executable to me
> so I can check if it works differently than mine?
It is the same binary.  Assuming you're running p4d 2013.1 too?
    $ p4 info
    [..]
    Server version: P4D/LINUX26X86_64/2013.1/610569 (2013/03/19)
I'm using these p4 client settings:
    Options:        noallwrite noclobber nocompress unlocked nomodtime normdir
    SubmitOptions:  submitunchanged
    LineEnd:        unix

Running "strace -vf -s 2000 p4 print -q symlink" shows that the newline is embedded in the response from p4d:

    read(7, "...\0\0\0symlink-target\n\0func\0\23...", 4096) = 277

Also the file depot/symlink,v in the p4d depot area includes the \n in the RCS file too, somewhat surprisingly:

    $ cat depot/symlink,v
    head     1.6;
    [..]
    @@
    text
    @symlink-target
    @
Show 32 quoted lines
> I will also check with coworkers here to see how their client behaves.
> > This code only happens on utf16 files.  But running it by hand,
> > I cannot reproduce the different behavior:
> > 
> >    $ p4 print -q //depot/f-ascii
> >    three
> >    line
> >    text
> > 
> >    $ p4 print -o - -q //depot/f-ascii
> >    three
> >    line
> > 
> >    $ ls ./-
> >    ls: cannot access ./-: No such file or directory
> > 
> > I'm again confused.  Any hints you can give would be helpful.
> 
> This "second issue" is a non-issue.  It seems "-o -" does send to
> stdout for files.  For symlinks, it creates a symlink named "-".
> Example:
> 
> $ ls -l pcre
> lrwxrwxrwx 1 atomlinson atomlinson 12 Apr 18 17:17 pcre -> ../libs/pcre/
> $ ls -l ./- ./xxx
> /bin/ls: cannot access ./-: No such file or directory
> /bin/ls: cannot access ./xxx: No such file or directory
> $ p4 print -q -o - pcre
> $ p4 print -q -o xxx pcre
> $ ls -l ./- ./xxx
> lrwxrwxrwx 1 atomlinson atomlinson 12 Apr 18 20:25 ./- -> ../libs/pcre/
> lrwxrwxrwx 1 atomlinson atomlinson 12 Apr 18 20:25 ./xxx -> ../libs/pcre/

Me too. That's annoying behavior, but not used by git-p4 fortunately. The "-o -" option is only used for odd utf16 files where "p4 print" generates invalid output.

		-- Pete
Previous: Alexander TomlinsonNext: Alex Tomlinson
Message 5 of 8 in “is git-p4 compatible with p4/linux?”
  1. Alexander TomlinsonApr 17, 2013
  2. Alexander TomlinsonApr 17, 2013
  3. Pete WyckoffApr 19, 2013
  4. Alexander TomlinsonApr 19, 2013
  5. Pete WyckoffApr 19, 2013
  6. Alex TomlinsonApr 19, 2013
  7. David AguilarApr 20, 2013
  8. Pete WyckoffApr 20, 2013

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.