# HG changeset patch # User RhodeCode Admin # Date 2023-08-21 12:25:35 # Node ID f738f9137af7fe39dbfc47854ea866d2a0e7e49f # Parent 7050b122639206990f8e11fe97d80a3360d9ca93 node-history: small fixes and added a investigation note diff --git a/vcsserver/remote/hg_remote.py b/vcsserver/remote/hg_remote.py --- a/vcsserver/remote/hg_remote.py +++ b/vcsserver/remote/hg_remote.py @@ -567,14 +567,16 @@ class HgRemote(RemoteBase): def history_iter(): limit_rev = fctx.rev() - for obj in reversed(list(fctx.filelog())): - obj = fctx.filectx(obj) - ctx = obj.changectx() - if ctx.hidden() or ctx.obsolete(): + for fctx_candidate in reversed(list(fctx.filelog())): + f_obj = fctx.filectx(fctx_candidate) + + # NOTE: This can be problematic...we can hide ONLY history node resulting in empty history + _ctx = obj.changectx() + if _ctx.hidden() or _ctx.obsolete(): continue - if limit_rev >= obj.rev(): - yield obj + if limit_rev >= f_obj.rev(): + yield f_obj history = [] for cnt, obj in enumerate(history_iter()): @@ -586,7 +588,7 @@ class HgRemote(RemoteBase): return _node_history(context_uid, repo_id, revision, path, limit) @reraise_safe_exceptions - def node_history_untill(self, wire, revision, path, limit): + def node_history_until(self, wire, revision, path, limit): cache_on, context_uid, repo_id = self._cache_on(wire) region = self._region(wire)