mercurial/logcmdutil.py
changeset 41655 df59b1078983
parent 41647 ec37db02fc72
child 41670 db69a763bc89
equal deleted inserted replaced
41654:f164076427b2 41655:df59b1078983
    71     def pathfn(f):
    71     def pathfn(f):
    72         return posixpath.join(prefix, f)
    72         return posixpath.join(prefix, f)
    73     if relroot != '':
    73     if relroot != '':
    74         # XXX relative roots currently don't work if the root is within a
    74         # XXX relative roots currently don't work if the root is within a
    75         # subrepo
    75         # subrepo
    76         uirelroot = match.uipath(relroot)
    76         uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
       
    77         uirelroot = uipathfn(pathfn(relroot))
    77         relroot += '/'
    78         relroot += '/'
    78         for matchroot in match.files():
    79         for matchroot in match.files():
    79             if not matchroot.startswith(relroot):
    80             if not matchroot.startswith(relroot):
    80                 ui.warn(_('warning: %s not inside relative root %s\n') % (
    81                 ui.warn(_('warning: %s not inside relative root %s\n') %
    81                     match.uipath(matchroot), uirelroot))
    82                         (uipathfn(pathfn(matchroot)), uirelroot))
    82 
    83 
    83         relrootmatch = scmutil.match(ctx2, pats=[relroot], default='path')
    84         relrootmatch = scmutil.match(ctx2, pats=[relroot], default='path')
    84         match = matchmod.intersectmatchers(match, relrootmatch)
    85         match = matchmod.intersectmatchers(match, relrootmatch)
    85         copysourcematch = relrootmatch
    86         copysourcematch = relrootmatch
    86 
    87