diff -r 5265c7d47213 -r cdcebc897529 mercurial/context.py --- a/mercurial/context.py Fri May 10 10:23:08 2019 -0700 +++ b/mercurial/context.py Fri May 10 11:03:54 2019 -0700 @@ -1913,7 +1913,7 @@ if self.isdirty(path): return self._cache[path]['copied'] else: - raise error.ProgrammingError('copydata() called on clean context') + return None def flags(self, path): if self.isdirty(path):