Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is basically the same thing as not specifying a revision, except this is
  done in the revset resolution function.
  
  This allows calls like `rhg cat some-file -r .` to work without falling back.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  rust/hg-core/src/revset.rs

CHANGE DETAILS

diff --git a/rust/hg-core/src/revset.rs b/rust/hg-core/src/revset.rs
--- a/rust/hg-core/src/revset.rs
+++ b/rust/hg-core/src/revset.rs
@@ -20,6 +20,10 @@
     let changelog = Changelog::open(repo)?;
 
     match input {
+        "." => {
+            let p1 = repo.dirstate_parents()?.p1;
+            return Ok(changelog.revlog.get_node_rev(p1.into())?)
+        }
         "null" => return Ok(NULL_REVISION),
         _ => {
             match resolve_rev_number_or_hex_prefix(input, &changelog.revlog) {



To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to