Mercurial > hg > hgforest
changeset 101:988ad510ef97
Fix HTTP 'forests' command on hg >= 1.7 (#1)
author | Michael Tharp <mtharp@rpath.com> |
---|---|
date | Mon, 15 Nov 2010 11:08:41 -0500 |
parents | 90f5bf44cf59 |
children | 11f39395838e |
files | forest.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/forest.py Mon Oct 11 12:58:05 2010 -0400 +++ b/forest.py Mon Nov 15 11:08:41 2010 -0500 @@ -274,7 +274,13 @@ raise util.Abort(_("Remote forests cannot be cloned because the " "other repository doesn't support the forest " "extension.")) - data = self.do_read("forests", walkhg=("", "True")[walkhg]) + if hasattr(self, 'do_read'): + # < 1.7 + func = self.do_read + else: + # >= 1.7 + func = self._call + data = func("forests", walkhg=("", "True")[walkhg]) return data.splitlines() httprepo.httprepository.forests = _httprepo_forests