##// END OF EJS Templates
small fixes for the parent patch...
Alexis S. L. Carvalho -
r4166:c0271aba default
parent child Browse files
Show More
@@ -41,20 +41,19 class localrepository(repo.repository):
41 41 if not os.path.exists(path):
42 42 os.mkdir(path)
43 43 os.mkdir(self.path)
44 if parentui.config('format', 'usestore', 1):
44 requirements = ["revlogv1"]
45 if parentui.configbool('format', 'usestore', True):
45 46 os.mkdir(os.path.join(self.path, "store"))
46 requirements = ("revlogv1", "store")
47 else:
48 requirements = ("revlogv1")
49 reqfile = self.opener("requires", "w")
50 for r in requirements:
51 reqfile.write("%s\n" % r)
52 reqfile.close()
47 requirements.append("store")
53 48 # create an invalid changelog
54 49 self.opener("00changelog.i", "a").write(
55 50 '\0\0\0\2' # represents revlogv2
56 51 ' dummy changelog to prevent using the old repo layout'
57 52 )
53 reqfile = self.opener("requires", "w")
54 for r in requirements:
55 reqfile.write("%s\n" % r)
56 reqfile.close()
58 57 else:
59 58 raise repo.RepoError(_("repository %s not found") % path)
60 59 elif create:
@@ -22,11 +22,31 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5
22 22 EOF
23 23 chmod +x dummyssh
24 24
25 checknewrepo()
26 {
27 name=$1
28
29 if [ -d $name/.hg/store ]; then
30 echo store created
31 fi
32
33 if [ -f $name/.hg/00changelog.i ]; then
34 echo 00changelog.i created
35 fi
36
37 cat $name/.hg/requires
38 }
39
25 40 echo "# creating 'local'"
26 41 hg init local
42 checknewrepo local
27 43 echo this > local/foo
28 44 hg ci --cwd local -A -m "init" -d "1000000 0"
29 45
46 echo "# creating repo with old format"
47 hg --config format.usestore=false init old
48 checknewrepo old
49
30 50 echo "#test failure"
31 51 hg init local
32 52
@@ -1,5 +1,11
1 1 # creating 'local'
2 store created
3 00changelog.i created
4 revlogv1
5 store
2 6 adding foo
7 # creating repo with old format
8 revlogv1
3 9 #test failure
4 10 abort: repository local already exists!
5 11 # init+push to remote2
General Comments 0
You need to be logged in to leave comments. Login now