diff --git a/hgext/convert/common.py b/hgext/convert/common.py --- a/hgext/convert/common.py +++ b/hgext/convert/common.py @@ -80,7 +80,7 @@ class converter_source(object): raise NotImplementedError() def getchanges(self, version): - """Returns a tuple of (files, copies). + """Returns a tuple of (files, copies). files is a sorted list of (filename, id) tuples for all files changed between version and it's first parent returned by diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1787,7 +1787,7 @@ def refresh(ui, repo, *pats, **opts): the modifications that match those patterns; the remaining modifications will remain in the working directory. - If --short is specified, files currently included in the patch will + If --short is specified, files currently included in the patch will be refreshed just like matched files and remain in the patch. hg add/remove/copy/rename work as usual, though you might want to use diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -301,12 +301,12 @@ static int _parse_index_ng (const char * unsigned int step; 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 { + 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 *) decode)); - offset_flags |= ((uint64_t) offset_high) << 32; + offset_flags |= ((uint64_t) offset_high) << 32; } comp_len = ntohl(*((uint32_t *) (decode + 8))); diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -783,13 +783,13 @@ class linereader: yield l def scangitpatch(lr, firstline): - """ + """ Git patches can emit: - rename a to b - change b - copy a to c - change c - + We cannot apply this sequence as-is, the renamed 'a' could not be found for it would have been renamed already. And we cannot copy from 'b' instead because 'b' would have been changed already. So diff --git a/tests/printenv.py b/tests/printenv.py --- a/tests/printenv.py +++ b/tests/printenv.py @@ -20,7 +20,7 @@ try: import msvcrt msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) - msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) + msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) except ImportError: pass