# HG changeset patch # User Benoit Boissinot # Date 1282494212 -7200 # Node ID 9182f434ec58c46f613fe933ed0b798efe2c2186 # Parent 705425f297a82f637eb83d8f58e3b21bfc61dd66 contrib/compress: use hg API to compute the destination path diff -r 705425f297a8 -r 9182f434ec58 contrib/compress.py --- a/contrib/compress.py Sun Aug 22 18:21:30 2010 +0200 +++ b/contrib/compress.py Sun Aug 22 18:23:32 2010 +0200 @@ -7,12 +7,11 @@ # GNU General Public License version 2 or any later version. -from mercurial import util, changegroup, localrepo -import os +from mercurial import hg, changegroup, localrepo def compress(ui, repo, dest): - dest = os.path.realpath(util.expandpath(dest)) - target = localrepo.instance(ui, dest, create=1) + dest = hg.localpath(ui.expandpath(dest)) + target = localrepo.instance(ui, dest, create=True) tr = target.transaction("compress") src_cl = repo.changelog tar_cl = target.changelog