git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Git-p4: git-p4.changeOnSubmit to do 'change' instead of 'submit'.

From
AWAndrei Warkentin <awarkentin@vmware.com>
Date
Oct 14, 2011, 22:55 UTC
Message-ID
<811639890.180572.1318632957147.JavaMail.root@zimbra-prod-mbox-2.vmware.com>
In-Reply-To
<CA+DMoH-HqA0DCyUSttO-iYO0rUHq1nLqM9W0imAOjHC5H1r_9w@mail.gmail.com>
Hi Tor,
Thanks for the review!
----- Original Message -----
> Just out of curiosity... what is 'sd'?
> 
SourceDepot, a p4 fork that is used elsewhere, not by me though ;).
Show 11 quoted lines
> > This new config option lets a 'p4 change -i' run instead of
> > the 'p4 submit -i'.
> 
> Well... I have to say that I'm not crazy about this patch... I don't
> think it is very elegant to have a config flag that says that "when
> the user says 'git p4 submit', then don't submit, but do something
> else instead".
> 
> I would much rather have made a patch to introduce some new command
> like 'git p4 change'.
> 
Agreed, 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, {} ]
}
A
Previous: Tor Arvid LundNext: Luke Diamand
Message 3 of 8 in “Git-p4: git-p4.changeOnSubmit to do 'change' instead of 'submit'.”
  1. Git-p4: git-p4.changeOnSubmit to do 'change' instead of 'submit'.Andrei Warkentin, Oct 14, 2011
  2. Tor Arvid LundOct 14, 2011
  3. Andrei WarkentinOct 14, 2011
  4. Luke DiamandOct 15, 2011
  5. Andrei WarkentinOct 17, 2011
  6. Luke DiamandOct 17, 2011
  7. Pete WyckoffOct 17, 2011
  8. Andrei WarkentinOct 17, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.