diff mercurial/hg.py @ 3853:c0b449154a90

switch to the .hg/store layout, fix the tests
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 01 Dec 2006 13:34:09 +0100
parents 8f18e31c4441
children 4f6db0233606
line wrap: on
line diff
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -157,11 +157,15 @@ def clone(ui, source, dest=None, pull=Fa
                     raise
 
         src_store = os.path.realpath(src_repo.spath)
-        dest_path = os.path.realpath(os.path.join(dest, ".hg"))
-        dest_store = dest_path
         if not os.path.exists(dest):
             os.mkdir(dest)
+        dest_path = os.path.realpath(os.path.join(dest, ".hg"))
         os.mkdir(dest_path)
+        if src_repo.spath != src_repo.path:
+            dest_store = os.path.join(dest_path, "store")
+            os.mkdir(dest_store)
+        else:
+            dest_store = dest_path
         # copy the requires file
         force_copy(src_repo.join("requires"),
                    os.path.join(dest_path, "requires"))