Skip to content

Commit

Permalink
Merge pull request #25 from kitsonk/master
Browse files Browse the repository at this point in the history
Fixes issue with adding files via the website and Git integration, fixes #20
  • Loading branch information
kitsonk committed Jul 25, 2012
2 parents 5935267 + af29117 commit f281905
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/docserver.py
Expand Up @@ -159,14 +159,15 @@ def _handlePost(self, *args, **kwargs):
try:
if cherrypy.request.app.vcs is not None:

# need to check doc.isNew here, and vcs.add() ? it?
user = cherrypy.session.get("user", None)
_user = user.get("uname", "")
_email = user.get("mail", "")

author = "%s <%s>" % (_user, _email)
print "Send Commit to VCS system"
print " Message: %s" % (message)
# Should be able to just cheat and always add
cherrypy.request.app.vcs.add(cherrypy.request.resourceFilePath)
cherrypy.request.app.vcs.commit(cherrypy.request.resourceFilePath, message=message, author=author)
except Exception, err:
print "Error committing to VCS: %s" % err
Expand Down

0 comments on commit f281905

Please sign in to comment.