equal
deleted
inserted
replaced
379 prefetched[int(drev[r'id'])] = drev |
379 prefetched[int(drev[r'id'])] = drev |
380 if key not in prefetched: |
380 if key not in prefetched: |
381 raise error.Abort(_('cannot get Differential Revision %r') % params) |
381 raise error.Abort(_('cannot get Differential Revision %r') % params) |
382 return prefetched[key] |
382 return prefetched[key] |
383 |
383 |
|
384 visited = set() |
384 result = [] |
385 result = [] |
385 queue = [params] |
386 queue = [params] |
386 while queue: |
387 while queue: |
387 params = queue.pop() |
388 params = queue.pop() |
388 drev = fetch(params) |
389 drev = fetch(params) |
|
390 if drev[r'id'] in visited: |
|
391 continue |
|
392 visited.add(drev[r'id']) |
389 result.append(drev) |
393 result.append(drev) |
390 if stack: |
394 if stack: |
391 auxiliary = drev.get(r'auxiliary', {}) |
395 auxiliary = drev.get(r'auxiliary', {}) |
392 depends = auxiliary.get(r'phabricator:depends-on', []) |
396 depends = auxiliary.get(r'phabricator:depends-on', []) |
393 for phid in depends: |
397 for phid in depends: |