gitlabber 1.2.0__tar.gz → 1.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. {gitlabber-1.2.0/gitlabber.egg-info → gitlabber-1.2.1}/PKG-INFO +1 -1
  2. gitlabber-1.2.1/gitlabber/__init__.py +1 -0
  3. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/git.py +8 -8
  4. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/gitlab_tree.py +14 -6
  5. {gitlabber-1.2.0 → gitlabber-1.2.1/gitlabber.egg-info}/PKG-INFO +1 -1
  6. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_integration.cpython-311-pytest-8.2.2.pyc +0 -0
  7. gitlabber-1.2.0/gitlabber/__init__.py +0 -1
  8. {gitlabber-1.2.0 → gitlabber-1.2.1}/LICENSE.txt +0 -0
  9. {gitlabber-1.2.0 → gitlabber-1.2.1}/MANIFEST.in +0 -0
  10. {gitlabber-1.2.0 → gitlabber-1.2.1}/README.rst +0 -0
  11. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/__main__.py +0 -0
  12. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/archive.py +0 -0
  13. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/cli.py +0 -0
  14. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/format.py +0 -0
  15. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/method.py +0 -0
  16. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/naming.py +0 -0
  17. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber/progress.py +0 -0
  18. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber.egg-info/SOURCES.txt +0 -0
  19. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber.egg-info/dependency_links.txt +0 -0
  20. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber.egg-info/entry_points.txt +0 -0
  21. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber.egg-info/requires.txt +0 -0
  22. {gitlabber-1.2.0 → gitlabber-1.2.1}/gitlabber.egg-info/top_level.txt +0 -0
  23. {gitlabber-1.2.0 → gitlabber-1.2.1}/setup.cfg +0 -0
  24. {gitlabber-1.2.0 → gitlabber-1.2.1}/setup.py +0 -0
  25. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__init__.py +0 -0
  26. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/__init__.cpython-311.pyc +0 -0
  27. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/gitlab_test_utils.cpython-311.pyc +0 -0
  28. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/io_test_util.cpython-311.pyc +0 -0
  29. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_archive.cpython-311-pytest-8.2.2.pyc +0 -0
  30. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_cli.cpython-311-pytest-8.2.2.pyc +0 -0
  31. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_e2e.cpython-311-pytest-8.2.2.pyc +0 -0
  32. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_format.cpython-311-pytest-8.2.2.pyc +0 -0
  33. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_git.cpython-311-pytest-8.2.2.pyc +0 -0
  34. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_gitlab_tree.cpython-311-pytest-8.2.2.pyc +0 -0
  35. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_method.cpython-311-pytest-8.2.2.pyc +0 -0
  36. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/__pycache__/test_naming.cpython-311-pytest-8.2.2.pyc +0 -0
  37. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/gitlab_test_utils.py +0 -0
  38. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/io_test_util.py +0 -0
  39. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test-input.yaml +0 -0
  40. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test-output.json +0 -0
  41. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test-output.tree +0 -0
  42. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test-output.yaml +0 -0
  43. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_archive.py +0 -0
  44. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_cli.py +0 -0
  45. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_e2e.py +0 -0
  46. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_format.py +0 -0
  47. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_git.py +0 -0
  48. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_gitlab_tree.py +0 -0
  49. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_integration.py +0 -0
  50. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_method.py +0 -0
  51. {gitlabber-1.2.0 → gitlabber-1.2.1}/tests/test_naming.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitlabber
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: A Gitlab clone/pull utility for backing up or cloning Gitlab groups
5
5
  Home-page: https://github.com/ezbz/gitlabber
6
6
  Download-URL: https://github.com/ezbz/gitlabber/archive/master.zip
@@ -0,0 +1 @@
1
+ __version__ = '1.2.1'
@@ -12,33 +12,33 @@ progress = ProgressBar('* syncing projects')
12
12
 
13
13
 
14
14
  class GitAction:
15
- def __init__(self, node, path, recursive=False, use_fetch=False, inline_token=False):
15
+ def __init__(self, node, path, recursive=False, use_fetch=False, hide_token=False):
16
16
  self.node = node
