rust/hg-core/src/revset.rs
changeset 48079 3da7bf75fdb2
parent 48078 ddde80830aea
child 49930 e98fd81bb151
--- a/rust/hg-core/src/revset.rs	Sat Sep 11 00:05:08 2021 +0200
+++ b/rust/hg-core/src/revset.rs	Sat Sep 11 00:09:29 2021 +0200
@@ -19,6 +19,10 @@
     let changelog = repo.changelog()?;
 
     match input {
+        "." => {
+            let p1 = repo.dirstate_parents()?.p1;
+            return Ok(changelog.revlog.rev_from_node(p1.into())?);
+        }
         "null" => return Ok(NULL_REVISION),
         _ => {}
     }