Mercurial > hg-stable
changeset 15323:19368c54a774 stable
largefiles: remove all uses of os.path.relpath for 2.4 compatibility
author | Benjamin Pollack <benjamin@bitquabit.com> |
---|---|
date | Thu, 20 Oct 2011 17:40:25 -0400 |
parents | c8e2a5ea7062 |
children | 0890842c41d1 |
files | hgext/largefiles/overrides.py |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Thu Oct 20 16:43:31 2011 +0200 +++ b/hgext/largefiles/overrides.py Thu Oct 20 17:40:25 2011 -0400 @@ -298,8 +298,7 @@ def makestandin(relpath): path = scmutil.canonpath(repo.root, repo.getcwd(), relpath) - return os.path.join(os.path.relpath('.', repo.getcwd()), - lfutil.standin(path)) + return os.path.join(repo.wjoin(lfutil.standin(path))) fullpats = scmutil.expandpats(pats) dest = fullpats[-1] @@ -397,12 +396,10 @@ os.makedirs(destlfiledir) if rename: os.rename(srclfile, destlfile) - lfdirstate.remove(os.path.relpath(srclfile, - repo.root)) + lfdirstate.remove(repo.wjoin(srclfile)) else: util.copyfile(srclfile, destlfile) - lfdirstate.add(os.path.relpath(destlfile, - repo.root)) + lfdirstate.add(repo.wjoin(destlfile)) lfdirstate.write() except util.Abort, e: if str(e) != 'no files to copy':