Mercurial > hg
changeset 13440:286a3720d472 stable
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 18 Feb 2011 23:41:13 +0100 |
parents | d724a69309e0 |
children | b366a5e021c6 |
files | mercurial/statichttprepo.py tests/test-static-http.t |
diffstat | 2 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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