diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -24,6 +24,21 @@ parsers = policy.importmod(r'parsers') +def _gettrackedpath(path): + """parses a fncahe entry and returns the path which that + entry is tracking. + + If None is returned, it means it does not track any path. + """ + path = decodefilename(path) + if path.startswith('data/'): + return path[5:-2] + elif path.startswith('dh/'): + return path[3:-2] + elif path.startswith('meta/'): + return path[5:-2] + return None + # This avoids a collision between a file named foo and a dir named # foo.i or foo.d def _encodedir(path):