equal
deleted
inserted
replaced
6 # This software may be used and distributed according to the terms |
6 # This software may be used and distributed according to the terms |
7 # of the GNU General Public License, incorporated herein by reference. |
7 # of the GNU General Public License, incorporated herein by reference. |
8 |
8 |
9 from i18n import _ |
9 from i18n import _ |
10 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo |
10 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo |
11 import errno, lock, os, shutil, util, extensions |
11 import errno, lock, os, shutil, util, extensions, error |
12 import merge as _merge |
12 import merge as _merge |
13 import verify as _verify |
13 import verify as _verify |
14 |
14 |
15 def _local(path): |
15 def _local(path): |
16 return (os.path.isfile(util.drop_scheme('file', path)) and |
16 return (os.path.isfile(util.drop_scheme('file', path)) and |
159 # we use a lock here because if we race with commit, we |
159 # we use a lock here because if we race with commit, we |
160 # can end up with extra data in the cloned revlogs that's |
160 # can end up with extra data in the cloned revlogs that's |
161 # not pointed to by changesets, thus causing verify to |
161 # not pointed to by changesets, thus causing verify to |
162 # fail |
162 # fail |
163 src_lock = src_repo.lock() |
163 src_lock = src_repo.lock() |
164 except lock.LockException: |
164 except error.LockError: |
165 copy = False |
165 copy = False |
166 |
166 |
167 if copy: |
167 if copy: |
168 if not os.path.exists(dest): |
168 if not os.path.exists(dest): |
169 os.mkdir(dest) |
169 os.mkdir(dest) |