# HG changeset patch # User Mads Kiilerich # Date 1298068873 -3600 # Node ID 286a3720d47279efe06d2a441145bde222bf5244 # Parent d724a69309e0ce9a7d8efb13e11ba45a4c85045c statichttprepo: don't modify localrepo class variables This happened to crash in subrepo setups when the base class variable was modified twice. Now we don't modify the class variable but an instance copy. diff -r d724a69309e0 -r 286a3720d472 mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py Fri Feb 18 03:35:01 2011 +0100 +++ b/mercurial/statichttprepo.py Fri Feb 18 23:41:13 2011 +0100 @@ -128,7 +128,7 @@ self._branchcachetip = None self.encodepats = None self.decodepats = None - self.capabilities.remove("pushkey") + self.capabilities = self.capabilities.difference(["pushkey"]) def url(self): return self._url diff -r d724a69309e0 -r 286a3720d472 tests/test-static-http.t --- a/tests/test-static-http.t Fri Feb 18 03:35:01 2011 +0100 +++ b/tests/test-static-http.t Fri Feb 18 23:41:13 2011 +0100 @@ -102,27 +102,36 @@ updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved -test with "/" URI (issue 747) +test with "/" URI (issue 747) and subrepo $ hg init + $ hg init sub + $ hg -R sub tag not-empty + $ echo sub=sub > .hgsub $ echo a > a - $ hg add a - $ hg ci -ma + $ hg add a .hgsub + $ hg -q ci -ma $ hg clone static-http://localhost:$HGPORT/ local2 requesting all changes adding changesets adding manifests adding file changes - added 1 changesets with 1 changes to 1 files + added 1 changesets with 3 changes to 3 files updating to branch default - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + pulling subrepo sub from static-http://localhost:$HGPORT/sub + requesting all changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd local2 $ hg verify checking changesets checking manifests crosschecking files in changesets and manifests checking files - 1 files, 1 changesets, 1 total revisions + 3 files, 1 changesets, 3 total revisions $ cat a a $ hg paths