[darcs-users] Best practices, even for casual users (Was: Recovering from an "unrecord all")

Daniel Déchelotte boite_a_spam at club-internet.fr
Thu May 4 12:32:59 UTC 2006


Hi,

Juliusz Chroboczek a écrit :
> Zachary P. Landau a écrit :
> 
> > [...] it should be stressed in the
> > manual that people should not be working on their 'master'
> > repository.  It is always a good idea to have a repository that you
> > push your changes to. That way when you totally screw up, you only
> > did it on your working branch and not the main one.
> 
> Aye.  My personal working habits are described in
> 
>   http://www.abridgegame.org/pipermail/darcs-users/2004-July/002351.html

A nice read, although it already assumes some basic darcs-related knowledge
(like making sense of "a bunch of darcs repositories"). But it does say
that, using only one repository, one improper command might actually
destroy the work of a few months or years.

The manual may indeed need a few more words about setting up different
repositories, *even for a single-man project*, just to be able to branch,
rollback a few patches, and so on. And be safe.

Here is my way through the manual:
 * Getting started                               [CHECK]
   * Creating your repository                    [CHECK]
   * Making changes                              [CHECK]
   * Making your repository visible to others
     There is no "others" involved in my project. This sections talks
     about setting up a web server, which I think does not apply to
     my problem.                                 [SKIP ]
     Let's look at next sections just in case...
   * Getting changes made to another repository
     Moving patches from one repository to another
     with considerations of signing patches and email
                        [SKIP, clearly not for my modest use (I thought)]

Later, when I wanted to go a bit further with darcs:

 * Configuring darcs                             [SKIP ]
 * Best practices
     I do understand a few things, but am lost at most others.
     The "Branches: just normal repositories" subsection is especially
     confusing ("Darcs does not have branches [...] Branches are very
     useful in darcs.").

So here I am with my single repository, and my accidental "unrecord all".

Now that I know that I want several repositories (one master one and one
working one), I could not tell whether I needed
$ cd future_master_repo ; darcs get current_repo
or
$ cd current_repo ; darcs put future_master_repo

The manual contains:
> WARNING: Put is far less optimized than get, especially for local
> repositories. We recommend avoiding use of put except for small
> repositories.

So I go with get ?

And then:
> Put is used when you already have a repository and want to make a copy of
> it. A typical use-case is when you want to branch your project.

So I do a put ?

I am sorry for being *so much* at a loss... ;-)

-- 
Daniel Déchelotte
                  http://yo.dan.free.fr/




More information about the darcs-users mailing list