/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/externalcommand.py

  • Committer: Marius Kruger
  • Date: 2010-07-10 21:28:56 UTC
  • mto: (5384.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5385.
  • Revision ID: marius.kruger@enerweb.co.za-20100710212856-uq4ji3go0u5se7hx
* Update documentation
* add NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
18
 
 
19
17
# TODO: Perhaps rather than mapping options and arguments back and
20
18
# forth, we should just pass in the whole argv, and allow
21
19
# ExternalCommands to handle it differently to internal commands?
23
21
 
24
22
import os
25
23
 
26
 
from .commands import Command
 
24
from bzrlib.commands import Command
27
25
 
28
26
 
29
27
class ExternalCommand(Command):
35
33
        bzrpath = os.environ.get('BZRPATH', '')
36
34
 
37
35
        for dir in bzrpath.split(os.pathsep):
38
 
            # Empty directories are not real paths
 
36
            ## Empty directories are not real paths
39
37
            if not dir:
40
38
                continue
41
39
            # This needs to be os.path.join() or windows cannot
46
44
 
47
45
        return None
48
46
 
 
47
 
49
48
    def __init__(self, path):
50
49
        self.path = path
51
50
 
62
61
        m = 'external command from %s\n\n' % self.path
63
62
        pipe = os.popen('%s --help' % self.path)
64
63
        return m + pipe.read()
 
64