mirror of
https://github.com/frej/fast-export.git
synced 2025-11-03 01:35:48 +01:00
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:
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user