/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: Martin Pool
  • Date: 2009-07-27 06:28:35 UTC
  • mto: This revision was merged to the branch mainline in revision 4587.
  • Revision ID: mbp@sourcefrog.net-20090727062835-o66p8it658tq1sma
Add CountedLock.get_physical_lock_status

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?
22
20
 
23
21
 
24
22
import os
 
23
import sys
25
24
 
26
 
from .commands import Command
 
25
from bzrlib.commands import Command
 
26
from bzrlib.osutils import pathjoin
27
27
 
28
28
 
29
29
class ExternalCommand(Command):
35
35
        bzrpath = os.environ.get('BZRPATH', '')
36
36
 
37
37
        for dir in bzrpath.split(os.pathsep):
38
 
            # Empty directories are not real paths
 
38
            ## Empty directories are not real paths
39
39
            if not dir:
40
40
                continue
41
41
            # This needs to be os.path.join() or windows cannot
46
46
 
47
47
        return None
48
48
 
 
49
 
49
50
    def __init__(self, path):
50
51
        self.path = path
51
52
 
62
63
        m = 'external command from %s\n\n' % self.path
63
64
        pipe = os.popen('%s --help' % self.path)
64
65
        return m + pipe.read()
 
66