Show More
@@ -66,7 +66,7 b' class p4_source(converter_source):' | |||
|
66 | 66 | else: |
|
67 | 67 | cmd = "p4 -G client -o '%s'" % path |
|
68 | 68 | clientspec = marshal.load(util.popen(cmd)) |
|
69 | ||
|
69 | ||
|
70 | 70 | views = {} |
|
71 | 71 | for client in clientspec: |
|
72 | 72 | if client.startswith("View"): |
@@ -89,8 +89,8 b' class p4_source(converter_source):' | |||
|
89 | 89 | |
|
90 | 90 | # handle revision limiting |
|
91 | 91 | startrev = self.ui.config('convert', 'p4.startrev', default=0) |
|
92 |
self.p4changes = [x for x in self.p4changes |
|
|
93 |
if ((not startrev or int(x) >= int(startrev)) and |
|
|
92 | self.p4changes = [x for x in self.p4changes | |
|
93 | if ((not startrev or int(x) >= int(startrev)) and | |
|
94 | 94 | (not self.rev or int(x) <= int(self.rev)))] |
|
95 | 95 | |
|
96 | 96 | # now read the full changelists to get the list of file revisions |
@@ -110,7 +110,7 b' class p4_source(converter_source):' | |||
|
110 | 110 | parents = [lastid] |
|
111 | 111 | else: |
|
112 | 112 | parents = [] |
|
113 | ||
|
113 | ||
|
114 | 114 | date = (int(d["time"]), 0) # timezone not set |
|
115 | 115 | c = commit(author=self.recode(d["user"]), date=util.datestr(date), |
|
116 | 116 | parents=parents, desc=desc, branch='', extra={"p4": change}) |
@@ -131,7 +131,7 b' class p4_source(converter_source):' | |||
|
131 | 131 | self.changeset[change] = c |
|
132 | 132 | self.files[change] = files |
|
133 | 133 | lastid = change |
|
134 | ||
|
134 | ||
|
135 | 135 | if lastid: |
|
136 | 136 | self.heads = [lastid] |
|
137 | 137 |
@@ -1273,14 +1273,14 b" if os.name == 'nt':" | |||
|
1273 | 1273 | def find_exe(command): |
|
1274 | 1274 | '''Find executable for command searching like cmd.exe does. |
|
1275 | 1275 | If command is a basename then PATH is searched for command. |
|
1276 |
PATH isn't searched if command is an absolute or relative path. |
|
|
1276 | PATH isn't searched if command is an absolute or relative path. | |
|
1277 | 1277 | An extension from PATHEXT is found and added if not present. |
|
1278 | 1278 | If command isn't found None is returned.''' |
|
1279 | 1279 | pathext = os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD') |
|
1280 | 1280 | pathexts = [ext for ext in pathext.lower().split(os.pathsep)] |
|
1281 | 1281 | if os.path.splitext(command)[1].lower() in pathexts: |
|
1282 | 1282 | pathexts = [''] |
|
1283 | ||
|
1283 | ||
|
1284 | 1284 | def findexisting(pathcommand): |
|
1285 | 1285 | 'Will append extension (if needed) and return existing file' |
|
1286 | 1286 | for ext in pathexts: |
@@ -1291,7 +1291,7 b" if os.name == 'nt':" | |||
|
1291 | 1291 | |
|
1292 | 1292 | if os.sep in command: |
|
1293 | 1293 | return findexisting(command) |
|
1294 | ||
|
1294 | ||
|
1295 | 1295 | for path in os.environ.get('PATH', '').split(os.pathsep): |
|
1296 | 1296 | executable = findexisting(os.path.join(path, command)) |
|
1297 | 1297 | if executable is not None: |
@@ -1465,11 +1465,11 b' else:' | |||
|
1465 | 1465 | def find_exe(command): |
|
1466 | 1466 | '''Find executable for command searching like which does. |
|
1467 | 1467 | If command is a basename then PATH is searched for command. |
|
1468 |
PATH isn't searched if command is an absolute or relative path. |
|
|
1468 | PATH isn't searched if command is an absolute or relative path. | |
|
1469 | 1469 | If command isn't found None is returned.''' |
|
1470 | 1470 | if sys.platform == 'OpenVMS': |
|
1471 | 1471 | return command |
|
1472 | ||
|
1472 | ||
|
1473 | 1473 | def findexisting(executable): |
|
1474 | 1474 | 'Will return executable if existing file' |
|
1475 | 1475 | if os.path.exists(executable): |
@@ -1478,7 +1478,7 b' else:' | |||
|
1478 | 1478 | |
|
1479 | 1479 | if os.sep in command: |
|
1480 | 1480 | return findexisting(command) |
|
1481 | ||
|
1481 | ||
|
1482 | 1482 | for path in os.environ.get('PATH', '').split(os.pathsep): |
|
1483 | 1483 | executable = findexisting(os.path.join(path, command)) |
|
1484 | 1484 | if executable is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now