Commits

Marcin Kuzminski committed 34d009e

added clone_uri to API method for creating users

  • Participants
  • Parent commits f2b7beb

Comments (0)

Files changed (3)

File docs/api/api.rst

                 "owner_name" :  "<ownername>",
                 "description" : "<description> = ''",
                 "repo_type" :   "<type> = 'hg'",
-                "private" :     "<bool> = False"
+                "private" :     "<bool> = False",
+                "clone_uri" :   "<clone_uri> = None",
               }
 
 OUTPUT::

File rhodecode/controllers/api/api.py

 
     @HasPermissionAnyDecorator('hg.admin', 'hg.create.repository')
     def create_repo(self, apiuser, repo_name, owner_name, description='',
-                    repo_type='hg', private=False):
+                    repo_type='hg', private=False, clone_uri=None):
         """
-        Create a repository
+        Create repository, if clone_url is given it makes a remote clone
 
         :param apiuser:
         :param repo_name:
+        :param owner_name:
         :param description:
-        :param type:
+        :param repo_type:
         :param private:
-        :param owner_name:
+        :param clone_uri:
         """
 
         try:
                     private=private,
                     repo_type=repo_type,
                     repo_group=parent_id,
-                    clone_uri=None
+                    clone_uri=clone_uri
                 ),
                 owner
             )

File rhodecode/lib/db_manage.py

 
             def step_5(self):
                 pass
-            
+
         upgrade_steps = [0] + range(curr_version + 1, __dbversion__ + 1)
 
         # CALL THE PROPER ORDER OF STEPS TO PERFORM FULL UPGRADE