[darcs-users] Doesn't the _darcs dir bug you?

Nathan Gray kolibrie at graystudios.org
Fri Nov 11 16:23:18 UTC 2005


On Fri, Nov 11, 2005 at 03:42:23PM +0100, Tomasz Zielonka wrote:
> On Fri, Nov 11, 2005 at 02:22:09PM +0100, Wolfgang Jeltsch wrote:
> > > I think a proper directory structure is a better answer.  Perhaps it
> > > should be added to the "Best Practices" on the wiki.
> > 
> > Maybe the user shouldn't be forced to use a proper directory structure for 
> > his/her source tree but darcs should use a "proper directory structure", 
> > meaning that darcs init shouldn't modify the source tree by adding a 
> > directory to it but should store its repository meta-information elsewhere.
> 
> Alternatively, there could be an option to 'darcs get' that would place
> the working files in a subdirectory. For example you could populate the
> repo in a directory with structure:
> 
>     . -- foo.c
>       |
>       |- foo.h
>       |
>       `- main.c
> 
> and then you could 'darcs get --working-subdir=working ...' and get:
> 
>     . -- _darcs -- ...
>       |
>       `- working -- foo.c
>                  |
>                  |- foo.h
>                  |
>                  `- main.c

One really nice feature of darcs is the ability to create a repo on top
of some content.  The files already there become the working files.
And, if necessary, the whole repo can be wiped out with 'rm -rf _darcs',
leaving the original files intact.

Moving the _darcs directory to some place next to the working dir,
rather than _darcs being a subdirectory, limits the number of repos you
can have in a directory.

  - project_1
    |
    - _darcs
  
  - project_2
    |
    - _darcs

Here, project_1 and project_2 would have to be moved into different
parent directories, if I wanted both of them to be repos.

  |- _darcs
  |   
  |- project_1
  |
  |- project_2 # controlled by the same _darcs as project_1?

I think it's best to leave _darcs where it is, as a subdirectory in the
working dir.

-kolibrie




More information about the darcs-users mailing list