Mercurial > hg-stable
changeset 2228:8b106ff5b8a9
merge with mainline.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 08 May 2006 14:20:37 -0700 |
parents | 4f072bb06e89 (current diff) b72562060e45 (diff) |
children | 0ff326c2b286 |
files | |
diffstat | 7 files changed, 19 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filelog.py Mon May 08 14:19:05 2006 -0700 +++ b/mercurial/filelog.py Mon May 08 14:20:37 2006 -0700 @@ -11,7 +11,7 @@ demandload(globals(), "bdiff") class filelog(revlog): - def __init__(self, opener, path, defversion=0): + def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION): revlog.__init__(self, opener, os.path.join("data", self.encodedir(path + ".i")), os.path.join("data", self.encodedir(path + ".d")),
--- a/mercurial/localrepo.py Mon May 08 14:19:05 2006 -0700 +++ b/mercurial/localrepo.py Mon May 08 14:20:37 2006 -0700 @@ -43,11 +43,15 @@ pass v = self.ui.revlogopts - self.revlogversion = int(v.get('format', revlog.REVLOGV0)) + self.revlogversion = int(v.get('format', revlog.REVLOG_DEFAULT_FORMAT)) self.revlogv1 = self.revlogversion != revlog.REVLOGV0 + fl = v.get('flags', None) flags = 0 - for x in v.get('flags', "").split(): - flags |= revlog.flagstr(x) + if fl != None: + for x in fl.split(): + flags |= revlog.flagstr(x) + elif self.revlogv1: + flags = revlog.REVLOG_DEFAULT_FLAGS v = self.revlogversion | flags self.manifest = manifest.manifest(self.opener, v)
--- a/mercurial/revlog.py Mon May 08 14:19:05 2006 -0700 +++ b/mercurial/revlog.py Mon May 08 14:20:37 2006 -0700 @@ -22,6 +22,10 @@ # revlog flags REVLOGNGINLINEDATA = (1 << 16) +REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDATA + +REVLOG_DEFAULT_FORMAT = REVLOGNG +REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS def flagstr(flag): if flag == "inline": @@ -293,7 +297,8 @@ remove data, and can use some simple techniques to avoid the need for locking while reading. """ - def __init__(self, opener, indexfile, datafile, defversion=REVLOGV0): + def __init__(self, opener, indexfile, datafile, + defversion=REVLOG_DEFAULT_VERSION): """ create a revlog object
--- a/tests/test-copy Mon May 08 14:19:05 2006 -0700 +++ b/tests/test-copy Mon May 08 14:20:37 2006 -0700 @@ -22,7 +22,7 @@ echo "this should show the rename information in the metadata" hg debugdata .hg/data/b.d 0 | head -3 | tail -2 -$TESTDIR/md5sum.py .hg/data/b.d +$TESTDIR/md5sum.py .hg/data/b.i hg cat b > bsum $TESTDIR/md5sum.py bsum hg cat a > asum
--- a/tests/test-copy.out Mon May 08 14:19:05 2006 -0700 +++ b/tests/test-copy.out Mon May 08 14:20:37 2006 -0700 @@ -41,7 +41,7 @@ this should show the rename information in the metadata copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 copy: a -566e338d09a089ba737c21e0d3759980 .hg/data/b.d +ed156f22f0a6fde642de0b5eba0cbbb2 .hg/data/b.i 60b725f10c9c85c70d97880dfe8191b3 bsum 60b725f10c9c85c70d97880dfe8191b3 asum checking changesets
--- a/tests/test-hup.out Mon May 08 14:19:05 2006 -0700 +++ b/tests/test-hup.out Mon May 08 14:20:37 2006 -0700 @@ -4,7 +4,6 @@ killed! transaction abort! rollback completed -00changelog.d 00changelog.i data journal.dirstate
--- a/tests/test-permissions Mon May 08 14:19:05 2006 -0700 +++ b/tests/test-permissions Mon May 08 14:20:37 2006 -0700 @@ -5,11 +5,11 @@ hg add a hg commit -m "1" -d "1000000 0" hg verify -chmod -r .hg/data/a.d +chmod -r .hg/data/a.i hg verify 2>/dev/null || echo verify failed -chmod +r .hg/data/a.d +chmod +r .hg/data/a.i hg verify 2>/dev/null || echo verify failed -chmod -w .hg/data/a.d +chmod -w .hg/data/a.i echo barber > a hg commit -m "2" -d "1000000 0" 2>/dev/null || echo commit failed