diff --git a/hgext/keyword.py b/hgext/keyword.py --- a/hgext/keyword.py +++ b/hgext/keyword.py @@ -425,10 +425,14 @@ def reposetup(ui, repo): keyword substitutions. Monkeypatches patch and webcommands.''' - if (not hasattr(repo, 'dirstate') or not kwtools['inc'] - or kwtools['hgcmd'] in nokwcommands.split() - or '.hg' in util.splitpath(repo.root)): - return + try: + if (not repo.local() or not kwtools['inc'] + or kwtools['hgcmd'] in nokwcommands.split() + or '.hg' in util.splitpath(repo.root) + or repo._url.startswith('bundle:')): + return + except AttributeError: + pass kwtools['templater'] = kwt = kwtemplater(ui, repo) diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -226,7 +226,7 @@ class bundlerepository(localrepo.localre self.manifest return self.filestart else: - raise AttributeError(name) + return localrepo.localrepository.__getattr__(self, name) def url(self): return self._url diff --git a/tests/test-bundle b/tests/test-bundle --- a/tests/test-bundle +++ b/tests/test-bundle @@ -34,6 +34,7 @@ hg init empty echo "====== Bundle --all" hg -R test bundle --all all.hg + echo "====== Bundle test to full.hg" hg -R test bundle full.hg empty echo "====== Unbundle full.hg in test" @@ -139,4 +140,10 @@ hg -R all.hg verify # but, regular verify must continue to work hg -R orig verify +echo "====== diff against bundle" +hg init b +cd b +hg -R ../all.hg diff -r tip +cd .. + diff --git a/tests/test-bundle.out b/tests/test-bundle.out --- a/tests/test-bundle.out +++ b/tests/test-bundle.out @@ -317,3 +317,12 @@ checking manifests crosschecking files in changesets and manifests checking files 2 files, 2 changesets, 2 total revisions +====== diff against bundle +diff -r 836ac62537ab anotherfile +--- a/anotherfile Mon Jan 12 13:46:40 1970 +0000 ++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 +@@ -1,4 +0,0 @@ +-0 +-1 +-2 +-3