mercurial/localrepo.py
changeset 3791 8643b9f90b51
parent 3790 f183c18568df
child 3801 bd7011246fab
--- a/mercurial/localrepo.py	Tue Dec 05 11:28:21 2006 +0100
+++ b/mercurial/localrepo.py	Tue Dec 05 11:28:23 2006 +0100
@@ -31,12 +31,15 @@
                                            " here (.hg not found)"))
             path = p
         self.path = os.path.join(path, ".hg")
+        self.spath = self.path
 
         if not os.path.isdir(self.path):
             if create:
                 if not os.path.exists(path):
                     os.mkdir(path)
                 os.mkdir(self.path)
+                if self.spath != self.path:
+                    os.mkdir(self.spath)
             else:
                 raise repo.RepoError(_("repository %s not found") % path)
         elif create:
@@ -46,7 +49,7 @@
         self.origroot = path
         self.ui = ui.ui(parentui=parentui)
         self.opener = util.opener(self.path)
-        self.sopener = util.opener(self.path)
+        self.sopener = util.opener(self.spath)
         self.wopener = util.opener(self.root)
 
         try:
@@ -395,7 +398,7 @@
         return os.path.join(self.path, f)
 
     def sjoin(self, f):
-        return os.path.join(self.path, f)
+        return os.path.join(self.spath, f)
 
     def wjoin(self, f):
         return os.path.join(self.root, f)