contrib/compress: use hg API to compute the destination path
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 22 Aug 2010 18:23:32 +0200
changeset 12017 9182f434ec58
parent 12016 705425f297a8
child 12018 fd206fabc14f
contrib/compress: use hg API to compute the destination path
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