git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pete Wyckoff <pw@padd.com>
To: Alexander Tomlinson <alex@aivor.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: is git-p4 compatible with p4/linux?
Date: Fri, 19 Apr 2013 07:55:13 -0400	[thread overview]
Message-ID: <20130419115513.GA7966@padd.com> (raw)
In-Reply-To: <14D98038-C656-47B9-ABF2-CC12914F0C75@aivor.com>

alex@aivor.com wrote on Thu, 18 Apr 2013 20:34 -0500:
> 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
    @

> 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

  reply	other threads:[~2013-04-19 11:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  4:31 is git-p4 compatible with p4/linux? Alexander Tomlinson
2013-04-17  4:37 ` Alexander Tomlinson
2013-04-19  0:09 ` Pete Wyckoff
2013-04-19  1:34   ` Alexander Tomlinson
2013-04-19 11:55     ` Pete Wyckoff [this message]
2013-04-19 15:20       ` Alex Tomlinson
2013-04-20 10:50   ` David Aguilar
2013-04-20 13:22     ` Pete Wyckoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130419115513.GA7966@padd.com \
    --to=pw@padd.com \
    --cc=alex@aivor.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).