sagemath / trac-to-github

Script to migrate Trac tickets to GitHub issues and the Trac wiki to markdown. Input: https://trac.sagemath.org/ ➠ Intermediate: https://github.com/sagemath/trac_to_gh ➠ Output: https://github.com/sagemath/sage/issues
https://trac.sagemath.org/ticket/30363
7 stars 5 forks source link

Handle attachment replacements #131

Closed mkoeppe closed 1 year ago

mkoeppe commented 1 year ago

Currently we only keep the latest version of an attached file.

[14:40:50] INFO     Migrating ticket #34113 ( 19 changes): "Drawing Schlegel diagrams of 4-polytopes using tik"                                                                                                migrate.py:1973
           INFO     Attachment filename='hypercube.png' mimetype='image/png'                                                                                                                                   migrate.py:1646
           INFO     Replaced by filename='hypercube.png.gz' mimetype='application/gzip'                                                                                                                        migrate.py:1661
           INFO     Attachment link https://github.com/sagemath/sage/files/ticket34113/hypercube.png.gz                                                                                                        migrate.py:1684
           INFO     Attachment filename='hypercube.png' mimetype='image/png'                                                                                                                                   migrate.py:1646
           INFO     Replaced by filename='hypercube.png.gz' mimetype='application/gzip'                                                                                                                        migrate.py:1661
           INFO     Attachment link https://github.com/sagemath/sage/files/ticket34113/hypercube.png.gz                                                                                                        migrate.py:1684
           INFO     Attachment filename='hypercube.png' mimetype='image/png'                                                                                                                                   migrate.py:1646
           INFO     Replaced by filename='hypercube.png.gz' mimetype='application/gzip'                                                                                                                        migrate.py:1661
           INFO     Attachment link https://github.com/sagemath/sage/files/ticket34113/hypercube.png.gz                                                                                                        migrate.py:1684
mkoeppe commented 1 year ago

Actually these are just multiple references to the same attachment; the new warning is never issued.