Mercurial > hg
comparison hgext/keyword.py @ 12684:8348599c68d7
keyword: fix weeding of expansion candidates when recording
Rearrange tests to check this, i.e. that there are changes
in other files, not only the recorded one.
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Sun, 10 Oct 2010 00:30:09 +0100 |
parents | 7b34fdffed65 |
children | a247751652ba |
comparison
equal
deleted
inserted
replaced
12683:ada47c38f4e5 | 12684:8348599c68d7 |
---|---|
572 ctx = repo['.'] | 572 ctx = repo['.'] |
573 modified, added = repo[None].status()[:2] | 573 modified, added = repo[None].status()[:2] |
574 ret = orig(ui, repo, commitfunc, *pats, **opts) | 574 ret = orig(ui, repo, commitfunc, *pats, **opts) |
575 recctx = repo['.'] | 575 recctx = repo['.'] |
576 if ctx != recctx: | 576 if ctx != recctx: |
577 modified = [f for f in modified if f in recctx] | 577 changed = recctx.files() |
578 added = [f for f in added if f in recctx] | 578 modified = [f for f in modified if f in changed] |
579 added = [f for f in added if f in changed] | |
579 kwt.restrict = False | 580 kwt.restrict = False |
580 kwt.overwrite(recctx, modified, False, True, kwt.re_kwexp.subn) | 581 kwt.overwrite(recctx, modified, False, True, kwt.re_kwexp.subn) |
581 kwt.overwrite(recctx, added, False, True, kwt.re_kw.subn) | 582 kwt.overwrite(recctx, added, False, True, kwt.re_kw.subn) |
582 kwt.restrict = True | 583 kwt.restrict = True |
583 return ret | 584 return ret |