Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18712586
D12994.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D12994.id.diff
View Options
diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php
--- a/src/workflow/ArcanistDiffWorkflow.php
+++ b/src/workflow/ArcanistDiffWorkflow.php
@@ -946,17 +946,15 @@
}
if (count($changes) > 250) {
- $count = number_format(count($changes));
- $link =
- 'http://www.phabricator.com/docs/phabricator/article/'.
- 'Differential_User_Guide_Large_Changes.html';
$message = pht(
- 'This diff has a very large number of changes (%d). Differential '.
+ 'This diff has a very large number of changes (%s). Differential '.
'works best for changes which will receive detailed human review, '.
'and not as well for large automated changes or bulk checkins. '.
'See %s for information about reviewing big checkins. Continue anyway?',
- $count,
- $link);
+ new PhutilNumber(count($changes)),
+ 'http://www.phabricator.com/docs/phabricator/article/'.
+ 'Differential_User_Guide_Large_Changes.html');
+
if (!phutil_console_confirm($message)) {
throw new ArcanistUsageException(
pht('Aborted generation of gigantic diff.'));
@@ -970,13 +968,11 @@
$size += strlen($hunk->getCorpus());
}
if ($size > $limit) {
- $file_name = $change->getCurrentPath();
- $change_size = number_format($size);
$byte_warning = pht(
- "Diff for '%s' with context is %d bytes in length. ".
+ "Diff for '%s' with context is %s bytes in length. ".
"Generally, source changes should not be this large.",
- $file_name,
- $change_size);
+ $change->getCurrentPath(),
+ new PhutilNumber($size));
if (!$this->getArgument('less-context')) {
$byte_warning .= ' '.pht(
"If this file is a huge text file, try using the '%s' flag.",
diff --git a/src/workflow/ArcanistDownloadWorkflow.php b/src/workflow/ArcanistDownloadWorkflow.php
--- a/src/workflow/ArcanistDownloadWorkflow.php
+++ b/src/workflow/ArcanistDownloadWorkflow.php
@@ -86,8 +86,7 @@
'id' => $this->id,
));
- $bytes = number_format($info['byteSize']);
- $desc = pht('(%d bytes)', $bytes);
+ $desc = pht('(%s bytes)', new PhutilNumber($info['byteSize']));
if ($info['name']) {
$desc = "'".$info['name']."' ".$desc;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sep 30 2025, 5:28 AM (12 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8924792
Default Alt Text
D12994.id.diff (2 KB)
Attached To
Mode
D12994: Fix some format strings
Attached
Detach File
Event Timeline
Log In to Comment