diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 15:56:49 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 15:56:49 +0100 |
commit | ec0657cf5de9aeb5629cc4f4f38b36f48490493e (patch) | |
tree | ae7f08094c6fdcddad194783f3e18b5a724c0197 /refs/log.py | |
parent | a17c43d0662bab137903075f2cff34bcabc7e1d1 (diff) | |
download | gitpython-ec0657cf5de9aeb5629cc4f4f38b36f48490493e.tar.gz |
Unified object and commit handling which should make the reflog handling much easier. There is some bug in it though, it still needs fixing
Diffstat (limited to 'refs/log.py')
-rw-r--r-- | refs/log.py | 9 |
1 files changed, 6 insertions, 3 deletions
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() |