[PATCH] convert: svn-sink: test if execute bit was actually stored
Patrick Mézard
pmezard at gmail.com
Wed Jan 2 15:39:04 CST 2008
Maxim Dounin a écrit :
> On Thu, Dec 27, 2007 at 01:23:08PM -0600, Matt Mackall wrote:
>> It'd be better if this intelligence were moved into the filectx object.
>
> I agree that this have to be in something more generic.
>
> As for filectx, currently it have to be fixed to preserve original
> changeset revision for this logic to work. Attached patch
> "patch-context.txt" does the trick.
> Note: This change will broke old behaviour that
> changectx.filectx(file).rev() report last revision where file was
> modified. I hope nothing in code relies on this (and some cases was
> already broken anyway).
Shouldn't we add a filectx.linkrev() too ? I was bitten many times by the rev/linkrev ambiguity.
> The only test that fails due to this change is test-issue672. As far as
> I see it's minor and completely safe debug output change in filectx
> priting, so I've updated test-issue672.out.
> Second patch, patch-rename-2.txt, adds function renamedhere() to filectx
> object and uses it to fix original problem. Notes:
> diff -r 7471976f1ffd -r 94e498fd21e8 mercurial/context.py
> --- a/mercurial/context.py Sat Dec 29 16:57:43 2007 +0300
> +++ b/mercurial/context.py Sat Dec 29 17:11:48 2007 +0300
> @@ -250,6 +250,31 @@ class filectx(object):
> def size(self): return self._filelog.size(self._filerev)
>
> def cmp(self, text): return self._filelog.cmp(self._filenode, text)
Why not regroup it with rename() and document the latter too, highlighting the differences ?
Both patches look good to me.
--
Patrick Mézard
More information about the Mercurial-devel
mailing list