comparison contrib/debugshell.py @ 26979:7b038ec6c5fd

filemerge: introduce class whose objects represent files not in a context Most code is going to barf at the return values here (particularly from data and size), so we restrict it to the filemerge code. This is already somewhat supported via: ctx.filectx(f, fileid=nullid) Indeed, for add/add conflicts (ancestor doesn't have the file) we use precisely that. However, that is broken in subtle ways: - The cmp() function in filectx returns False (identical) for such a filectx when compared to a zero-length file. - size() returns 0 rather than some sort of value indicating that the file isn't present. - data() returns '' rather than some sort of value indicating that the file isn't present. Given the relatively niche use of such filectxes, this seems to be the simplest way to fix all these issues.
author Siddharth Agarwal <sid0@fb.com>
date Mon, 16 Nov 2015 11:45:35 -0800
parents 8b5c039f2b4f
children e4b512bb6386
comparison
equal deleted inserted replaced
26978:9b9d4bcc915e 26979:7b038ec6c5fd