|
|
@ -13,11 +13,11 @@ import logging
|
|
|
|
import optparse
|
|
|
|
import optparse
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import re
|
|
|
|
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import tempfile
|
|
|
|
import tempfile
|
|
|
|
import threading
|
|
|
|
import threading
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
import urlparse
|
|
|
|
import urlparse
|
|
|
@ -495,6 +495,11 @@ class Mirror(object):
|
|
|
|
# Re-bootstrapping an existing mirror; preserve existing fetch spec.
|
|
|
|
# Re-bootstrapping an existing mirror; preserve existing fetch spec.
|
|
|
|
self._preserve_fetchspec()
|
|
|
|
self._preserve_fetchspec()
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
if os.path.exists(self.mirror_path):
|
|
|
|
|
|
|
|
# If the mirror path exists but self.exists() returns false, we're
|
|
|
|
|
|
|
|
# in an unexpected state. Nuke the previous mirror directory and
|
|
|
|
|
|
|
|
# start fresh.
|
|
|
|
|
|
|
|
gclient_utils.rmtree(self.mirror_path)
|
|
|
|
os.mkdir(self.mirror_path)
|
|
|
|
os.mkdir(self.mirror_path)
|
|
|
|
|
|
|
|
|
|
|
|
bootstrapped = (not depth and bootstrap and
|
|
|
|
bootstrapped = (not depth and bootstrap and
|
|
|
@ -864,4 +869,4 @@ if __name__ == '__main__':
|
|
|
|
sys.exit(main(sys.argv[1:]))
|
|
|
|
sys.exit(main(sys.argv[1:]))
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
sys.stderr.write('interrupted\n')
|
|
|
|
sys.stderr.write('interrupted\n')
|
|
|
|
sys.exit(1)
|
|
|
|
sys.exit(1)
|
|
|
|