diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -3905,7 +3905,12 @@ with ui.silent(): try: other, chlist, cleanupfn = bundlerepo.getremotechanges( - ui, repo, other, revs, opts[b"bundle"], opts[b"force"] + ui, + repo, + other, + revs, + opts.get(b"bundle"), + opts.get(b"force"), ) except error.LookupError: continue diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -1285,7 +1285,7 @@ if revs: revs = [other.lookup(rev) for rev in revs] other, chlist, cleanupfn = bundlerepo.getremotechanges( - ui, repo, other, revs, opts[b"bundle"], opts[b"force"] + ui, repo, other, revs, opts.get(b"bundle"), opts.get(b"force") ) if not chlist: