|
32 | 32 | classRefLogEntry(tuple): |
33 | 33 |
|
34 | 34 | """Named tuple allowing easy access to the revlog data fields""" |
35 | | -_fmt="%s %s %s <%s> %i %s\t%s\n" |
36 | 35 | _re_hexsha_only=re.compile('^[0-9A-Fa-f]{40}$') |
37 | 36 | __slots__=tuple() |
38 | 37 |
|
39 | 38 | def__repr__(self): |
40 | 39 | """Representation of ourselves in git reflog format""" |
41 | 40 | act=self.actor |
42 | 41 | time=self.time |
43 | | -returnself._fmt% (self.oldhexsha,self.newhexsha,act.name,act.email, |
44 | | -time[0],altz_to_utctz_str(time[1]),self.message) |
45 | | - |
| 42 | +returnu"{0} {1} {2} <{3}> {4!s} {5}\t{6}\n".format(self.oldhexsha,self.newhexsha,act.name,act.email, |
| 43 | +time[0],altz_to_utctz_str(time[1]),self.message).encode("utf-8") |
46 | 44 | @property |
47 | 45 | defoldhexsha(self): |
48 | 46 | """The hexsha to the commit the ref pointed to before the change""" |
@@ -267,7 +265,6 @@ def append_entry(cls, config_reader, filepath, oldbinsha, newbinsha, message): |
267 | 265 |
|
268 | 266 | lf=LockFile(filepath) |
269 | 267 | lf._obtain_lock_or_raise() |
270 | | - |
271 | 268 | fd=open(filepath,'ab') |
272 | 269 | try: |
273 | 270 | fd.write(repr(entry).encode(defenc)) |
|