comparison mercurial/hg.py @ 3713:8ae88ed2a3b6

don't create the .hg/data at init time
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 27 Nov 2006 22:22:44 +0100
parents 69cf255a55a1
children 8643b9f90b51
comparison
equal deleted inserted replaced
3712:1bd70d40ec57 3713:8ae88ed2a3b6
154 154
155 if copy: 155 if copy:
156 # we lock here to avoid premature writing to the target 156 # we lock here to avoid premature writing to the target
157 dest_lock = lock.lock(os.path.join(dest_path, ".hg", "lock")) 157 dest_lock = lock.lock(os.path.join(dest_path, ".hg", "lock"))
158 158
159 # we need to remove the (empty) data dir in dest so copyfiles 159 files = ("data",
160 # can do its work 160 "00manifest.d", "00manifest.i",
161 os.rmdir(os.path.join(dest_path, ".hg", "data")) 161 "00changelog.d", "00changelog.i")
162 files = "data 00manifest.d 00manifest.i 00changelog.d 00changelog.i" 162 for f in files:
163 for f in files.split():
164 src = os.path.join(source, ".hg", f) 163 src = os.path.join(source, ".hg", f)
165 dst = os.path.join(dest_path, ".hg", f) 164 dst = os.path.join(dest_path, ".hg", f)
166 try: 165 try:
167 util.copyfiles(src, dst) 166 util.copyfiles(src, dst)
168 except OSError, inst: 167 except OSError, inst: