hgkw/pretxnkw.py
branchdecodefilter
changeset 10 d8cd07b798f2
parent 9 437724c81b8f
child 11 56a61a5c696d
equal deleted inserted replaced
9:437724c81b8f 10:d8cd07b798f2
    53         data, kwct = re_kw.subn(kword, data)
    53         data, kwct = re_kw.subn(kword, data)
    54 
    54 
    55         if kwct:
    55         if kwct:
    56             # backup file and write with expanded keyword
    56             # backup file and write with expanded keyword
    57             ui.note(_('expanding keywords in %s\n' % filename))
    57             ui.note(_('expanding keywords in %s\n' % filename))
    58             absname = os.path.join(repo.root, filename)
    58             absname = repo.wjoin(filename)
    59             util.copyfile(absname, absname+'~')
    59             util.copyfile(absname, absname+'~')
    60             repo.wfile(filename, 'w').write(data)
    60             repo.wfile(filename, 'w').write(data)
    61 
    61 
    62     return False
    62     return False