git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Laurent Charrière" <lcharriere@promptu.com>
To: git@vger.kernel.org
Subject: git-p4 useclientspec broken?
Date: Mon, 13 Feb 2012 16:47:00 -0800	[thread overview]
Message-ID: <4F39AF04.5080607@promptu.com> (raw)

Since I've upgraded to 1.7.9 (on OS X Lion, FWIW), git-p4 submit fails 
to apply any patches if I use useclientspec=true when cloning.

My p4 client is as follows:

Client:	malibu
(...)
Root:	/Users/lcharriere/Documents/Perforce/all
(...)
View:
	//sandbox/... //malibu/sandbox/...
	//depot/... //malibu/depot/...

Sequence of steps to reproduce:

$ git p4 clone //sandbox/lcharriere/foo --use-client-spec
$ cd foo && find .
./.git
(...)
./sandbox/lcharriere/foo/.gitignore
./sandbox/lcharriere/foo/foo.py

-- This is new behavior to me, BTW. Previously, I would have seen
./.git
(...)
./.gitignore
./foo.py

$ cat "test" >> sandbox/lcharriere/foo/.gitignore
$ git commit -a -m "test"
git commit -a -m "test"
[master 7398144] test
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git p4 submit
Perforce checkout for depot path //sandbox/lcharriere/foo/ located at 
/Users/lcharriere/Documents/Perforce/all/sandbox/lcharriere/foo/
Synchronizing p4 checkout...
... - file(s) up-to-date.
Applying 739814457a8faa84dc0bddd830f671569576b177 test

sandbox/lcharriere/foo/.gitignore - file(s) not on client.
error: sandbox/lcharriere/foo/.gitignore: No such file or directory
Unfortunately applying the change failed!
What do you want to do?
[s]kip this patch / [a]pply the patch forcibly and with .rej files / 
[w]rite the patch to a file (patch.txt)


I tried to follow what's going on with pdb:
* self.depotPath is //sandbox/lcharriere/foo, so git-p4 chdir's to 
/Users/lcharriere/Documents/Perforce/all/sandbox/lcharriere/foo/
* In P4Submit.applyCommit, line 926 is:
p4_edit(path)
At this point path is 'sandbox/lcharriere/foo/.gitignore'

I'm guessing this is why the p4 executable doesn't find it. The path 
should be .gitignore. Is it possible that the new behavior I mentioned 
above of reproducing the depot hierarchy when useclientspec is true is 
having unintended side effects, or is a bug?

             reply	other threads:[~2012-02-14  1:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14  0:47 Laurent Charrière [this message]
2012-02-14 12:36 ` git-p4 useclientspec broken? Pete Wyckoff
2012-02-14 23:25   ` Laurent Charrière

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=4F39AF04.5080607@promptu.com \
    --to=lcharriere@promptu.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).