# HG changeset patch # User Matt Mackall # Date 1237315391 18000 # Node ID af062a9fea9bf98593f6aa81c06dcd1da24cd3a0 # Parent a8dccbed54ef32272bc4969064b34ff9185f4569 bundlerepo: reintroduce dirstate diff -r a8dccbed54ef -r af062a9fea9b hgext/keyword.py --- a/hgext/keyword.py Fri Mar 13 21:14:57 2009 +0100 +++ b/hgext/keyword.py Tue Mar 17 13:43:11 2009 -0500 @@ -425,10 +425,14 @@ 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 -r a8dccbed54ef -r af062a9fea9b mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py Fri Mar 13 21:14:57 2009 +0100 +++ b/mercurial/bundlerepo.py Tue Mar 17 13:43:11 2009 -0500 @@ -226,7 +226,7 @@ self.manifest return self.filestart else: - raise AttributeError(name) + return localrepo.localrepository.__getattr__(self, name) def url(self): return self._url diff -r a8dccbed54ef -r af062a9fea9b tests/test-bundle --- a/tests/test-bundle Fri Mar 13 21:14:57 2009 +0100 +++ b/tests/test-bundle Tue Mar 17 13:43:11 2009 -0500 @@ -34,6 +34,7 @@ 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 @@ # 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 -r a8dccbed54ef -r af062a9fea9b tests/test-bundle.out --- a/tests/test-bundle.out Fri Mar 13 21:14:57 2009 +0100 +++ b/tests/test-bundle.out Tue Mar 17 13:43:11 2009 -0500 @@ -317,3 +317,12 @@ 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