Patchwork D10287: shelve: simplify

login
register
mail settings
Submitter phabricator
Date March 29, 2021, 12:06 a.m.
Message ID <differential-rev-PHID-DREV-3dr26jb54gxon2gip564-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48603/
State Superseded
Headers show

Comments

phabricator - March 29, 2021, 12:06 a.m.
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -534,7 +534,7 @@ 
     parent = parents[0]
     origbranch = wctx.branch()
 
-    if parent.node() != nullid:
+    if parent.rev() != nullrev:
         desc = b"changes to: %s" % parent.description().split(b'\n', 1)[0]
     else:
         desc = b'(changes in empty repository)'