Mercurial > hg
changeset 12017:9182f434ec58
contrib/compress: use hg API to compute the destination path
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 22 Aug 2010 18:23:32 +0200 |
parents | 705425f297a8 |
children | fd206fabc14f |
files | contrib/compress.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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