Mercurial > hg
comparison contrib/compress.py @ 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 |
comparison
equal
deleted
inserted
replaced
12016:705425f297a8 | 12017:9182f434ec58 |
---|---|
5 # | 5 # |
6 # This software may be used and distributed according to the terms of the | 6 # This software may be used and distributed according to the terms of the |
7 # GNU General Public License version 2 or any later version. | 7 # GNU General Public License version 2 or any later version. |
8 | 8 |
9 | 9 |
10 from mercurial import util, changegroup, localrepo | 10 from mercurial import hg, changegroup, localrepo |
11 import os | |
12 | 11 |
13 def compress(ui, repo, dest): | 12 def compress(ui, repo, dest): |
14 dest = os.path.realpath(util.expandpath(dest)) | 13 dest = hg.localpath(ui.expandpath(dest)) |
15 target = localrepo.instance(ui, dest, create=1) | 14 target = localrepo.instance(ui, dest, create=True) |
16 tr = target.transaction("compress") | 15 tr = target.transaction("compress") |
17 src_cl = repo.changelog | 16 src_cl = repo.changelog |
18 tar_cl = target.changelog | 17 tar_cl = target.changelog |
19 changedfiles = set() | 18 changedfiles = set() |
20 mmfs = {} | 19 mmfs = {} |