Patchwork D11743: rhg: Fix `rhg status` file content comparison

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2021, 2:44 p.m.
Message ID <differential-rev-PHID-DREV-khixafk6ffz4maf6su6p-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50068/
State Superseded
Headers show

Comments

phabricator - Nov. 9, 2021, 2:44 p.m.
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is only used when a file’s metadata make its status ambiguous,
  which depends on timing of previous command executions.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11743

AFFECTED FILES
  rust/rhg/src/commands/status.rs

CHANGE DETAILS




To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/rhg/src/commands/status.rs b/rust/rhg/src/commands/status.rs
--- a/rust/rhg/src/commands/status.rs
+++ b/rust/rhg/src/commands/status.rs
@@ -312,5 +312,5 @@ 
 
     let fs_path = hg_path_to_os_string(hg_path).expect("HgPath conversion");
     let fs_contents = repo.working_directory_vfs().read(fs_path)?;
-    return Ok(contents_in_p1 == &*fs_contents);
+    return Ok(contents_in_p1 != &*fs_contents);
 }