Commits

Andrew Godwin committed 604d819

Don't make all commits as "SVN User" (patch from jespern)

Comments (0)

Files changed (1)

heechee/webdav/commit.py

             (k.encode("utf8"), v['svndiff']) for k, v in activity_info.items()
             if k != "!svnrev"
         )
-        
+                
         # Split it into parts for each trunk/tag/branch
         # We only support commiting to existing branches,
         # and not at all to tags, as otherwise it'd be a nightmare.
                 branches[branch_name] = {}
             branches[branch_name][path] = diff
         
+        # Find username
+        username = request.remote_user or request.environ.get('REMOTE_USER', 'SVN user')
+        
         # For each part, do the right kind of commit
         for branch_name, files in branches.items():
             # Commit
                 branch_name,
                 base_version,
                 log_message,
-                "SVN user",
+                username,
                 # Changed files
                 dict([(key, diff) for key, diff in files.items() if diff is not False]),
                 # Deleted files