diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -439,7 +439,7 @@ class localrepository(repo.repository): def _readbranchcache(self): partial = {} try: - f = self.opener(os.path.join("cache", "branchheads")) + f = self.opener("cache/branchheads") lines = f.read().split('\n') f.close() except (IOError, OSError): @@ -467,8 +467,7 @@ class localrepository(repo.repository): def _writebranchcache(self, branches, tip, tiprev): try: - f = self.opener(os.path.join("cache", "branchheads"), "w", - atomictemp=True) + f = self.opener("cache/branchheads", "w", atomictemp=True) f.write("%s %s\n" % (hex(tip), tiprev)) for label, nodes in branches.iteritems(): for node in nodes: diff --git a/mercurial/tags.py b/mercurial/tags.py --- a/mercurial/tags.py +++ b/mercurial/tags.py @@ -152,7 +152,7 @@ def _readtagcache(ui, repo): set, caller is responsible for reading tag info from each head.''' try: - cachefile = repo.opener(os.path.join('cache', 'tags'), 'r') + cachefile = repo.opener('cache/tags', 'r') # force reading the file for static-http cachelines = iter(cachefile) except IOError: @@ -249,8 +249,7 @@ def _readtagcache(ui, repo): def _writetagcache(ui, repo, heads, tagfnode, cachetags): try: - cachefile = repo.opener(os.path.join('cache', 'tags'), 'w', - atomictemp=True) + cachefile = repo.opener('cache/tags', 'w', atomictemp=True) except (OSError, IOError): return