##// END OF EJS Templates
fix: use scmutil.movedirstate() instead of reimplementing...
Martin von Zweigbergk -
r48567:66ad7e32 stable
parent child Browse files
Show More
@@ -759,13 +759,12 b' def writeworkingdir(repo, ctx, filedata,'
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):
@@ -370,7 +370,6 b' it clean.'
370 M hello.whole
370 M hello.whole
371 $ hg fix -s . *
371 $ hg fix -s . *
372 $ hg st
372 $ hg st
373 M hello.whole (known-bad-output !)
374 $ hg diff
373 $ hg diff
375
374
376 $ cd ..
375 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now