##// END OF EJS Templates
graftcopies: document why the function is useful at all...
Martin von Zweigbergk -
r44552:06e7e765 default
parent child Browse files
Show More
@@ -857,7 +857,21 b' def _related(f1, f2):'
857
857
858
858
859 def graftcopies(wctx, ctx, base):
859 def graftcopies(wctx, ctx, base):
860 """reproduce copies between base and ctx in the wctx"""
860 """reproduce copies between base and ctx in the wctx
861
862 Unlike mergecopies(), this function will only consider copies between base
863 and ctx; it will ignore copies between base and wctx. Also unlike
864 mergecopies(), this function will apply copies to the working copy (instead
865 of just returning information about the copies). That makes it cheaper
866 (especially in the common case of base==ctx.p1()) and useful also when
867 experimental.copytrace=off.
868
869 merge.update() will have already marked most copies, but it will only
870 mark copies if it thinks the source files are related (see
871 merge._related()). It will also not mark copies if the file wasn't modified
872 on the local side. This function adds the copies that were "missed"
873 by merge.update().
874 """
861 new_copies = pathcopies(base, ctx)
875 new_copies = pathcopies(base, ctx)
862 _filter(wctx.p1(), wctx, new_copies)
876 _filter(wctx.p1(), wctx, new_copies)
863 for dst, src in pycompat.iteritems(new_copies):
877 for dst, src in pycompat.iteritems(new_copies):
General Comments 0
You need to be logged in to leave comments. Login now