comparison mercurial/scmutil.py @ 43147:54e943b28101

sidedatacopies: move various copies related function to the copies modules We will need to access these logic form the copies module. So we move them from their higher level module to the lower level `copies` module. We cannot use them from their top level module as it would create cycles. Differential Revision: https://phab.mercurial-scm.org/D6954
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 06 Oct 2019 23:36:51 -0400
parents d783f945a701
children 899e55e2d375
comparison
equal deleted inserted replaced
43146:0171483b082f 43147:54e943b28101
2217 b"ancestors(bookmark() and not bookmark(%s))", 2217 b"ancestors(bookmark() and not bookmark(%s))",
2218 mark, 2218 mark,
2219 mark, 2219 mark,
2220 mark, 2220 mark,
2221 ) 2221 )
2222
2223
2224 def computechangesetfilesadded(ctx):
2225 """return the list of files added in a changeset
2226 """
2227 added = []
2228 for f in ctx.files():
2229 if not any(f in p for p in ctx.parents()):
2230 added.append(f)
2231 return added
2232
2233
2234 def computechangesetfilesremoved(ctx):
2235 """return the list of files removed in a changeset
2236 """
2237 removed = []
2238 for f in ctx.files():
2239 if f not in ctx:
2240 removed.append(f)
2241 return removed