[darcs-users] not erasing changes?

Albert Reiner areiner at tph.tuwien.ac.at
Sun Apr 1 12:37:15 UTC 2007


On Sat, Mar 31, 2007 at 07:07:28PM -0500, Zach wrote:
> >When you pull patches into your repo, they are applied to both the
> >pristine cache (i.e., foo/_darcs/current) and your working tree (i.e.,
> >foo/).  If some of your local changes are at odds with the pulled
> >patches, you get conflicts and will be able to resolve them.  The only
> >subtlety is that you may end up with a different set of conflicts in
> >the pristine cache and in your working tree if you don't record your
> >local changes before pulling, i.e., if pristine and working tree
> >differ.
> 
> Cool so there is always a backup copy of a given file. Right now I

Just to be clear: the pristine cache has the file without any
modifications not yet recorded, i.e., it is exactly what you get by
applying all patches in the repo to an empty repo.  It is used so that
commands like `darcs whatsnew' or `darcs record' can obtain changes in
the working tree without going through all patches in the repo.

> have a remote repo I copied onto my local machine and I started making
> patches (locally) but I realized it would be good to have a reference
> copy in case I really screwed up something bad (such as server no
> longer compiles or dumps core) and it would be good to have a pristine
> copy of the server around. I manually did "cp -r" my darcs repo to
> another directory name and was working in that copy and then going
> back to my darcs repo dir and manually recording each patch but this
> is a bit tedious. Know a better solution? Is there something like a

I am not entirely sure I understand what you are doing.  You are
working on repo foo, and then did `cp -r foo bar'?  You might have
used `darcs get foo bar' just as well for that.

Then you work in foo and want to have some of the changes in bar, and
want them to be recorded, too?  In that case, you can just record the
patches in foo and push to, or pull into, bar.

> shell script that can scan my duplicate darcs dir and find out what
> stuff I have changed by comparing it against my normal darcs dir and
> then recording the changes and just prompting me for the description
> patch info tags?

Unless you have non-recorded changes in foo, you can just do `darcs
record' in bar and push to foo.  But maybe I don't quite understand
what you are doing.

Regards,

Albert.





More information about the darcs-users mailing list