> > 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?

I'm certainly not disputing the idea of 'overwriting' a hunk with a
replace.  That seems handy enough, and so if a test succeeds in
pristine, we probably don't care what happens in working (uh... right?).

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.

Attachment: pgpfemGCQx6bV.pgp
Description: PGP signature

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

Reply via email to