# HG changeset patch # User Martin Geisler # Date 1315470042 -7200 # Node ID 650d81a313cb6c3ea26cef8e183a6df223e42617 # Parent 73307643a09f4a34dfdbcdf9d65b9645406b41a1 convert: use repo.join instead of referencing ".hg" directly diff -r 73307643a09f -r 650d81a313cb hgext/convert/hg.py --- a/hgext/convert/hg.py Thu Sep 01 12:29:24 2011 +0200 +++ b/hgext/convert/hg.py Thu Sep 08 10:20:42 2011 +0200 @@ -70,10 +70,10 @@ self.wlock.release() def revmapfile(self): - return os.path.join(self.path, ".hg", "shamap") + return self.repo.join("shamap") def authorfile(self): - return os.path.join(self.path, ".hg", "authormap") + return self.repo.join("authormap") def getheads(self): h = self.repo.changelog.heads() @@ -364,8 +364,7 @@ def converted(self, rev, destrev): if self.convertfp is None: - self.convertfp = open(os.path.join(self.path, '.hg', 'shamap'), - 'a') + self.convertfp = open(self.repo.join('shamap'), 'a') self.convertfp.write('%s %s\n' % (destrev, rev)) self.convertfp.flush() diff -r 73307643a09f -r 650d81a313cb tests/test-convert-authormap.t --- a/tests/test-convert-authormap.t Thu Sep 01 12:29:24 2011 +0200 +++ b/tests/test-convert-authormap.t Thu Sep 08 10:20:42 2011 +0200 @@ -27,7 +27,7 @@ sorting... converting... 0 foo - Writing author map file new/.hg/authormap + Writing author map file $TESTTMP/new/.hg/authormap $ cat new/.hg/authormap user name=Long User Name $ hg -Rnew log @@ -44,7 +44,7 @@ $ hg init new $ mv authormap.txt new/.hg/authormap $ hg convert orig new - Ignoring bad line in author map file new/.hg/authormap: this line is ignored + Ignoring bad line in author map file $TESTTMP/new/.hg/authormap: this line is ignored scanning source... sorting... converting...