Modify ↓
Opened 20 years ago
Closed 20 years ago
#1054 closed defect (fixed)
incorrect file diff result in changeset view
Reported by: | anonymous | Owned by: | Christopher Lenz |
---|---|---|---|
Priority: | normal | Milestone: | 0.8.1 |
Component: | version control/changeset view | Version: | 0.8 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Attachments (4)
Change History (8)
by , 20 years ago
comment:2 by , 20 years ago
Description: | modified (diff) |
---|---|
Milestone: | → 0.8.1 |
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 20 years ago
Argh, I didn't see the patch before doing my own fix. Bah, just for fun then…
-
trac/Diff.py
=== trac/Diff.py ==================================================================
39 39 self.blockno = 0 40 40 self.offset_base = 0 41 41 self.offset_changed = 0 42 self.blocklen = 0 42 43 43 44 def _escape(self, text): 44 45 return space_re.sub(lambda m: … … 91 92 self.blockno += 1 92 93 93 94 def writeline(self, text): 94 if text[0:2] in ['++', '--']: 95 if self.blocklen <= 0: # we're in the header 96 match = line_re.search(text) 97 if match: 98 self.print_block() 99 self.changeno += 1 100 self.blockno = 0 101 self.offset_base = int(match.group(1)) - 1 102 self.offset_changed = int(match.group(3)) - 1 103 self.blocklen = int(match.group(2)) + int(match.group(4)) 95 104 return 96 match = line_re.search(text)97 if match:98 self.print_block()99 self.changeno += 1100 self.blockno = 0101 self.offset_base = int(match.group(1)) - 1102 self.offset_changed = int(match.group(3)) - 1103 return104 105 ttype = text[0] 105 106 text = text[1:] 106 107 text = text.expandtabs(self.tabwidth) 108 if ttype == ' ': 109 self.blocklen -= 2 110 else: 111 self.blocklen -= 1 107 112 if ttype == self.ttype: 108 113 self.block.append(text) 109 114 else:
comment:4 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
'-1' → '-2'