From: Luke Diamand <luke@diamand.org>
To: Andrei Warkentin <andreiw@vmware.com>
Cc: git@vger.kernel.org, gitster@pobox.com, Pete Wyckoff <pw@padd.com>
Subject: Re: [PATCH] Git-p4: git-p4.changeOnSubmit to do 'change' instead of 'submit'.
Date: Sat, 15 Oct 2011 21:10:58 +0100 [thread overview]
Message-ID: <4E99E8D2.6020107@diamand.org> (raw)
In-Reply-To: <1318629110-15232-1-git-send-email-andreiw@vmware.com>
On 14/10/11 22:51, Andrei Warkentin wrote:
> Many users of p4/sd use changelists for review, regression
> tests and batch builds, thus changes are almost never directly
> submitted.
>
> This new config option lets a 'p4 change -i' run instead of
> the 'p4 submit -i'.
>
> Signed-off-by: Andrei Warkentin<andreiw@vmware.com>
> ---
> contrib/fast-import/git-p4 | 16 ++++++++++++----
> contrib/fast-import/git-p4.txt | 10 ++++++++++
> 2 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
> index 2f7b270..19c295b 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -959,7 +959,10 @@ class P4Submit(Command, P4UserMap):
> submitTemplate = message[:message.index(separatorLine)]
> if self.isWindows:
> submitTemplate = submitTemplate.replace("\r\n", "\n")
> - p4_write_pipe("submit -i", submitTemplate)
> + if gitConfig("git-p4.changeOnSubmit"):
> + p4_write_pipe("change -i", submitTemplate)
> + else:
> + p4_write_pipe("subadasdmit -i", submitTemplate)
What does "p4 subadasmit" do? That's a new command to me!
(This patch also fails to apply cleanly to my shell-metacharacter patch).
>
> if self.preserveUser:
> if p4User:
> @@ -981,9 +984,14 @@ class P4Submit(Command, P4UserMap):
> file = open(fileName, "w+")
> file.write(self.prepareLogMessage(template, logMessage))
> file.close()
> - print ("Perforce submit template written as %s. "
> - + "Please review/edit and then use p4 submit -i< %s to submit directly!"
> - % (fileName, fileName))
> + if gitConfig("git-p4.changeOnSubmit"):
> + print ("Perforce submit template written as %s. "
> + + "Please review/edit and then use p4 change -i< %s to create changelist!"
> + % (fileName, fileName))
> + else:
> + print ("Perforce submit template written as %s. "
> + + "Please review/edit and then use p4 submit -i< %s to submit directly!"
> + % (fileName, fileName))
>
> def run(self, args):
> if len(args) == 0:
> diff --git a/contrib/fast-import/git-p4.txt b/contrib/fast-import/git-p4.txt
> index 52003ae..3a3a815 100644
> --- a/contrib/fast-import/git-p4.txt
> +++ b/contrib/fast-import/git-p4.txt
> @@ -180,6 +180,16 @@ git-p4.allowSubmit
>
> git config [--global] git-p4.allowSubmit false
>
> +git-p4.changeOnSubmit
> +
> + git config [--global] git-p4.changeOnSubmit false
> +
> +Most places using p4/sourcedepot don't actually want you submit
Small typo: should be "want you *to* submit"
> +changes directly, and changelists are used to do regression testing,
> +batch builds and review, hence, by setting this parameter to
> +true you acknowledge you end up creating a changelist which you
> +must then manually commit.
> +
> git-p4.syncFromOrigin
>
> A useful setup may be that you have a periodically updated git repository
Regards!
Luke
next prev parent reply other threads:[~2011-10-15 20:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 21:51 [PATCH] Git-p4: git-p4.changeOnSubmit to do 'change' instead of 'submit' Andrei Warkentin
2011-10-14 22:31 ` Tor Arvid Lund
2011-10-14 22:55 ` Andrei Warkentin
2011-10-15 20:10 ` Luke Diamand [this message]
2011-10-17 16:18 ` Andrei Warkentin
2011-10-17 18:53 ` Luke Diamand
2011-10-17 22:32 ` Pete Wyckoff
2011-10-17 22:37 ` Andrei Warkentin
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=4E99E8D2.6020107@diamand.org \
--to=luke@diamand.org \
--cc=andreiw@vmware.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pw@padd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.