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