##// END OF EJS Templates
clone: simplifying dest repo creation...
Benoit Boissinot -
r3037:3acb76f0 default
parent child Browse files
Show More
@@ -127,12 +127,7 b' def clone(ui, source, dest=None, pull=Fa'
127 if self.dir_:
127 if self.dir_:
128 self.rmtree(self.dir_, True)
128 self.rmtree(self.dir_, True)
129
129
130 dest_repo = None
130 dest_repo = repository(ui, dest, create=True)
131 try:
132 dest_repo = repository(ui, dest)
133 raise util.Abort(_("destination '%s' already exists." % dest))
134 except RepoError:
135 dest_repo = repository(ui, dest, create=True)
136
131
137 dest_path = None
132 dest_path = None
138 dir_cleanup = None
133 dir_cleanup = None
@@ -27,6 +27,9 b' hg init local'
27 echo this > local/foo
27 echo this > local/foo
28 hg ci --cwd local -A -m "init" -d "1000000 0"
28 hg ci --cwd local -A -m "init" -d "1000000 0"
29
29
30 echo "#test failure"
31 hg init local
32
30 echo "# init+push to remote2"
33 echo "# init+push to remote2"
31 hg init -e ./dummyssh ssh://user@dummy/remote2
34 hg init -e ./dummyssh ssh://user@dummy/remote2
32 hg incoming -R remote2 local
35 hg incoming -R remote2 local
@@ -35,6 +38,12 b' hg push -R local -e ./dummyssh ssh://use'
35 echo "# clone to remote1"
38 echo "# clone to remote1"
36 hg clone -e ./dummyssh local ssh://user@dummy/remote1
39 hg clone -e ./dummyssh local ssh://user@dummy/remote1
37
40
41 echo "# init to existing repo"
42 hg init -e ./dummyssh ssh://user@dummy/remote1
43
44 echo "# clone to existing repo"
45 hg clone -e ./dummyssh local ssh://user@dummy/remote1
46
38 echo "# output of dummyssh"
47 echo "# output of dummyssh"
39 cat dummylog
48 cat dummylog
40
49
@@ -1,5 +1,7 b''
1 # creating 'local'
1 # creating 'local'
2 adding foo
2 adding foo
3 #test failure
4 abort: repository local already exists!
3 # init+push to remote2
5 # init+push to remote2
4 remote: abort: repository remote2 not found!
6 remote: abort: repository remote2 not found!
5 changeset: 0:c4e059d443be
7 changeset: 0:c4e059d443be
@@ -17,19 +19,23 b' remote: added 1 changesets with 1 change'
17 # clone to remote1
19 # clone to remote1
18 remote: abort: repository remote1 not found!
20 remote: abort: repository remote1 not found!
19 searching for changes
21 searching for changes
20 remote: abort: repository remote1 not found!
21 remote: adding changesets
22 remote: adding changesets
22 remote: adding manifests
23 remote: adding manifests
23 remote: adding file changes
24 remote: adding file changes
24 remote: added 1 changesets with 1 changes to 1 files
25 remote: added 1 changesets with 1 changes to 1 files
26 # init to existing repo
27 abort: repository ssh://user@dummy/remote1 already exists!
28 # clone to existing repo
29 abort: repository ssh://user@dummy/remote1 already exists!
25 # output of dummyssh
30 # output of dummyssh
26 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5:
31 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5:
27 Got arguments 1:user@dummy 2:hg init remote2 3: 4: 5:
32 Got arguments 1:user@dummy 2:hg init remote2 3: 4: 5:
28 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5:
33 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5:
29 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5:
34 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5:
30 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5:
35 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5:
36 Got arguments 1:user@dummy 2:hg init remote1 3: 4: 5:
31 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5:
37 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5:
32 Got arguments 1:user@dummy 2:hg init remote1 3: 4: 5:
38 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5:
33 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5:
39 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5:
34 # comparing repositories
40 # comparing repositories
35 0:c4e059d443be
41 0:c4e059d443be
General Comments 0
You need to be logged in to leave comments. Login now