# HG changeset patch # User Benoit Boissinot # Date 1220021411 -7200 # Node ID 7e5f3480c45b432e7e5ee8e08fa95be89f4b282f # Parent 2ca70663ded3206a118fb55c654aeb8a97becdf6 fix regression on empty repo cloning introduced by 0642d9d7ec80 The store directory wasn't copied. Unconditionally create the directories instead. diff -r 2ca70663ded3 -r 7e5f3480c45b mercurial/hg.py --- a/mercurial/hg.py Thu Aug 28 13:06:24 2008 +0200 +++ b/mercurial/hg.py Fri Aug 29 16:50:11 2008 +0200 @@ -178,11 +178,11 @@ for f in src_repo.store.copylist(): src = os.path.join(src_repo.path, f) + dst = os.path.join(dest_path, f) + dstbase = os.path.dirname(dst) + if dstbase and not os.path.exists(dstbase): + os.mkdir(dstbase) if os.path.exists(src): - dst = os.path.join(dest_path, f) - dstbase = os.path.dirname(dst) - if not os.path.exists(dstbase): - os.mkdir(dstbase) if dst.endswith('data'): # lock to avoid premature writing to the target dest_lock = lock.lock(os.path.join(dstbase, "lock")) diff -r 2ca70663ded3 -r 7e5f3480c45b tests/test-empty --- a/tests/test-empty Thu Aug 28 13:06:24 2008 +0200 +++ b/tests/test-empty Fri Aug 29 16:50:11 2008 +0200 @@ -1,7 +1,17 @@ #!/bin/sh -hg init +hg init a +cd a hg log hg grep wah hg manifest hg verify +ls .hg +ls .hg/store + +cd .. +hg clone a b +cd b +hg verify +ls .hg +ls .hg/store diff -r 2ca70663ded3 -r 7e5f3480c45b tests/test-empty.out --- a/tests/test-empty.out Thu Aug 28 13:06:24 2008 +0200 +++ b/tests/test-empty.out Fri Aug 29 16:50:11 2008 +0200 @@ -3,3 +3,19 @@ crosschecking files in changesets and manifests checking files 0 files, 0 changesets, 0 total revisions +00changelog.i +requires +store +updating working directory +0 files updated, 0 files merged, 0 files removed, 0 files unresolved +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +0 files, 0 changesets, 0 total revisions +00changelog.i +branch +dirstate +hgrc +requires +store