~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-06-15 04:18:42 UTC
  • Revision ID: mbp@sourcefrog.net-20050615041842-074cb277f68c1685
- make options with - work with external commands
  patch from mpe

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
        keys = kargs.keys()
290
290
        keys.sort()
291
291
        for name in keys:
 
292
            optname = name.replace('_','-')
292
293
            value = kargs[name]
293
 
            if OPTIONS.has_key(name):
 
294
            if OPTIONS.has_key(optname):
294
295
                # it's an option
295
 
                opts.append('--%s' % name)
 
296
                opts.append('--%s' % optname)
296
297
                if value is not None and value is not True:
297
298
                    opts.append(str(value))
298
299
            else: