@@ -882,7 +882,8 @@ def protect(self, developers_can_push=False, developers_can_merge=False,
882882 GitlabAuthenticationError: If authentication is not correct
883883 GitlabProtectError: If the branch could not be protected
884884 """
885- path = '%s/%s/protect' % (self .manager .path ,self .get_id ())
885+ id = self .get_id ().replace ('/' ,'%2F' )
886+ path = '%s/%s/protect' % (self .manager .path ,id )
886887post_data = {'developers_can_push' :developers_can_push ,
887888'developers_can_merge' :developers_can_merge }
888889self .manager .gitlab .http_put (path ,post_data = post_data ,** kwargs )
@@ -900,7 +901,8 @@ def unprotect(self, **kwargs):
900901 GitlabAuthenticationError: If authentication is not correct
901902 GitlabProtectError: If the branch could not be unprotected
902903 """
903- path = '%s/%s/unprotect' % (self .manager .path ,self .get_id ())
904+ id = self .get_id ().replace ('/' ,'%2F' )
905+ path = '%s/%s/unprotect' % (self .manager .path ,id )
904906self .manager .gitlab .http_put (path ,** kwargs )
905907self ._attrs ['protected' ]= False
906908