hgkw/kwexpander.py
branchupdatehook
changeset 31 28e8bd971c02
parent 30 bc3bdd329831
child 32 b70b38b15fa4
equal deleted inserted replaced
30:bc3bdd329831 31:28e8bd971c02
    49     for f in files:
    49     for f in files:
    50 
    50 
    51         text = repo.wfile(f).read()
    51         text = repo.wfile(f).read()
    52         if not util.binary(text):
    52         if not util.binary(text):
    53 
    53 
       
    54             # TODO for update:
       
    55             # walk back through file history onto last add/modify
       
    56             # like "hg log -l1 f"
    54             kw = '%sHg: %s,v %s %s %s $' % ('$', f, cid, date, user)
    57             kw = '%sHg: %s,v %s %s %s $' % ('$', f, cid, date, user)
    55 
    58 
    56             if update and text.find(kwstr) > -1:
    59             if update and text.find(kwstr) > -1:
    57                 text = text.replace(kwstr, kw)
    60                 text = text.replace(kwstr, kw)
    58                 wwritekw(ui, repo, f, text)
    61                 wwritekw(ui, repo, f, text)