| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d83f6e8 commit 4fd7b94
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,17 +32,15 @@ | |||
| 32 | 32 | class RefLogEntry(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 | - return self._fmt % (self.oldhexsha, self.newhexsha, act.name, act.email, | ||
| 44 | - time[0], altz_to_utctz_str(time[1]), self.message) | ||
| 45 | - | ||
| 42 | + return u"{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 | def oldhexsha(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)) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments