Use revision directly instead of revnode

We don't need the revnode.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras
2023-03-09 18:37:02 -06:00
parent 8b1fd408ca
commit 23f41c0ff1
2 changed files with 4 additions and 4 deletions

View File

@@ -297,7 +297,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors,
return n
(revnode,_,user,(time,timezone),files,desc,branch,extra)=get_changeset(ui,repo,revision,authors,encoding)
if repo[revnode].hidden():
if repo[revision].hidden():
return count
branch=get_branchname(branch)
@@ -344,7 +344,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors,
# later non-merge revision: feed in changed manifest
# if we have exactly one parent, just take the changes from the
# manifest without expensively comparing checksums
f=repo.status(parents[0],revnode)
f=repo.status(parents[0],revision)
added,changed,removed=f.added,f.modified,f.removed
type='simple delta'
else: # a merge with two parents
@@ -376,7 +376,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors,
def export_note(ui,repo,revision,count,authors,encoding,is_first):
(revnode,_,user,(time,timezone),_,_,_,_)=get_changeset(ui,repo,revision,authors,encoding)
if repo[revnode].hidden():
if repo[revision].hidden():
return count
wr(b'commit refs/notes/hg')

View File

@@ -90,7 +90,7 @@ def get_changeset(ui,repo,revision,authors={},encoding=''):
node=binnode(revsymbol(repo, b"%d" % revision)) # We were given a numeric rev
except hgerror.RepoLookupError:
node=revision # We got a raw hash
(manifest,user,(time,timezone),files,desc,extra)=repo.changelog.read(node)
(manifest,user,(time,timezone),files,desc,extra)=repo.changelog.read(revision)
if encoding:
user=user.decode(encoding).encode('utf8')
desc=desc.decode(encoding).encode('utf8')