def client_relpath(self, filename):
        """Normalize any path sent from client view and return relative path
        against vobtag
        """

        try:
            path, revision = filename.split("@@", 1)
        except __HOLE__:
            path = filename
            revision = None

        relpath = ""
        logging.debug("vobstag: %s, path: %s", self.vobstag, path)
        while True:
            # An error should be raised if vobstag cannot be reached.
            if path == "/":
                logging.debug("vobstag not found in path, use client filename")
                return filename
            # Vobstag reach, relpath can be returned.
            if path.endswith(self.vobstag):
                break
            path, basename = os.path.split(path)
            # Init relpath with basename.
            if len(relpath) == 0:
                relpath = basename
            else:
                relpath = os.path.join(basename, relpath)

        logging.debug("relpath: %s", relpath)

        if revision:
            relpath = relpath + "@@" + revision
        return relpath
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/scmtools/clearcase.py/ClearCaseDiffParser.client_relpath