1. Josh VanderLinden
  2. hgext

Commits

Josh VanderLinden  committed 4fbb7bc

Made sure that a repository could still be cloned to new directory

  • Participants
  • Parent commits 102ef39
  • Branches default

Comments (0)

Files changed (1)

File neclone.py

View file
  • Ignore whitespace
     # generate a random directory name to house the cloned repo temporarily
     hash = sha1(str(random())).hexdigest()
     tmp_dest = os.path.join(base, hash)
-    os.mkdir(tmp_dest)
+
+    # ensure that our temporary directory exists
+    try:
+        os.makedirs(tmp_dest)
+    except OSError, err:
+        pass
 
     # clone the repo
     opts['noupdate'] = True