Mercurial > hg
changeset 7173:37dd322adc81
Merge with crew
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 19 Oct 2008 19:10:26 +0200 |
parents | fb1d7a42663c (diff) 834b8d7bd597 (current diff) |
children | 14848fc8e26c |
files | mercurial/parsers.c |
diffstat | 7 files changed, 28 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/__init__.py Sun Oct 19 16:11:23 2008 +0200 +++ b/hgext/convert/__init__.py Sun Oct 19 19:10:26 2008 +0200 @@ -107,7 +107,7 @@ individual commits to CVS and merge them into changesets. CVS source uses its internal changeset merging code by default but can be configured to call the external 'cvsps' program by setting: - --config convert.cvsps=cvsps -A -u --cvs-direct -q + --config convert.cvsps='cvsps -A -u --cvs-direct -q' This is a legacy option and may be removed in future. The options shown are the defaults.
--- a/mercurial/parsers.c Sun Oct 19 16:11:23 2008 +0200 +++ b/mercurial/parsers.c Sun Oct 19 19:10:26 2008 +0200 @@ -292,23 +292,25 @@ int comp_len, uncomp_len, base_rev, link_rev, parent_1, parent_2; const char *c_node_id; const char *end = data + size; + char decode[64]; /* to enforce alignment with inline data */ while (data < end) { - offset_flags = ntohl(*((uint32_t *) (data + 4))); + memcpy(decode, data, 64); + offset_flags = ntohl(*((uint32_t *) (decode + 4))); if (n == 0) /* mask out version number for the first entry */ offset_flags &= 0xFFFF; else { - uint32_t offset_high = ntohl(*((uint32_t *) data)); + uint32_t offset_high = ntohl(*((uint32_t *) decode)); offset_flags |= ((uint64_t) offset_high) << 32; } - comp_len = ntohl(*((uint32_t *) (data + 8))); - uncomp_len = ntohl(*((uint32_t *) (data + 12))); - base_rev = ntohl(*((uint32_t *) (data + 16))); - link_rev = ntohl(*((uint32_t *) (data + 20))); - parent_1 = ntohl(*((uint32_t *) (data + 24))); - parent_2 = ntohl(*((uint32_t *) (data + 28))); - c_node_id = data + 32; + comp_len = ntohl(*((uint32_t *) (decode + 8))); + uncomp_len = ntohl(*((uint32_t *) (decode + 12))); + base_rev = ntohl(*((uint32_t *) (decode + 16))); + link_rev = ntohl(*((uint32_t *) (decode + 20))); + parent_1 = ntohl(*((uint32_t *) (decode + 24))); + parent_2 = ntohl(*((uint32_t *) (decode + 28))); + c_node_id = decode + 32; entry = _build_idx_entry(nodemap, n, offset_flags, comp_len, uncomp_len, base_rev,
--- a/tests/run-tests.py Sun Oct 19 16:11:23 2008 +0200 +++ b/tests/run-tests.py Sun Oct 19 19:10:26 2008 +0200 @@ -205,6 +205,18 @@ global hgpkg hgpkg = _hgpath() + vlog("# Installing dummy diffstat") + f = open(os.path.join(BINDIR, 'diffstat'), 'w') + f.write('#!' + sys.executable + '\n' + 'import sys\n' + 'files = 0\n' + 'for line in sys.stdin:\n' + ' if line.startswith("diff "):\n' + ' files += 1\n' + 'sys.stdout.write("files patched: %d\\n" % files)\n') + f.close() + os.chmod(os.path.join(BINDIR, 'diffstat'), 0700) + if coverage: vlog("# Installing coverage wrapper") os.environ['COVERAGE_FILE'] = COVERAGE_FILE
--- a/tests/test-bundle-type Sun Oct 19 16:11:23 2008 +0200 +++ b/tests/test-bundle-type Sun Oct 19 19:10:26 2008 +0200 @@ -20,7 +20,7 @@ hg init t$t cd t1 hg bundle -t $t ../b$t ../t$t - head -n 1 ../b$t | cut -b 1-6 + cut -b 1-6 ../b$t | head -n 1 cd ../t$t hg pull ../b$t hg up
--- a/tests/test-convert.out Sun Oct 19 16:11:23 2008 +0200 +++ b/tests/test-convert.out Sun Oct 19 19:10:26 2008 +0200 @@ -94,7 +94,7 @@ individual commits to CVS and merge them into changesets. CVS source uses its internal changeset merging code by default but can be configured to call the external 'cvsps' program by setting: - --config convert.cvsps=cvsps -A -u --cvs-direct -q + --config convert.cvsps='cvsps -A -u --cvs-direct -q' This is a legacy option and may be removed in future. The options shown are the defaults.
--- a/tests/test-notify Sun Oct 19 16:11:23 2008 +0200 +++ b/tests/test-notify Sun Oct 19 19:10:26 2008 +0200 @@ -83,5 +83,4 @@ hg --cwd b rollback hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \ -e 's/changeset \([0-9a-f]*\) in .*/changeset \1/' \ - -e 's/^Date:.*/Date:/' \ - -e 's/^1 files changed/1 file changed/' + -e 's/^Date:.*/Date:/'