Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 15355:dbdb777502dc stable
consistency: use util.realpath instead of os.path.realpath where useful
exceptions:
hg: os.path.realpath used before util can be imported
tests/run-tests.py: may not import mercurial modules
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 24 Oct 2011 13:51:24 +0200 |
parents | 67e92d29ecb5 |
children | 8ec1a2cfd2c0 |
comparison
equal
deleted
inserted
replaced
15354:42630f54e513 | 15355:dbdb777502dc |
---|---|
342 ctx = scmutil.revsingle(repo, opts.get('rev')) | 342 ctx = scmutil.revsingle(repo, opts.get('rev')) |
343 if not ctx: | 343 if not ctx: |
344 raise util.Abort(_('no working directory: please specify a revision')) | 344 raise util.Abort(_('no working directory: please specify a revision')) |
345 node = ctx.node() | 345 node = ctx.node() |
346 dest = cmdutil.makefilename(repo, dest, node) | 346 dest = cmdutil.makefilename(repo, dest, node) |
347 if os.path.realpath(dest) == repo.root: | 347 if util.realpath(dest) == repo.root: |
348 raise util.Abort(_('repository root cannot be destination')) | 348 raise util.Abort(_('repository root cannot be destination')) |
349 | 349 |
350 kind = opts.get('type') or archival.guesskind(dest) or 'files' | 350 kind = opts.get('type') or archival.guesskind(dest) or 'files' |
351 prefix = opts.get('prefix') | 351 prefix = opts.get('prefix') |
352 | 352 |