# HG changeset patch # User Thomas Arendsen Hein # Date 1224436226 -7200 # Node ID 37dd322adc81c2f02b0f301df67077a5d571dc21 # Parent fb1d7a42663c194a618910b2dd78ed8c2c456207# Parent 834b8d7bd5978a85c22b880d0c24241416d24672 Merge with crew diff -r 834b8d7bd597 -r 37dd322adc81 hgext/convert/__init__.py --- 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. diff -r 834b8d7bd597 -r 37dd322adc81 mercurial/parsers.c --- 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, diff -r 834b8d7bd597 -r 37dd322adc81 tests/run-tests.py --- 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 diff -r 834b8d7bd597 -r 37dd322adc81 tests/test-bundle-type --- 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 diff -r 834b8d7bd597 -r 37dd322adc81 tests/test-convert.out --- 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. diff -r 834b8d7bd597 -r 37dd322adc81 tests/test-notify --- 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:/' diff -r 834b8d7bd597 -r 37dd322adc81 tests/test-notify.out --- a/tests/test-notify.out Sun Oct 19 16:11:23 2008 +0200 +++ b/tests/test-notify.out Sun Oct 19 19:10:26 2008 +0200 @@ -150,8 +150,7 @@ b diffstat: -1 file changed, 1 insertion(+) -a | 1 + +files patched: 1 diffs (6 lines):