[darcs-users] Looks nice. Noob questions.

David Roundy droundy at jdj5.mit.edu
Mon Jan 12 20:31:48 UTC 2004


On Sat, Jan 03, 2004 at 11:56:12PM -0500, Art Griesser wrote:
> 
> I had no problems building GHC and Darcs under Mandrake 9.2, setting up a
> repository with 10 mb source, moving the code around and altering it, and
> recording the changes.  I do have a few questions, though.
> 
> When backing up a repository (not just the head), what do you need to
> save? Is _darcs/patches enough?

I would say that you should back up all of _darcs.  In actuality you could
leave out _darcs/prefs, for very little gain, and you could also leave out
_darcs/current, which would save considerably more space, at the cost of
losing some redundancy.

> Can _darcs be located in a sibling to the working directory, instead of
> above or in the working directory? I nearly accidently editited the files
> in _darcs/current due to overzealous greping: that would be harder to do
> if I could move the repository a bit further away.

Hmmm.  There's no reason why this couldn't be done, but it seems a bit
awkward.  :(  You'd then have to be careful whenever renaming your
repository that you'd have to rename both directories, which seems
awkward.  And actually, I'm not sure how you'd be able to put it safely in
a sibling directory... what would its name be? Presumably based on the name
of your project directory, but then you've got potential problems when
there are symlinks to the directory...

> There are ways to check changes in one repository (diff, annotate, and
> changes), changes between a reposity and the working directory
> (whatsnew), but there does not seem to be a direct way to compare the
> contents two different repositories. Without that, how do you know what
> to push or pull? Perhaps you could use a pull or apply, and decline or
> discard all the changes, or manually compare "darcs changes", but it
> seems like there ought to be a better way. Am I missing something?

No, you aren't missing something.  That's a command that has been
requested, and I haven't gotten around to it.  Partly it's that I'm not
sure what name to give it ("whatchanged", "compare"?), and partly I'm not
sure exactly what output it should have.  Probably something like the
output of "darcs changes", but it might also be nice to let you see the
patches themselves, so perhaps some sort of an interactive command would be
in order.  Or maybe this should be done by darcs changes itself.  I.e. if
you provide an argument, it would tell you the changes relative to a remote
repository... Suggestions are welcome.  I've mostly been slow about
implementing this because it's much easier to add commands than to remove
them.

> You need to explicitly schedule the addition of files, but deletions are
> scheduled automatically. This does not seem consistent?

You can also schedule the removal of files using "darcs remove", which
restores the symmetry.  Or you can use the "--look-for-adds" flag to
automatically look for additions, which restores the symmetry.

The thing that breaks the symmetry is that usually there exist files that
you don't want in the repo (e.g. *.o), so automatically adding files could
be rather annoying.  On the other hand, if a file that was in the
repository no longer exists, it's pretty safe to say that the user no
longer wants it.
-- 
David Roundy
http://civet.berkeley.edu/droundy/




More information about the darcs-users mailing list