hg.clone: fix branch value when passing a repo object (
issue2267)
Since
3d6915f5a2bb the branch argument for addbranchrevs should be a tuple:
(hashbranch, branches)
The right empty value therefore is (None, []) instead of None.
test-bheads: use a case-insensitive set of filenames (
issue2274)
This prevents false negatives on case-insensitive systems.
mail: ensure that Python2.4 to 2.7 use the same header format
Wrapping format for long headers changed in Python2.7 (see Python
issue1974).
Adopt the Python2.7 behaviour and backport it for 2.4-2.6
filelog: cmp: don't read data if hashes are identical (
issue2273)
filelog.renamed() is an expensive call as it reads the filelog if p1 == nullid.
It's more efficient to first compute the hash, and to bail early if
the computed hash is the same as the stored nodeid.
'samehashes' variable is not strictly necessary, but helps for comprehension.
filelog: test behaviour for data starting with "\1\n"
Because "\1\n" is a separator for metadata, data starting with "\1\n" is
handled specifically. It was not tested.
size() call return incorrect data if original data had been "\1\n-escaped".
There's no obvious way to fix it for now, just flag the error in the code
and add an "expected failure" kind of test.
cmp: document the fact that we return True if content is different
This is similar to the __builtin__.cmp behaviour, but still not
straightforward, as the dailylife meaning of a comparison usually is
"find out if they are different".
workingfilectx.cmp: invert boolean return value
Apparently we mostly used filectx.cmp(workingfilectx.read()), so no error
was ever triggered, but since all cmp() methods return True when content
are different, that == should in fact be !=
rebase: add a test for committed MQ patches (
59bd20451ab6)
util.h: Defined macros for working "with" PyStrings in py3k.
PyString* functions are defined as PyUnicode* to permit correct compilation in
both python 2.x and 3.x.