From: Thomas Berg <merlin66b@gmail.com>
To: git@vger.kernel.org
Cc: Andrew Waters <apwaters@googlemail.com>
Subject: Re: [PATCH] Fix handling of git-p4 on deleted files
Date: Fri, 22 Oct 2010 12:20:46 +0200 [thread overview]
Message-ID: <AANLkTimHHbg1zVX+1L7Dwgj5VmMFdUZ5X_Vf6UK_26An@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimzN9ZGwQZ-pi6SMWGY9KS0fjmXu=1gjdfck=W-@mail.gmail.com>
Hi,
On Mon, Oct 18, 2010 at 5:39 PM, Andrew Waters <apwaters@googlemail.com> wrote:
> When you submit changes containing deleted file the command 'p4 diff
> -du ...' includes diffs for deleted files. This causes the failure:
>
> open for read: <deleted file>: No such file or directory
> Command failed: p4 diff -du ...
I'm a daily git-p4 user and noticed this problem too: 'git p4 submit'
fails for commits with deleted files, with recent Perforce verions.
The problem has been brought up earlier [1], but no patch has actually
submitted yet.
> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
> index c1ea643..04ce7e3 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -706,7 +706,9 @@ class P4Submit(Command):
> submitTemplate = self.prepareLogMessage(template, logMessage)
> if os.environ.has_key("P4DIFF"):
> del(os.environ["P4DIFF"])
> - diff = p4_read_pipe("diff -du ...")
> + diff = ""
> + for editedFile in editedFiles:
> + diff += p4_read_pipe("diff -du %r" % editedFile)
>
> newdiff = ""
> for newFile in filesToAdd:
> --
I just tested your patch, and it does indeed fix the problem. I think
you need to "sign off" on the patch, other than that I support
applying it.
Regards,
Thomas
[1] http://kerneltrap.org/mailarchive/git/2010/5/28/31299
next prev parent reply other threads:[~2010-10-22 10:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-18 15:39 [PATCH] Fix handling of git-p4 on deleted files Andrew Waters
2010-10-22 10:20 ` Thomas Berg [this message]
2010-10-22 12:26 ` Andrew Waters
2010-10-22 18:52 ` Junio C Hamano
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=AANLkTimHHbg1zVX+1L7Dwgj5VmMFdUZ5X_Vf6UK_26An@mail.gmail.com \
--to=merlin66b@gmail.com \
--cc=apwaters@googlemail.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).