[darcs-users] post-hoc move

Zooko Wilcox-O'Hearn zooko at zooko.com
Thu Jul 30 14:34:08 UTC 2009


On Thursday,2009-07-30, at 4:16 , Hamish Allan wrote:

> $ darcs wh -l
> ...
> R ./Resources/Adobe PDF Reference.pdf
> ...
> a ./Resources/pdf/Adobe PDF Reference.pdf
> ...
...
> $ mv Resources/pdf/Adobe\ PDF\ Reference.pdf Resources
> $ darcs wh -l
> ...
> R ./Resources/Adobe PDF Reference.pdf
> ...
> a ./Resources/Adobe PDF Reference.pdf
> ...

Wait a minute, that's strange.  Why does darcs think that the file  
has been removed?  It isn't just that you mv'ed it aside and then  
mv'ed it back.  If that was all, then from darcs's perspective the  
file would never have moved.

Did you tell darcs to do something to the file while it was mv'ed  
aside, such as by calling "darcs mv $LOC1 $LOC2" when the file was  
not currently physically present in $LOC1?

In any case, you can put things back the way you want by: 1.  Copying  
the file to a safe location (i.e. a location which you have never  
told darcs to mess with, such as outside of the repository  
entirely).  2.  Running "darcs revert" to undo the commands you've  
issued but have not yet committed,  3.  Putting the file back if  
necessary (probably not necessary since the undo will probably  
restore it to where it was before you started).

Regards,

Zooko


More information about the darcs-users mailing list