From ec0657cf5de9aeb5629cc4f4f38b36f48490493e Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 24 Nov 2010 15:56:49 +0100 Subject: Unified object and commit handling which should make the reflog handling much easier. There is some bug in it though, it still needs fixing --- refs/log.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'refs/log.py') diff --git a/refs/log.py b/refs/log.py index 9728911a..129803b4 100644 --- a/refs/log.py +++ b/refs/log.py @@ -191,8 +191,11 @@ class RefLog(list, Serializable): #END handle change @classmethod - def append_entry(cls, filepath, oldbinsha, newbinsha, message): - """Append a new log entry to the revlog at filepath. + def append_entry(cls, config_reader, filepath, oldbinsha, newbinsha, message): + """Append a new log entry to the revlog at filepath. + :param config_reader: configuration reader of the repository - used to obtain + user information. May be None + :param filepath: full path to the log file :param oldbinsha: binary sha of the previous commit :param newbinsha: binary sha of the current commit :param message: message describing the change to the reference @@ -205,7 +208,7 @@ class RefLog(list, Serializable): raise ValueError("Shas need to be given in binary format") #END handle sha type assure_directory_exists(filepath, is_file=True) - entry = RefLogEntry((bin_to_hex(oldbinsha), bin_to_hex(newbinsha), Actor.committer(), (int(time.time()), time.altzone), message)) + entry = RefLogEntry((bin_to_hex(oldbinsha), bin_to_hex(newbinsha), Actor.committer(config_reader), (int(time.time()), time.altzone), message)) lf = LockFile(filepath) lf._obtain_lock_or_raise() -- cgit v1.2.1