Mercurial > hg
changeset 19776:a9e92b11a3f2
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 23 Sep 2013 11:37:06 -0700 |
parents | 0c626b68c5c6 (current diff) 83d79a00cc24 (diff) |
children | 6f72e7d28b35 |
files | mercurial/revlog.py |
diffstat | 5 files changed, 39 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/extensions.py Fri Sep 20 15:26:30 2013 -0700 +++ b/mercurial/extensions.py Mon Sep 23 11:37:06 2013 -0700 @@ -349,12 +349,13 @@ raise error.UnknownCommand(cmd) -def enabled(): +def enabled(shortname=True): '''return a dict of {name: desc} of extensions''' exts = {} for ename, ext in extensions(): doc = (gettext(ext.__doc__) or _('(no help text available)')) - ename = ename.split('.')[-1] + if shortname: + ename = ename.split('.')[-1] exts[ename] = doc.splitlines()[0].strip() return exts
--- a/mercurial/help.py Fri Sep 20 15:26:30 2013 -0700 +++ b/mercurial/help.py Mon Sep 23 11:37:06 2013 -0700 @@ -103,10 +103,11 @@ cmdname = cmd.split('|')[0].lstrip('^') results['commands'].append((cmdname, summary)) for name, docs in itertools.chain( - extensions.enabled().iteritems(), + extensions.enabled(False).iteritems(), extensions.disabled().iteritems()): # extensions.load ignores the UI argument mod = extensions.load(None, name, '') + name = name.split('.')[-1] if lowercontains(name) or lowercontains(docs): # extension docs are already translated results['extensions'].append((name, docs.splitlines()[0]))
--- a/mercurial/revlog.py Fri Sep 20 15:26:30 2013 -0700 +++ b/mercurial/revlog.py Mon Sep 23 11:37:06 2013 -0700 @@ -200,7 +200,7 @@ self.datafile = indexfile[:-2] + ".d" self.opener = opener self._cache = None - self._basecache = (0, 0) + self._basecache = None self._chunkcache = (0, '') self.index = [] self._pcache = {} @@ -1131,6 +1131,8 @@ offset = self.end(prev) flags = 0 d = None + if self._basecache is None: + self._basecache = (prev, self.chainbase(prev)) basecache = self._basecache p1r, p2r = self.rev(p1), self.rev(p2)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-generaldelta.t Mon Sep 23 11:37:06 2013 -0700 @@ -0,0 +1,23 @@ +Check whether size of generaldelta revlog is not bigger than its +regular equivalent. Test would fail if generaldelta was naive +implementation of parentdelta: third manifest revision would be fully +inserted due to big distance from its paren revision (zero). + + $ hg init repo + $ cd repo + $ echo foo > foo + $ echo bar > bar + $ hg commit -q -Am boo + $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes + $ for r in 1 2 3; do + > echo $r > foo + > hg commit -q -m $r + > hg up -q -r 0 + > hg pull . -q -r $r -R ../gdrepo + > done + $ cd .. + $ regsize=`du -s -b repo/.hg/store/00manifest.i | cut -f 1` + $ gdsize=`du -s -b gdrepo/.hg/store/00manifest.i | cut -f 1` + $ if ((regsize < gdsize)); then + > echo 'generaldelta increased size of a revlog!' + > fi
--- a/tests/test-help.t Fri Sep 20 15:26:30 2013 -0700 +++ b/tests/test-help.t Mon Sep 23 11:37:06 2013 -0700 @@ -773,6 +773,12 @@ Test keyword search help + $ cat > prefixedname.py <<EOF + > '''matched against word "clone" + > ''' + > EOF + $ echo '[extensions]' >> $HGRCPATH + $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH $ hg help -k clone Topics: @@ -792,7 +798,8 @@ Extensions: - relink recreates hardlinks between repository clones + prefixedname matched against word "clone" + relink recreates hardlinks between repository clones Extension Commands: