equal
deleted
inserted
replaced
166 src_lock = src_repo.lock() |
166 src_lock = src_repo.lock() |
167 except error.LockError: |
167 except error.LockError: |
168 copy = False |
168 copy = False |
169 |
169 |
170 if copy: |
170 if copy: |
|
171 hgdir = os.path.realpath(os.path.join(dest, ".hg")) |
171 if not os.path.exists(dest): |
172 if not os.path.exists(dest): |
172 os.mkdir(dest) |
173 os.mkdir(dest) |
|
174 else: |
|
175 # only clean up directories we create ourselves |
|
176 dir_cleanup.dir_ = hgdir |
173 try: |
177 try: |
174 dest_path = os.path.realpath(os.path.join(dest, ".hg")) |
178 dest_path = hgdir |
175 os.mkdir(dest_path) |
179 os.mkdir(dest_path) |
176 except OSError, inst: |
180 except OSError, inst: |
177 if inst.errno == errno.EEXIST: |
181 if inst.errno == errno.EEXIST: |
178 dir_cleanup.close() |
182 dir_cleanup.close() |
179 raise util.Abort(_("destination '%s' already exists") |
183 raise util.Abort(_("destination '%s' already exists") |