diff rust/hg-core/src/dirstate.rs @ 49439:b07465adbcc8

rhg: make [rhg status -v] work when it needs no extra output Add support for verbose [status] when no extra output is actually needed. This makes it so that [rhg status] is actually useful when [tweakdefaults] is true. (since tweakdefaults implies verbose status)
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Wed, 24 Aug 2022 16:38:13 +0100
parents bf8837e3d7ce
children e98fd81bb151
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate.rs	Thu Jul 28 16:25:21 2022 +0200
+++ b/rust/hg-core/src/dirstate.rs	Wed Aug 24 16:38:13 2022 +0100
@@ -30,6 +30,10 @@
         p1: NULL_NODE,
         p2: NULL_NODE,
     };
+
+    pub fn is_merge(&self) -> bool {
+        return !(self.p2 == NULL_NODE);
+    }
 }
 
 pub type StateMapIter<'a> = Box<