1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 21:02:41 +01:00

Support arbitrarily long filenames in Differential

Summary:
Fixes T11660. Currently, if you try to diff a path with more than 255 total characters, we fail to create the diff because we have a `text255` column.

There are actually two issues here:

  - File names may be arbitrarily long (T11660).
  - File names may not be UTF8 (T6633, etc). This is much more complicated and has other issues -- largely that we can't JSON-encode non-UTF8 filenames. I'm punting on that for now and will deal with it later. This doesn't specifically address non-UTF8 paths, although it is a change that's (probably?) required to eventually support them.

This will cause some potentially slow migrations, but better to do them now, if possible, so we have fewer complicated/slow upgrades overall.

Test Plan:
Created a change touching file: //very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_directory_name/very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_filename.txt//

{F2137737}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11660

Differential Revision: https://secure.phabricator.com/D17062
This commit is contained in:
epriestley 2016-12-15 11:27:49 -08:00
parent 89d88dafcc
commit de4d7e1b10

View file

@ -30,8 +30,8 @@ final class DifferentialChangeset extends DifferentialDAO
'awayPaths' => self::SERIALIZATION_JSON,
),
self::CONFIG_COLUMN_SCHEMA => array(
'oldFile' => 'text255?',
'filename' => 'text255',
'oldFile' => 'bytes?',
'filename' => 'bytes',
'changeType' => 'uint32',
'fileType' => 'uint32',
'addLines' => 'uint32',