Changeset d6c0fc595f4c…
Parent e03500e86fe9…
by
Changes to 3 files · Browse files at d6c0fc595f4c Showing diff from parent e03500e86fe9 Diff from another changeset...
@@ -273,7 +273,7 @@ wlock = repo.wlock()
try:
repo.wopener(self.currentFile, 'wb').write(
- repo['.'][self.currentFile].data())
+ self.diffbrowse.origcontents)
fp = cStringIO.StringIO()
chunks[0].write(fp)
for c in kchunks:
@@ -687,6 +687,7 @@ else:
self.sci.markerAdd(start+i, self.vertical)
start += len(chunk.lines) + 1
+ self.origcontents = fd.olddata
self.countselected = 0
self.curchunks = chunks
for c in chunks[1:]:
|
@@ -16,6 +16,7 @@ class FileData(object):
def __init__(self, ctx, ctx2, wfile, status=None):
self.contents = None
+ self.ucontents = None
self.error = None
self.olddata = None
self.diff = None
@@ -91,7 +92,7 @@ data = ctx[wfile].data()
else:
data = os.readlink(absfile)
- self.contents = hglib.tounicode(data)
+ self.contents = data
self.flabel += _(' <i>(is a symlink)</i>')
return
@@ -208,7 +209,7 @@ out += subrepochange
if data:
sstatedesc += ' and dirty'
- self.contents = u''.join(out)
+ self.ucontents = u''.join(out)
if not sactual:
sstatedesc = 'removed'
lbl = {
@@ -244,7 +245,7 @@ if '\0' in olddata:
self.error = 'binary file'
else:
- self.contents = hglib.tounicode(olddata)
+ self.contents = olddata
self.flabel += _(' <i>(was deleted)</i>')
else:
self.flabel += _(' <i>(was added, now missing)</i>')
@@ -258,7 +259,7 @@ if '\0' in data:
self.error = 'binary file'
else:
- self.contents = hglib.tounicode(data)
+ self.contents = data
if status in ('I', '?'):
self.flabel += _(' <i>(is unversioned)</i>')
return
@@ -268,7 +269,7 @@ if res is None:
return
fctx, newdata = res
- self.contents = hglib.tounicode(newdata)
+ self.contents = newdata
change = None
for pfctx in fctx.parents():
if 'x' in fctx.flags() and 'x' not in pfctx.flags():
@@ -299,7 +300,7 @@ else:
return
- self.olddata = hglib.tounicode(olddata)
+ self.olddata = olddata
newdate = util.datestr(ctx.date())
olddate = util.datestr(ctx2.date())
revs = [str(ctx), str(ctx2)]
|
Loading...