summaryrefslogtreecommitdiff
path: root/lorry.zip-importer
Commit message (Collapse)AuthorAgeFilesLines
* Make flake8 happyBen Brown2022-02-051-13/+13
|
* Commit changes from from black and isortBen Brown2022-02-051-32/+46
|
* lorry.zip-importer: Delete unused import of time moduleBen Hutchings2020-08-101-1/+0
| | | | | The time module is unused since "lorry.zip-importer: Interpret zip file timestamps as UTC".
* Move references to original git scripts from LICENSE to derived scriptsBen Hutchings2020-07-151-1/+1
| | | | | This seems like a more obvious to look for such information, and it's also where the GPL says we should mention changes.
* Add proper copyright notices for lorry.{tar,zip}-importerBen Hutchings2020-07-151-0/+3
| | | | | | These are based on scripts in the git project, which we noted but didn't include a copyright statement for. Put copyright notices (including for our changes) in those files and in LICENSE.
* lorry.zip-importer: Use Unix-format mtimes if availableBen Hutchings2020-07-151-6/+44
| | | | | | The Zip file format is extensible, and there are several extensions to file metadata that provide a Unix-format mtime. These allow us to avoid the local time ambiguity altogether.
* lorry.zip-importer: Interpret zip file timestamps as UTCBen Hutchings2020-07-101-1/+4
| | | | | | | | Zip file timestamps are in local time, but the time zone offset is unspecified. We choose to interpret them as UTC so that zip imports will be reproducible. Closes #1.
* lorry.zip-importer: Fix time comparisons for Python 3Ben Hutchings2020-05-291-1/+1
| | | | | | | | | | | lorry.zip-importer sets commit_time to the latest timestamp found in the zip file. It initialises it to 0 and then compares with each timestamp, which is a tuple. In Python 3, there is no ordering between int and tuple values, so this raises an exception. Change the initial value to be a tuple so that the comparisons work. This also allows importing empty zip files, though that doesn't seem particularly useful.
* lorry.{g,}zip-importer: Read and write in binary modeBen Hutchings2020-05-291-10/+12
| | | | | | | | | | | | gzip and zip files are not in text format, and the file contents that we send to git may not be either. So: * Open gzip files in binary mode. * Open the pipe to 'git fast-import' in binary mode. This requires using subprocess.Popen instead of os.popen. * Change printlines functions to encode text in UTF-8. * Use printlines functions in the remaining places where we need to write text.
* lorry,{g,}zip-importer: Move top-level code into functionsBen Hutchings2020-05-291-11/+19
| | | | | | | Split the top-level code of each script into: * export: Exports a single file to a 'git fast-import' pipe * main: Spawns 'git fast-import' and calls export for each file
* lorry.{g,}zip-importer: Only import modules and classes into module scopeBen Hutchings2020-05-291-13/+14
| | | | | | | | Currently these scripts import a bunch of functions into module scope, which is a bit confusing. Change them to access functions through their enclosing module names. In lorry.gzip-importer, hexversion and stderr weren't used at all.
* lorry.zip-importer: Delete version check for Python 1.6Ben Hutchings2020-05-291-6/+1
| | | | I think Python 1 is well and truly dead now.
* lorry.{g,}zip-importer: Fix remaining Python 3 syntax errorsBen Hutchings2020-05-291-1/+1
| | | | | These scripts were still using print as a statement. Found by pyflakes.
* Migrate to Python 3Pedro Alvarez2019-11-271-1/+1
|
* Don't include extension in tag if presentRichard Ipsum2015-07-151-1/+4
| | | | | | For example, we'd rather the tag be docbook-xml-4.5 than docbook-xml-4.5.zip Change-Id: I617b1c577ff95e4231681c75d3a91f4826cafd2b
* Tweaks to Lorry Zip importerSam Thursfield2015-07-141-3/+4
| | | | | | | | | Include only the basename of the file, to make the commit message (and thus commit SHA1s) deterministic. Mention Lorry in the committer name and email address. Change-Id: Id9d29bbe9f12514213b4b4eafd35b08b017e4246
* Add zip support to lorryRichard Ipsum2015-07-071-1/+4
| | | | Change-Id: I29368ddcc64c82bafcbb834c81db30018a144f64
* Add zip importerRichard Ipsum2015-07-071-0/+78
Add zip archive frontend for git-fast-import from https://raw.githubusercontent.com/git/git/master/contrib/fast-import/import-zips.py Change-Id: I7cbd63bda5a1c36df68bef6448acbc55d95672b4