17
17
  self.path = path
18
18
  self.recursive = recursive
19
19
  self.use_fetch = use_fetch
20
- self.inline_token = inline_token
20
+ self.hide_token = hide_token
21
21
 
22
- def sync_tree(root, dest, concurrency=1, disable_progress=False, recursive=False, use_fetch=False, inline_token=False):
22
+ def sync_tree(root, dest, concurrency=1, disable_progress=False, recursive=False, use_fetch=False, hide_token=False):
23
23
  if not disable_progress:
24
24
  progress.init_progress(len(root.leaves))
25
- actions = get_git_actions(root, dest, recursive, use_fetch, inline_token)
25
+ actions = get_git_actions(root, dest, recursive, use_fetch, hide_token)
26
26
  with concurrent.futures.ThreadPoolExecutor(max_workers=concurrency) as executor:
27
27
  executor.map(clone_or_pull_project, actions)
28
28
  elapsed = progress.finish_progress()
29
29
  log.debug("Syncing projects took [%s]", elapsed)
30
30
 
31
31
 
32
- def get_git_actions(root, dest, recursive, use_fetch, inline_token):
32
+ def get_git_actions(root, dest, recursive, use_fetch, hide_token):
33
33
  actions = []
34
34
  for child in root.children:
35
35
  path = "%s%s" % (dest, child.root_path)
36
36
  if not os.path.exists(path):
37
37
  os.makedirs(path)
38
38
  if child.is_leaf:
39
- actions.append(GitAction(child, path, recursive, use_fetch, inline_token))
39
+ actions.append(GitAction(child, path, recursive, use_fetch, hide_token))
40
40
  if not child.is_leaf:
41
- actions.extend(get_git_actions(child, dest, recursive, use_fetch, inline_token))
41
+ actions.extend(get_git_actions(child, dest, recursive, use_fetch, hide_token))
42
42
  return actions
43
43
 
44
44
 
@@ -80,7 +80,7 @@ def clone_or_pull_project(action):
80
80
  if(action.recursive):
81
81
  multi_options.append('--recursive')
82
82
  if(action.use_fetch):
83
- multi_options.append('--mirror')
83
+ multi_options.append('--mirror')
84
84
  try:
85
85
  git.Repo.clone_from(action.node.url, action.path, multi_options=multi_options)
86
86
 
@@ -125,12 +125,20 @@ class GitlabTree:
125
125
  subgroups = group.subgroups.list(as_list=False, archived=self.archived)
126
126
  self.progress.update_progress_length(len(subgroups))
127
127
  for subgroup_def in subgroups:
128
- subgroup = self.gitlab.groups.get(subgroup_def.id)
129
- subgroup_id = subgroup.name if self.naming == FolderNaming.NAME else subgroup.path
130
- node = self.make_node(subgroup_id, parent, url=subgroup.web_url)
131
- self.progress.show_progress(node.name, 'group')
132
- self.get_subgroups(subgroup, node)
133
- self.get_projects(subgroup, node)
128
+ try:
129
+ subgroup = self.gitlab.groups.get(subgroup_def.id)
130
+ subgroup_id = subgroup.name if self.naming == FolderNaming.NAME else subgroup.path
131
+ node = self.make_node(subgroup_id, parent, url=subgroup.web_url)
132
+ self.progress.show_progress(node.name, 'group')
133
+ self.get_subgroups(subgroup, node)
134
+ self.get_projects(subgroup, node)
135
+ except GitlabListError as error:
136
+ if error.response_code == 404:
137
+ log.error(f"{error.response_code} error while listing subgroup with name: {group.name} [id: {group.id}]. Check your permissions as you may not have access to it. Message: {error.error_message}")
138
+ continue
139
+ else:
140
+ raise error
141
+
134
142
 
135
143
 
136
144
  def load_gitlab_tree(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitlabber
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: A Gitlab clone/pull utility for backing up or cloning Gitlab groups
5
5
  Home-page: https://github.com/ezbz/gitlabber
6
6
  Download-URL: https://github.com/ezbz/gitlabber/archive/master.zip
@@ -1 +0,0 @@
1
- __version__ = '1.2.0'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes