##// END OF EJS Templates
convert: use return value in parse_view() instead of manipulating state
David Soria Parra -
r30629:e92776c0 default
parent child Browse files
Show More
@@ -95,10 +95,12 b' class p4_source(common.converter_source)'
95 95 "Read changes affecting the path"
96 96 cmd = 'p4 -G changes -s submitted %s' % util.shellquote(path)
97 97 stdout = util.popen(cmd, mode='rb')
98 p4changes = {}
98 99 for d in loaditer(stdout):
99 100 c = d.get("change", None)
100 101 if c:
101 self.p4changes[c] = True
102 p4changes[c] = True
103 return p4changes
102 104
103 105 def _parse(self, ui, path):
104 106 "Prepare list of P4 filenames and revisions to import"
@@ -106,7 +108,7 b' class p4_source(common.converter_source)'
106 108
107 109 # read client spec or view
108 110 if "/" in path:
109 self._parse_view(path)
111 self.p4changes.update(self._parse_view(path))
110 112 if path.startswith("//") and path.endswith("/..."):
111 113 views = {path[:-3]:""}
112 114 else:
@@ -119,7 +121,7 b' class p4_source(common.converter_source)'
119 121 for client in clientspec:
120 122 if client.startswith("View"):
121 123 sview, cview = clientspec[client].split()
122 self._parse_view(sview)
124 self.p4changes.update(self._parse_view(sview))
123 125 if sview.endswith("...") and cview.endswith("..."):
124 126 sview = sview[:-3]
125 127 cview = cview[:-3]
General Comments 0
You need to be logged in to leave comments. Login now