equal
deleted
inserted
replaced
757 assert repo.dirstate.p2() == nullid |
757 assert repo.dirstate.p2() == nullid |
758 |
758 |
759 for path, data in pycompat.iteritems(filedata): |
759 for path, data in pycompat.iteritems(filedata): |
760 fctx = ctx[path] |
760 fctx = ctx[path] |
761 fctx.write(data, fctx.flags()) |
761 fctx.write(data, fctx.flags()) |
762 if repo.dirstate[path] == b'n': |
|
763 repo.dirstate.set_possibly_dirty(path) |
|
764 |
762 |
765 oldp1 = repo.dirstate.p1() |
763 oldp1 = repo.dirstate.p1() |
766 newp1 = replacements.get(oldp1, oldp1) |
764 newp1 = replacements.get(oldp1, oldp1) |
767 if newp1 != oldp1: |
765 if newp1 != oldp1: |
768 repo.setparents(newp1, nullid) |
766 with repo.dirstate.parentchange(): |
|
767 scmutil.movedirstate(repo, repo[newp1]) |
769 |
768 |
770 |
769 |
771 def replacerev(ui, repo, ctx, filedata, replacements): |
770 def replacerev(ui, repo, ctx, filedata, replacements): |
772 """Commit a new revision like the given one, but with file content changes |
771 """Commit a new revision like the given one, but with file content changes |
773 |
772 |