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

Re: git-p4.skipSubmitEdit

From
MHMichael Horowitz <michael.horowitz@ieee.org>
Date
Dec 17, 2011, 00:49 UTC
Message-ID
<CAFLRboqJAC0h27m=B9Tw5SFcupEgn4fe9YvWksgqxOVs20nFHw@mail.gmail.com>
In-Reply-To
<CAFLRbor3Gnqhudmg8G_U37Nbo7ENoCEy0iFVGRP4i_AmatJHxw@mail.gmail.com>

Oh, and in the case where you do edit the template, it doesn't give you an error or anything, it looks like it succeeded, but you'll notice the change never got submitted to Perforce. If you look carefully though, you can see it reverting each of your edited files in the P4 tree.

Mike

On Fri, Dec 16, 2011 at 7:46 PM, Michael Horowitz <michael.horowitz@ieee.org> wrote:

Show 50 quoted lines
> Actually, it is the opposite.  Bailout works fine, it is when I ":wq"
> in Vi for example, that it fails to submit and reverts all my changes.
>
>        if os.stat(template_file).st_mtime <= mtime:
>            while True:
>                response = raw_input("Submit template unchanged.
> Submit anyway? [y]es, [n]o (skip this patch) ")
>                if response == 'y':
>                    return True
>                if response == 'n':
>                    return False
>        # I think this else needs to be added here, so when the file
> has been modified since it was opened in the editor, it will properly
> submit the change.
>        else:
>            return True
>
>
> Mike
>
>
>
> On Fri, Dec 16, 2011 at 2:50 PM, Luke Diamand <luke@diamand.org> wrote:
>>
>> On 16/12/11 15:38, Michael Horowitz wrote:
>>>
>>> All,
>>>
>>> It appears that this change has introduced a bug that causes submit to
>>> fail every time if you do not skip the submit edit.
>>>
>>>  From what I can tell, this is because the new edit_template method
>>> does not return True at the end.
>>
>>
>> Could you say exactly what you're doing?
>>
>> I've just tried it myself and it seems to work fine:
>>
>> git-p4 clone
>> git commit -m 'a change'
>> git-p4 submit
>> <quit from editor, with/without modifying it>
>>
>> And I couldn't see any paths in edit_template that returned without a value of True, except the one where the user decides to bail out.
>>
>> This is with Pete's skipSubmitEdit change.
>>
>> Thanks!
>> Luke
Previous: Michael HorowitzNext: Pete Wyckoff
Message 16 of 17 in “git-p4.skipSubmitEdit”
  1. L. A. Linden LevySep 8, 2011
  2. Vitor AntunesSep 9, 2011
  3. Luke DiamandSep 9, 2011
  4. L. A. Linden LevySep 9, 2011
  5. Luke DiamandSep 10, 2011
  6. Luke DiamandSep 12, 2011
  7. L. A. Linden LevySep 12, 2011
  8. Pete WyckoffOct 18, 2011
  9. L. A. Linden LevyOct 18, 2011
  10. Pete WyckoffOct 18, 2011
  11. Luke DiamandOct 18, 2011
  12. Pete WyckoffOct 20, 2011
  13. Michael HorowitzDec 16, 2011
  14. Luke DiamandDec 16, 2011
  15. Michael HorowitzDec 17, 2011
  16. Michael HorowitzDec 17, 2011
  17. git-p4: fix skipSubmitEdit regressionPete Wyckoff, Dec 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.