from django.contrib.auth.decorators import login_required
from explorer import forms, models
from django.contrib.auth.decorators import login_required
from explorer import forms, models
- repo.add_file(path, form.cleaned_data['text'])
+ # save the changes to a local branch
+# repo.write_lock()
+ print request.user
+# repo.switch_to_branch(request.user.name)
+# repo.add_file(path, form.cleaned_data['text'])
# add references to comment
issues = _get_issues_for_file(path)
commit_message = _add_references(form.cleaned_data['commit_message'], issues)
print 'Commiting with: ' + commit_message
# add references to comment
issues = _get_issues_for_file(path)
commit_message = _add_references(form.cleaned_data['commit_message'], issues)
print 'Commiting with: ' + commit_message
- repo.commit(message=commit_message, user=form.cleaned_data['user'])
- return HttpResponseRedirect(request.get_full_path())
+# repo.commit(message=commit_message, user=form.cleaned_data['user'])
+ return HttpResponse( json.dumps({'message': commit_message}) )