# HG changeset patch # User Alexis S. L. Carvalho # Date 1182480126 10800 # Node ID de8ec7e1753abd09c3af64b9f7236f7fdede6f09 # Parent 0f6e2b37512d7a3d07c281b7843fabe8aeb48cf4 dirstate.status: if a file is marked as copied, consider it modified After a "hg copy --force --after somefile cleanfile", cleanfile shouldn't be considered clean anymore. diff -r 0f6e2b37512d -r de8ec7e1753a mercurial/dirstate.py --- a/mercurial/dirstate.py Thu Jun 21 18:05:14 2007 -0500 +++ b/mercurial/dirstate.py Thu Jun 21 23:42:06 2007 -0300 @@ -472,8 +472,9 @@ if type_ == 'n': if not st: st = os.lstat(self.wjoin(fn)) - if size >= 0 and (size != st.st_size - or (mode ^ st.st_mode) & 0100): + if (size >= 0 and (size != st.st_size + or (mode ^ st.st_mode) & 0100) + or fn in self._copymap): modified.append(fn) elif time != int(st.st_mtime): lookup.append(fn) diff -r 0f6e2b37512d -r de8ec7e1753a tests/test-copy2 --- a/tests/test-copy2 Thu Jun 21 18:05:14 2007 -0500 +++ b/tests/test-copy2 Thu Jun 21 23:42:06 2007 -0300 @@ -44,4 +44,10 @@ hg cp -A bar baz hg st -C +echo "# foo was clean:" +hg st -AC foo +echo "# but it's considered modified after a copy --after --force" +hg copy -Af bar foo +hg st -AC foo + exit 0 diff -r 0f6e2b37512d -r de8ec7e1753a tests/test-copy2.out --- a/tests/test-copy2.out Thu Jun 21 18:05:14 2007 -0500 +++ b/tests/test-copy2.out Thu Jun 21 23:42:06 2007 -0300 @@ -23,3 +23,8 @@ # copy --after on an added file A baz bar +# foo was clean: +C foo +# but it's considered modified after a copy --after --force +M foo + bar