From: Luke Diamand <luke@diamand.org>
To: Andrei Warkentin <awarkentin@vmware.com>
Cc: git@vger.kernel.org, gitster@pobox.com,
Pete Wyckoff <pw@padd.com>, Andrei Warkentin <andreiw@vmware.com>
Subject: Re: [PATCH] Git-p4: git-p4.changeOnSubmit to do 'change' instead of 'submit'.
Date: Mon, 17 Oct 2011 19:53:18 +0100 [thread overview]
Message-ID: <4E9C799E.70700@diamand.org> (raw)
In-Reply-To: <83923897.7841.1318868319131.JavaMail.root@zimbra-prod-mbox-2.vmware.com>
On 17/10/11 17:18, Andrei Warkentin wrote:
> Hi,
>
> ----- Original Message -----
> Anyway, the other suggestion I had was to create a new command
> instead of overriding behaviour of an existing one. Of course,
> copy-pasting P4Submit into P4Change is silly, so...
>
> How about something like this?
>
> The commands dict maps command name to class and optional dict passed to cmd.run(). That way 'change'
> can really mean P4Submit with an extra parameter not to submit but to do a changelist instead. The
> reason why I initially made the config flag was because I didn't want to copy-paste P4Submit into P4Change.
>
> commands = {
> "debug" : [ P4Debug, {} ]
> "submit" : [ P4Submit, { "doChange" : 0 } ]
> "commit" : [ P4Submit, { "doChange" : 0 } ]
> "change" : [ P4Submit, { "doChange" : 1 } ]
> "sync" : [ P4Sync, {} ],
> "rebase" : [ P4Rebase, {} ],
> "clone" : [ P4Clone, {} ],
> "rollback" : [ P4RollBack, {} ],
> "branches" : [ P4Branches, {} ]
> }
>
> Thanks for the review,
> A
>
Sounds plausible to me. The alternative would be a command line
parameter, although that could get annoying and error prone, especially
as you can't easily unsubmit a perforce change.
next prev parent reply other threads:[~2011-10-17 18:53 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
2011-10-17 16:18 ` Andrei Warkentin
2011-10-17 18:53 ` Luke Diamand [this message]
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=4E9C799E.70700@diamand.org \
--to=luke@diamand.org \
--cc=andreiw@vmware.com \
--cc=awarkentin@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.