... |
... |
@@ -113,7 +113,8 @@ class GitMirror(): |
113
|
113
|
#
|
114
|
114
|
with self.source.tempdir() as tmpdir:
|
115
|
115
|
self.source.call([self.source.host_git, 'clone', '--mirror', '-n', self.url, tmpdir],
|
116
|
|
- fail="Failed to clone git repository {}".format(self.url))
|
|
116
|
+ fail="Failed to clone git repository {}".format(self.url),
|
|
117
|
+ fail_temporarily=True)
|
117
|
118
|
|
118
|
119
|
try:
|
119
|
120
|
shutil.move(tmpdir, self.mirror)
|
... |
... |
@@ -124,6 +125,7 @@ class GitMirror(): |
124
|
125
|
def fetch(self):
|
125
|
126
|
self.source.call([self.source.host_git, 'fetch', 'origin', '--prune'],
|
126
|
127
|
fail="Failed to fetch from remote git repository: {}".format(self.url),
|
|
128
|
+ fail_temporarily=True,
|
127
|
129
|
cwd=self.mirror)
|
128
|
130
|
|
129
|
131
|
def has_ref(self):
|
... |
... |
@@ -157,7 +159,8 @@ class GitMirror(): |
157
|
159
|
# case we're just checking out a specific commit and then removing the .git/
|
158
|
160
|
# directory.
|
159
|
161
|
self.source.call([self.source.host_git, 'clone', '--no-checkout', '--shared', self.mirror, fullpath],
|
160
|
|
- fail="Failed to create git mirror {} in directory: {}".format(self.mirror, fullpath))
|
|
162
|
+ fail="Failed to create git mirror {} in directory: {}".format(self.mirror, fullpath),
|
|
163
|
+ fail_temporarily=True)
|
161
|
164
|
|
162
|
165
|
self.source.call([self.source.host_git, 'checkout', '--force', self.ref],
|
163
|
166
|
fail="Failed to checkout git ref {}".format(self.ref),
|
... |
... |
@@ -170,7 +173,8 @@ class GitMirror(): |
170
|
173
|
fullpath = os.path.join(directory, self.path)
|
171
|
174
|
|
172
|
175
|
self.source.call([self.source.host_git, 'clone', '--no-checkout', self.mirror, fullpath],
|
173
|
|
- fail="Failed to clone git mirror {} in directory: {}".format(self.mirror, fullpath))
|
|
176
|
+ fail="Failed to clone git mirror {} in directory: {}".format(self.mirror, fullpath),
|
|
177
|
+ fail_temporarily=True)
|
174
|
178
|
|
175
|
179
|
self.source.call([self.source.host_git, 'remote', 'set-url', 'origin', self.url],
|
176
|
180
|
fail='Failed to add remote origin "{}"'.format(self.url),
|