def get_collector_trail(self, collector): |
""" provide a trail relative to the topdir, |
which can be used to reconstruct the |
collector (possibly on a different host |
starting from a different topdir). |
""" |
-> chain = collector.listchain() |
relpath = chain[0].fspath.relto(self.topdir) |
if not relpath: |
if chain[0].fspath == self.topdir: |
relpath = "." |
else: |
raise ValueError("%r not relative to %s" |
%(chain[0], self.topdir)) |
return relpath, tuple([x.name for x in chain[1:]]) |