Changeset - 26193dba1f0e
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-06-13 21:48:00
marcin@python-works.com
Fixed deprecation warning on dulwich commit api + fixed commit message add blank at the end
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/vcs/backends/git/inmemory.py
Show inline comments
 
@@ -80,13 +80,14 @@ class GitInMemoryChangeset(BaseInMemoryC
 
                    #newtree.add(DIRMOD, dirname, curtree.id)
 
                    newtree[dirname] = DIRMOD, curtree.id
 
                    new_trees.append(newtree)
 
                    curtree = newtree
 
                parent[reversed_dirnames[-1]] = DIRMOD, curtree.id
 
            else:
 
                parent.add(node.mode, node_path, blob.id)
 
                parent.add(name=node_path, mode=node.mode, hexsha=blob.id)
 

	
 
            new_trees.append(parent)
 
            # Update ancestors
 
            for parent, tree, path in reversed([(a[1], b[1], b[0]) for a, b in
 
                zip(ancestors, ancestors[1:])]):
 
                parent[path] = DIRMOD, tree.id
 
                object_store.add_object(tree)
 
@@ -120,13 +121,13 @@ class GitInMemoryChangeset(BaseInMemoryC
 
        # Create commit
 
        commit = objects.Commit()
 
        commit.tree = commit_tree.id
 
        commit.parents = [p._commit.id for p in self.parents if p]
 
        commit.author = commit.committer = safe_str(author)
 
        commit.encoding = ENCODING
 
        commit.message = safe_str(message) + ' '
 
        commit.message = safe_str(message)
 

	
 
        # Compute date
 
        if date is None:
 
            date = time.time()
 
        elif isinstance(date, datetime.datetime):
 
            date = time.mktime(date.timetuple())
0 comments (0 inline, 0 general)