On Mon, Jan 29, 2007 at 12:02:59AM +0100, Eric Y. Kow wrote:
> > > echo hej > a
> > > darcs record -am hej
> > > # uh-oh 
> > > sed -e s/hej/xxx/ a > a.tmp; mv -f a.tmp a
> > > darcs replace --ignore-times xxx hej a
> > 
> > No, it only needs to check against pristine.
> 
> Ok, but unless I'm misunderstanding things, isn't it actually skipping
> the pristine check when the working check succeeds?
> 
> The code says something like this...
>                   isJust (apply_to_slurpy (tokreplace f toks old new) work) ||
>                   isJust (apply_to_slurpy (tokreplace f toks old new) cur)
> 
> It seems the test will succeed if applying to working regardless of what
> happens to pristine, but shouldn't it say that I probably don't want to
> change to 'hej' because the recorded version of the file already has it?

Ah, I misread your example.  You're right, that this different from what
I was talking about.  On the other hand, this case looks like someone has
just done a manual --force, which is perfectly reasonable.  So I'm still in
favor of this code, although your objection now makes more sense.
-- 
David Roundy
http://www.darcs.net

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to