Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15392384
D21723.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21723.diff
View Options
diff --git a/src/ref/commit/ArcanistMercurialCommitSymbolCommitHardpointQuery.php b/src/ref/commit/ArcanistMercurialCommitSymbolCommitHardpointQuery.php
--- a/src/ref/commit/ArcanistMercurialCommitSymbolCommitHardpointQuery.php
+++ b/src/ref/commit/ArcanistMercurialCommitSymbolCommitHardpointQuery.php
@@ -159,7 +159,7 @@
// a spot which a marker might match.
foreach ($node_list as $node) {
foreach ($symbol_set as $symbol) {
- if (str_starts_with($node, $symbol)) {
+ if (strncmp($node, $symbol, strlen($symbol)) === 0) {
if (!isset($hash_map[$symbol])) {
$hash_map[$symbol] = $node;
}
diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php
--- a/src/repository/api/ArcanistMercurialAPI.php
+++ b/src/repository/api/ArcanistMercurialAPI.php
@@ -672,7 +672,10 @@
public function amendCommit($message = null) {
$path_statuses = $this->buildUncommittedStatus();
- if ($message === null) {
+ $existing_message = $this->getCommitMessage(
+ $this->getWorkingCopyRevision());
+
+ if ($message === null || $message == $existing_message) {
if (empty($path_statuses)) {
// If there are no changes to the working directory and the message is
// not being changed then there's nothing to amend. Notably Mercurial
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 2:52 PM (5 d, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7703968
Default Alt Text
D21723.diff (1 KB)
Attached To
Mode
D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+
Attached
Detach File
Event Timeline
Log In to Comment