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

Re: [PATCH 1/3] git p4: remove unused P4Submit interactive setting

From
PWPete Wyckoff <pw@padd.com>
Date
Jul 14, 2012, 13:53 UTC
Message-ID
<20120714135307.GA27609@padd.com>
In-Reply-To
<20120705123010.GA31388@padd.com>
pw@padd.com wrote on Thu, 05 Jul 2012 08:30 -0400:
Show 38 quoted lines
> luke@diamand.org wrote on Thu, 05 Jul 2012 08:20 +0100:
> > On 04/07/12 14:34, Pete Wyckoff wrote:
> > >The code is unused.  Delete.
> > 
> > I've used that non-interactive code path in the past, in the very
> > early days of using it (setting interactive to false manually).
> > 
> > The nice thing about it is that if you're using git-p4 for the very
> > first time it lets you do the final submission to p4 by hand,
> > without having to trust the script to do the right thing. Once I
> > convinced myself that git-p4 was doing the right thing, I then
> > stopped using it.
> > 
> > Is it worth retaining, perhaps fixed so that it can be set on the
> > command line and documented? Or just discard?
> 
> My biggest complaint is that there's no way to enable the option.
> You have to edit the code to change self.interactive to False, as
> you pointed out.
> 
> Then it doesn't help you with the submit message, and doesn't
> do the little details of cleaning up pure-copied files or
> changing the username for preserveUser.
> 
> What you're doing makes sense, though, but maybe there's a
> cleaner way to provide that functionality.
> 
> We could build the change then say "type p4 submit -c ... if it
> looks good".  Still doesn't handle the little details.
> 
> We could spawn a shell to let them go inspect.
> 
> We could try to implement a "--continue" option, and give them
> a chance to edit.
> 
> I've got an upcoming series that changes the interaction loop on
> conflict, and makes it easier to do some interaction at each
> patch, possibly before applying too.  Might make things easier.
I did code up two new options to "git p4 submit":
    --dry-run : just show the commits that would be submitted
    --prepare-p4-only : open/add, apply patch, but do not submit

The latter prints a rather lengthy message about how to submit or revert the changes. It fills the role of self.interactive, hopefully.

I'll send the patches out for review once the other in-flight changes have settled.

		-- Pete
Previous: Pete WyckoffNext: Pete Wyckoff
Message 6 of 8 in “git p4: notice Jobs: section in submit”
  1. 0/3 git p4: notice Jobs: section in submitPete Wyckoff, Jul 4, 2012
  2. 1/3 git p4: remove unused P4Submit interactive settingPete Wyckoff, Jul 4, 2012
  3. Pete WyckoffJul 4, 2012
  4. Luke DiamandJul 5, 2012
  5. Pete WyckoffJul 5, 2012
  6. Pete WyckoffJul 14, 2012
  7. 2/3 git p4 test: refactor marshal_dumpPete Wyckoff, Jul 4, 2012
  8. 3/3 git p4: notice Jobs lines in git commit messagesPete Wyckoff, Jul 4, 2012

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.