--- a/hgext/convert/p4.py Mon Dec 19 04:25:18 2016 +0100
+++ b/hgext/convert/p4.py Tue Dec 20 09:23:50 2016 -0800
@@ -95,10 +95,12 @@
"Read changes affecting the path"
cmd = 'p4 -G changes -s submitted %s' % util.shellquote(path)
stdout = util.popen(cmd, mode='rb')
+ p4changes = {}
for d in loaditer(stdout):
c = d.get("change", None)
if c:
- self.p4changes[c] = True
+ p4changes[c] = True
+ return p4changes
def _parse(self, ui, path):
"Prepare list of P4 filenames and revisions to import"
@@ -106,7 +108,7 @@
# read client spec or view
if "/" in path:
- self._parse_view(path)
+ self.p4changes.update(self._parse_view(path))
if path.startswith("//") and path.endswith("/..."):
views = {path[:-3]:""}
else:
@@ -119,7 +121,7 @@
for client in clientspec:
if client.startswith("View"):
sview, cview = clientspec[client].split()
- self._parse_view(sview)
+ self.p4changes.update(self._parse_view(sview))
if sview.endswith("...") and cview.endswith("..."):
sview = sview[:-3]
cview = cview[:-3]