comparison hgext/convert/p4.py @ 8063:ee8d9b93b316

convert/p4: win32 fixes * cmd.exe does not know single quotes * win32 does not like trailing whitespace very much. Trade test coverage for maintenance time and drop the trailing whitespaces tests.
author Patrick Mezard <pmezard@gmail.com>
date Mon, 13 Apr 2009 16:15:45 +0200
parents bc027d72c289
children aece3c9e62f1
comparison
equal deleted inserted replaced
8062:f4749d6fb433 8063:ee8d9b93b316
43 43
44 self._parse(ui, path) 44 self._parse(ui, path)
45 45
46 def _parse_view(self, path): 46 def _parse_view(self, path):
47 "Read changes affecting the path" 47 "Read changes affecting the path"
48 cmd = "p4 -G changes -s submitted '%s'" % path 48 cmd = 'p4 -G changes -s submitted "%s"' % path
49 stdout = util.popen(cmd) 49 stdout = util.popen(cmd)
50 for d in loaditer(stdout): 50 for d in loaditer(stdout):
51 c = d.get("change", None) 51 c = d.get("change", None)
52 if c: 52 if c:
53 self.p4changes[c] = True 53 self.p4changes[c] = True
62 if path.startswith("//") and path.endswith("/..."): 62 if path.startswith("//") and path.endswith("/..."):
63 views = {path[:-3]:""} 63 views = {path[:-3]:""}
64 else: 64 else:
65 views = {"//": ""} 65 views = {"//": ""}
66 else: 66 else:
67 cmd = "p4 -G client -o '%s'" % path 67 cmd = 'p4 -G client -o "%s"' % path
68 clientspec = marshal.load(util.popen(cmd)) 68 clientspec = marshal.load(util.popen(cmd))
69 69
70 views = {} 70 views = {}
71 for client in clientspec: 71 for client in clientspec:
72 if client.startswith("View"): 72 if client.startswith("View"):
137 137
138 def getheads(self): 138 def getheads(self):
139 return self.heads 139 return self.heads
140 140
141 def getfile(self, name, rev): 141 def getfile(self, name, rev):
142 cmd = "p4 -G print '%s#%s'" % (self.depotname[name], rev) 142 cmd = 'p4 -G print "%s#%s"' % (self.depotname[name], rev)
143 stdout = util.popen(cmd) 143 stdout = util.popen(cmd)
144 144
145 mode = None 145 mode = None
146 data = "" 146 data = ""
147 147