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

Re: [RFC PATCH] git-p4: add option to store files in Git LFS on import

From
John Keeping <john@keeping.me.uk>
Date
Sep 3, 2015, 10:12 UTC
Message-ID
<20150903101239.GP30659@serenity.lan>
In-Reply-To
<1D65DD68-EE3F-4C87-9B5F-E436BA13704E@gmail.com>
On Thu, Sep 03, 2015 at 11:40:20AM +0200, Lars Schneider wrote:
Show 31 quoted lines
> 
> On 30 Aug 2015, at 18:36, Luke Diamand <luke@diamand.org> wrote:
> 
> > On 30 August 2015 at 11:18, Lars Schneider <larsxschneider@gmail.com> wrote:
> >> Thanks for your feedback!
> >> 
> >> I like the “handle big files” plugin kind of idea. However, I
> >> wonder if it makes sense to put more and more stuff into git-p4.py
> >> (>3000 LOC already). What do you think about splitting git-p4 into
> >> multiple files?
> > 
> > I was wondering about that. I think for now, the simplicity of keeping
> > everything in one file is worth the slight extra pain. I don't imagine
> > that the big-file-handler code would be very large.
> OK.
> 
> > 
> >> 
> >> Regarding Python 3:
> >> Would you drop Python 2 support or do you want to support Python
> >> 2/3 in parallel? I would prefer the former…
> > 
> > For quite some time we would need to support both; we can't just have
> > a release of git that one day breaks git-p4 for people stuck on Python
> > 2. But it might not be that hard to support both (though converting
> > all those print statements could be quite tiresome).
> Agreed. However supporting both versions increases code complexity as
> well as testing effort. Would a compromise like the following work? We
> fork “git-p4.py” to “git-p4-python2.py” and just apply important bug
> fixes to that file. All new development happens on a Python 3 only
> git-p4.py. 
Documentation/CodingGuidelines currently says:
 - As a minimum, we aim to be compatible with Python 2.6 and 2.7.
 - Where required libraries do not restrict us to Python 2, we try to
   also be compatible with Python 3.1 and later.

That was added in commit 9ef43dd (CodingGuidelines: add Python coding guidelines, 2013-01-30), which gives the following rationale in the commit message:

 - Advocating Python 3 support in all scripts is currently unrealistic
   because:
     - 'p4 -G' provides output in a format that is very hard to use with
       Python 3 (and its documentation claims Python 3 is unsupported).
Has that changed?

I also found a message describing why the output is hard to use with Python 3:

 	http://permalink.gmane.org/gmane.comp.version-control.git/213316

If that problem can be solved, I don't think it would be difficult to support 2.6+ and 3.x with a single file.

Previous: Luke Diamand
Message 9 of 9 in “git-p4: add option to store files in Git LFS on import”
  1. git-p4: add option to store files in Git LFS on importlarsxschneider@gmail.com, Aug 28, 2015
  2. git-p4: add option to store files in Git LFS on importlarsxschneider@gmail.com, Aug 28, 2015
  3. Luke DiamandAug 30, 2015
  4. Luke DiamandAug 30, 2015
  5. Lars SchneiderAug 30, 2015
  6. Luke DiamandAug 30, 2015
  7. Lars SchneiderSep 3, 2015
  8. Luke DiamandSep 3, 2015
  9. John KeepingSep 3, 2015

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.