D4780: repo: look up nullrev context by revnum, not symbolic name
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Sep 28 08:02:48 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1737ab4490e7: repo: look up nullrev context by revnum, not symbolic name (authored by martinvonz, committed by ).
CHANGED PRIOR TO COMMIT
https://phab.mercurial-scm.org/D4780?vs=11452&id=11465#toc
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4780?vs=11452&id=11465
REVISION DETAIL
https://phab.mercurial-scm.org/D4780
AFFECTED FILES
mercurial/archival.py
mercurial/scmutil.py
CHANGE DETAILS
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -21,6 +21,7 @@
bin,
hex,
nullid,
+ nullrev,
short,
wdirid,
wdirrev,
@@ -730,7 +731,7 @@
if len(parents) > 1:
return parents
if repo.ui.debugflag:
- return [parents[0], repo['null']]
+ return [parents[0], repo[nullrev]]
if parents[0].rev() >= intrev(ctx) - 1:
return []
return parents
diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -16,6 +16,9 @@
import zlib
from .i18n import _
+from .node import (
+ nullrev,
+)
from . import (
error,
@@ -76,7 +79,7 @@
# repo[0] may be hidden
for rev in repo:
return repo[rev]
- return repo['null']
+ return repo[nullrev]
# {tags} on ctx includes local tags and 'tip', with no current way to limit
# that to global tags. Therefore, use {latesttag} as a substitute when
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list