@login_required
def resetrepo(request):
 if (request.method != 'POST'):
  return HttpResponseNotAllowed(['POST'])
 view_helpers.SvnRepository(request.user.username).reset()
 view_helpers.unset_mission_completed(request.user.get_profile(), 'svn_checkout')
 view_helpers.unset_mission_completed(request.user.get_profile(), 'svn_diff')
 view_helpers.unset_mission_completed(request.user.get_profile(), 'svn_commit')
 if ('stay_on_this_page' in request.GET):
  return HttpResponseRedirect(reverse('svn_main_page'))
 else:
  return HttpResponseRedirect(reverse('svn_checkout'))

@ login_required def resetrepo ( request ) : if ( request . method != 'POST' ) : return HttpResponseNotAllowed ( [ 'POST' ] ) view_helpers . SvnRepository ( request . user . username ) . reset ( ) view_helpers . unset_mission_completed ( request . user . get_profile ( ) , 'svn_checkout' ) view_helpers . unset_mission_completed ( request . user . get_profile ( ) , 'svn_diff' ) view_helpers . unset_mission_completed ( request . user . get_profile ( ) , 'svn_commit' ) if ( 'stay_on_this_page' in request . GET ) : return HttpResponseRedirect ( reverse ( 'svn_main_page' ) ) else : return HttpResponseRedirect ( reverse ( 'svn_checkout' ) )
reset a users mission repository and mark steps as uncompleted .