Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
3852:8a9a1a7e1698 | 3853:c0b449154a90 |
---|---|
155 except OSError, inst: | 155 except OSError, inst: |
156 if inst.errno != errno.ENOENT: | 156 if inst.errno != errno.ENOENT: |
157 raise | 157 raise |
158 | 158 |
159 src_store = os.path.realpath(src_repo.spath) | 159 src_store = os.path.realpath(src_repo.spath) |
160 dest_path = os.path.realpath(os.path.join(dest, ".hg")) | |
161 dest_store = dest_path | |
162 if not os.path.exists(dest): | 160 if not os.path.exists(dest): |
163 os.mkdir(dest) | 161 os.mkdir(dest) |
162 dest_path = os.path.realpath(os.path.join(dest, ".hg")) | |
164 os.mkdir(dest_path) | 163 os.mkdir(dest_path) |
164 if src_repo.spath != src_repo.path: | |
165 dest_store = os.path.join(dest_path, "store") | |
166 os.mkdir(dest_store) | |
167 else: | |
168 dest_store = dest_path | |
165 # copy the requires file | 169 # copy the requires file |
166 force_copy(src_repo.join("requires"), | 170 force_copy(src_repo.join("requires"), |
167 os.path.join(dest_path, "requires")) | 171 os.path.join(dest_path, "requires")) |
168 # we lock here to avoid premature writing to the target | 172 # we lock here to avoid premature writing to the target |
169 dest_lock = lock.lock(os.path.join(dest_store, "lock")) | 173 dest_lock = lock.lock(os.path.join(dest_store, "lock")) |