Mercurial > hg
changeset 7135:06ca03380190
merge with crew
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 18 Oct 2008 20:39:08 +0200 |
parents | cb6395fc16a9 (diff) e9a2525d8834 (current diff) |
children | d834ed27199f 0df098871e3d |
files | mercurial/parsers.c |
diffstat | 2 files changed, 10 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Oct 18 18:24:37 2008 +0200 +++ b/mercurial/localrepo.py Sat Oct 18 20:39:08 2008 +0200 @@ -1808,8 +1808,7 @@ for fname in extranodes: if isinstance(fname, int): continue - add_extra_nodes(fname, - msng_filenode_set.setdefault(fname, {})) + msng_filenode_set.setdefault(fname, {}) changedfiles[fname] = 1 # Go through all our files in order sorted by name. for fname in util.sort(changedfiles): @@ -1820,6 +1819,7 @@ # missing. if fname in msng_filenode_set: prune_filenodes(fname, filerevlog) + add_extra_nodes(fname, msng_filenode_set[fname]) msng_filenode_lst = msng_filenode_set[fname].keys() else: msng_filenode_lst = []
--- a/mercurial/parsers.c Sat Oct 18 18:24:37 2008 +0200 +++ b/mercurial/parsers.c Sat Oct 18 20:39:08 2008 +0200 @@ -235,13 +235,6 @@ return ret; } - -static inline uint64_t ntohll(uint64_t x) -{ - return (((uint64_t)ntohl((uint32_t)x)) << 32) | - (uint64_t)ntohl((uint32_t)(x >> 32)); -} - const char nullid[20]; const int nullrev = -1; @@ -267,9 +260,14 @@ const char *end = data + size; while (data < end) { - offset_flags = ntohll(*((uint64_t *) data)); - if (n == 0) /* mask out version number for the first entry */ - offset_flags &= 0xFFFF; + offset_flags = ntohl(*((uint32_t *) (data + 4))); + if (n == 0) /* mask out version number for the first entry */ + offset_flags &= 0xFFFF; + else { + uint32_t offset_high = ntohl(*((uint32_t *) data)); + offset_flags |= ((uint64_t) offset_high) << 32; + } + comp_len = ntohl(*((uint32_t *) (data + 8))); uncomp_len = ntohl(*((uint32_t *) (data + 12)));