comparison mercurial/commands.py @ 3277:23682d3e4111

disallow commands on non local repository
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 06 Oct 2006 19:21:43 +0200
parents bb057b6ce3cf
children d89e98840b08
comparison
equal deleted inserted replaced
3276:105253b30239 3277:23682d3e4111
3281 raise util.Abort('%s: %s' % 3281 raise util.Abort('%s: %s' %
3282 (options['cwd'], inst.strerror)) 3282 (options['cwd'], inst.strerror))
3283 3283
3284 path = u.expandpath(options["repository"]) or "" 3284 path = u.expandpath(options["repository"]) or ""
3285 repo = path and hg.repository(u, path=path) or None 3285 repo = path and hg.repository(u, path=path) or None
3286 if repo and not repo.local():
3287 raise util.Abort(_("repository '%s' is not local") % path)
3286 3288
3287 if options['help']: 3289 if options['help']:
3288 return help_(u, cmd, options['version']) 3290 return help_(u, cmd, options['version'])
3289 elif options['version']: 3291 elif options['version']:
3290 return show_version(u) 3292 return show_version(u)