~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/externalcommand.py

  • Committer: Lalo Martins
  • Date: 2005-09-08 00:40:15 UTC
  • mto: (1185.1.22)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: lalo@exoweb.net-20050908004014-bb63b3378ac8ff58
turned get_revision_info into a RevisionSpec class

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import os
23
23
import sys
24
 
 
25
24
from bzrlib.commands import Command
26
25
 
27
26
 
34
33
        bzrpath = os.environ.get('BZRPATH', '')
35
34
 
36
35
        for dir in bzrpath.split(os.pathsep):
37
 
            ## Empty directories are not real paths
38
 
            if not dir:
39
 
                continue
40
36
            path = os.path.join(dir, cmd)
41
37
            if os.path.isfile(path):
42
38
                return ExternalCommand(path)
47
43
    def __init__(self, path):
48
44
        self.path = path
49
45
 
50
 
 
 
46
 
51
47
    def name(self):
52
48
        return self.path.split(os.sep)[-1]
53
49