sapling/mercurial
Yuya Nishihara 0bf3f9f6fd filectx: fix cmp() of file starting with '\1\n'
If file data starts with '\1\n', it will be escaped in the revlog to
create an empty metadata block, thus adding four bytes to the size in
the revlog size index. There's no way to detect that this has happened
in filelog.size() faster than decompressing each revision [1].

For filectx.cmp(), we have the size of the file in the working directory
available. If it differs by exactly four bytes, it may be this case, so
do a full comparison.

 [1]: http://markmail.org/message/5akdbmmqx7vq2fsg
2012-01-12 00:49:45 +09:00
..
help filesets: use example with quotes for encoding predicate 2012-01-10 15:20:16 +01:00
hgweb pyflakes: clean up some import noise 2011-10-11 23:16:05 -05:00
httpclient httpclient: update to 07d8c356f4d1 of py-nonblocking-http 2011-10-10 17:57:40 -05:00
pure merge with stable 2011-08-17 14:17:35 +02:00
templates hgweb: fix dynamic date calculation not working under Safari 2011-10-27 11:57:08 -07:00
__init__.py Add back links from file revisions to changeset revisions 2005-05-03 13:16:10 -08:00
ancestor.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
archival.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
base85.c backout of e4cb9628354c 2011-01-27 11:15:08 +01:00
bdiff.c bdiff: fix pointer aliasing 2011-10-11 20:21:13 -05:00
bookmarks.py bookmarks: delegate writing to the repo just like reading 2011-10-12 11:09:57 -05:00
bundlerepo.py bundlerepo: don't write branch cache to disk 2011-12-01 14:17:17 +01:00
byterange.py byterange: replace uses of hasattr with getattr 2011-07-25 15:09:17 -05:00
changegroup.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
changelog.py changelog: handle decoding of NULs in extra more carefully (issue3156) 2011-12-16 18:23:15 -06:00
cmdutil.py diff: when diffing a revision with a deleted subrepo, maintain the node context (issue3153) 2011-12-15 16:41:03 -05:00
commands.py commands: add link to addremove in commit help text 2012-01-06 11:15:32 +01:00
commandserver.py cmdserver: repo.invalidate() on every runcommand 2011-07-25 22:19:28 +03:00
config.py config.sortdict: override clear method 2011-06-20 10:51:37 +02:00
context.py filectx: fix cmp() of file starting with '\1\n' 2012-01-12 00:49:45 +09:00
copies.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
dagparser.py cleanup: use x in (a, b) instead of x == a or x == b 2010-09-23 00:02:31 -05:00
dagutil.py dagutil: fix off-by-one in inverserevlogdag buildup 2011-08-25 17:20:00 +02:00
demandimport.py demandimport: determine at load time if __import__ has level argument 2011-08-22 22:50:52 +02:00
diffhelpers.c backout of e4cb9628354c 2011-01-27 11:15:08 +01:00
dirstate.py dirstate: propagate IOError other than ENOENT when reading branch 2012-01-06 07:37:59 +01:00
discovery.py add missing localization markup 2011-11-11 01:07:10 +01:00
dispatch.py add missing localization markup 2011-11-11 01:07:10 +01:00
encoding.py i18n: use encoding.lower/upper for encoding aware case folding 2011-12-16 21:09:41 +09:00
error.py wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00
extensions.py extensions: print some debug info on import failure 2011-10-01 16:42:39 -04:00
fancyopts.py globally: use safehasattr(x, '__call__') instead of hasattr(x, '__call__') 2011-07-25 16:24:37 -05:00
filelog.py filelog: add file function to open other filelogs 2011-05-10 17:38:58 +02:00
filemerge.py merge: expand environment variables and ~/ in tool.executable 2011-10-12 21:45:58 -04:00
fileset.py fileset: fix typo in binary() doc 2011-07-04 14:36:16 +03:00
graphmod.py graphmod: correctly emit nodes with more than 2 predecessors 2011-05-01 15:51:46 +02:00
hbisect.py bisect: add i18n contexts 2011-10-18 09:38:14 -02:00
help.py windows: check util.mainfrozen() instead of ad-hoc checks everywhere 2011-07-25 16:14:02 -05:00
hg.py clone: don't save user's password in .hg/hgrc (Issue3122) 2011-11-22 12:06:42 -06:00
hook.py hook: flush stdout before redirecting to stderr 2011-11-16 08:34:36 +01:00
httpconnection.py auth: fix realm handling with Python < 2.4.3 (issue2739) 2011-10-17 13:42:42 -05:00
httprepo.py httprepo: make __del__ more stable in error situations 2011-10-13 04:27:49 +02:00
i18n.py i18n: use getattr instead of hasattr 2011-07-25 20:46:30 -05:00
ignore.py misc: adding missing file close() calls 2011-11-03 11:24:55 -05:00
keepalive.py keepalive: use safehasattr instead of hasattr 2011-07-25 20:36:59 -05:00
localrepo.py windows: use normalized path to check repository nesting 2011-12-24 19:05:25 +09:00
lock.py check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
lsprof.py lsprof: use getattr instead of hasattr 2011-07-25 15:41:46 -05:00
lsprofcalltree.py drop unused imports 2009-05-14 15:35:46 +02:00
mail.py mail: use safehasattr instead of hasattr 2011-07-25 16:02:15 -05:00
manifest.py manifest: use "\0" instead of "\000" 2011-06-16 08:49:26 +02:00
match.py match: remove unused assignment 2011-08-09 11:05:13 +02:00
mdiff.py diff: --ignore-blank-lines was too enthusiastic 2011-11-13 21:37:14 +01:00
merge.py merge: check filename case collision between changesets for branch merging 2011-12-16 21:21:27 +09:00
minirst.py minirst: use unicode string as intermediate form for replacement 2011-10-31 21:06:18 +09:00
mpatch.c parsers: avoid pointer aliasing 2011-08-10 13:40:01 -05:00
node.py Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
osutil.c merge with stable 2011-09-14 14:37:10 -05:00
parser.py parsers: fix localization markup of parser errors 2011-06-21 00:17:52 +02:00
parsers.c parsers: avoid pointer aliasing 2011-08-10 13:40:01 -05:00
patch.py diff: '\ No newline at end of file' is also not part of the header 2011-11-29 19:51:35 +01:00
posix.py i18n: use encoding.lower/upper for encoding aware case folding 2011-12-16 21:09:41 +09:00
pushkey.py bookmarks: move pushkey functions into core 2011-02-10 13:46:27 -06:00
py3kcompat.py py3kcompat: added fake ord implementation for py3k 2010-08-07 16:38:38 -03:00
repair.py strip: backout 9aac86f54486 (issue3077) 2011-10-30 12:10:09 -05:00
repo.py Make sure bundlerepo doesn't leak temp files (issue2491) 2011-02-12 10:58:11 +01:00
revlog.py misc: adding missing file close() calls 2011-11-03 11:24:55 -05:00
revset.py revset: balance %l or-expressions (issue3129) 2011-11-30 22:43:24 -06:00
scmutil.py windows: force specified path to be audited in localpath form 2011-12-24 19:01:07 +09:00
setdiscovery.py add missing localization markup 2011-11-11 01:07:10 +01:00
similar.py fix coding style 2010-05-02 00:48:33 +02:00
simplemerge.py backout 17bc9a6bb165 (issue3077) (issue3071) 2011-10-29 11:02:23 -05:00
sshrepo.py wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00
sshserver.py wireproto: add out-of-band error class to allow remote repo to report errors 2011-08-02 15:21:10 -04:00
sslutil.py sslutil: abort when ssl module is needed but not found 2011-09-27 18:51:10 +02:00
statichttprepo.py statichttprepo: replace hasattr with getattr 2011-07-25 15:47:43 -05:00
store.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
strutil.py Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
subrepo.py windows: use normalized path as path to subrepo 2011-12-24 19:05:35 +09:00
tags.py atomictempfile: make close() consistent with other file-like objects. 2011-08-25 20:21:04 -04:00
templatefilters.py templates: add 'bisect' keyword to return a cset's bisect status 2011-09-22 01:36:01 +02:00
templatekw.py templates: add 'bisect' keyword to return a cset's bisect status 2011-09-22 01:36:01 +02:00
templater.py globally: use safehasattr(x, '__iter__') instead of hasattr(x, '__iter__') 2011-07-25 15:30:19 -05:00
transaction.py transaction: use posixfile and unlink from util 2011-02-15 14:41:49 +01:00
treediscovery.py treediscovery: always return all remote heads 2011-06-20 14:11:01 +02:00
ui.py misc: adding missing file close() calls 2011-11-03 11:24:55 -05:00
url.py merge with stable 2011-09-10 17:56:42 -05:00
util.h backout of e4cb9628354c 2011-01-27 11:15:08 +01:00
util.py i18n: use encoding.lower/upper for encoding aware case folding 2011-12-16 21:09:41 +09:00
verify.py verify: fix mq misfire 2011-07-14 12:39:39 -05:00
win32.py win32: quietly ignore missing CreateHardLinkA for Wine 2011-09-13 17:01:07 -05:00
windows.py i18n: use encoding.lower/upper for encoding aware case folding 2011-12-16 21:09:41 +09:00
wireproto.py wireproto: do not call pushkey module directly (issue3041) 2011-10-10 13:52:54 +02:00