diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1200,7 +1200,7 @@ def _aborthistedit(ui, repo, state): with repo.transaction('histedit.abort') as tr: if not isinstance(gen, bundle2.unbundle20): gen.apply(repo, 'histedit', 'bundle:' + backupfile) - if isinstance(gen, bundle2.unbundle20): + else: bundle2.applybundle(repo, gen, tr, source='histedit', url='bundle:' + backupfile) diff --git a/hgext/shelve.py b/hgext/shelve.py --- a/hgext/shelve.py +++ b/hgext/shelve.py @@ -130,7 +130,7 @@ class shelvedfile(object): gen.apply(self.repo, 'unshelve', 'bundle:' + self.vfs.join(self.fname), targetphase=phases.secret) - if isinstance(gen, bundle2.unbundle20): + else: bundle2.applybundle(self.repo, gen, self.repo.currenttransaction(), source='unshelve',