From de4d7e1b1064b180a04b3bb488499469943ef700 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 15 Dec 2016 11:27:49 -0800 Subject: [PATCH] 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 --- .../differential/storage/DifferentialChangeset.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/differential/storage/DifferentialChangeset.php b/src/applications/differential/storage/DifferentialChangeset.php index 57f9d295b6..448cdb6343 100644 --- a/src/applications/differential/storage/DifferentialChangeset.php +++ b/src/applications/differential/storage/DifferentialChangeset.php @@ -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',