[darcs-users] Newbie questions, Nested Repositories
Nimrod A. Abing
nimrod.abing at gmail.com
Wed Feb 16 04:22:05 UTC 2005
On Tue, 15 Feb 2005 08:27:00 -0500, David Roundy
<droundy at abridgegame.org> wrote:
> On Mon, Feb 14, 2005 at 05:33:41PM -0600, Andrew Wagner wrote:
> > On Feb 14, 2005, at 5:17 PM, Juliusz Chroboczek wrote:
> > >>If you have nested darcs repositories, and change something in the
> > >>lower level, you'd have to record basically the same patch at both
> > >>levels, right?
> > >
> > >No, Darcs sees your tree as a partition (disjoint union) of the
> > >repositories. So if you have repos /home/jch/A and /home/jch/A/B, a
> > >file /home/jch/A/B/foo belongs to B but is ignored when operating on A.
> >
> > Ah. If I already have repos /home/jch/A/B, can I safely create a repos
> > /home/jch/A around the existing repository? Does darcs basically treat
> > any directory containing a _darcs subdirectory as boring?
>
> Yes and no, to the two questions. Nested repositories are fine, but darcs
> doesn't treat directories containing a _darcs subdirectory as
> boring--although that's not a bad idea. So if you create nested
> repositories, you probably don't want to use --look-for-adds. I never use
> --look-for-adds anyways, so for me it's a non-issue.
my _darcs/prefs/boring file has the following line:
(^|/)_darcs($|/)
and I am sure I didn't put that there (I never touch the boring file).
Just to be sure:
nimrod at midway:~/trees/test> darcs init
nimrod at midway:~/trees/test> mkdir sub
nimrod at midway:~/trees/test> cd sub/
nimrod at midway:~/trees/test/sub> ls
nimrod at midway:~/trees/test/sub> darcs init
nimrod at midway:~/trees/test/sub> cd ..
nimrod at midway:~/trees/test> ls
_darcs sub
nimrod at midway:~/trees/test> darcs record --look-for-adds
Darcs needs to know what name (conventionally an email address) to use as the
patch author, e.g. 'Fred Bloggs <fred at bloggs.invalid>'. If you provide one
now it will be stored in the file '_darcs/prefs/author' and used as a default
in the future. To change your preferred author address, simply delete or edit
this file.
What is your email address? fred at bloggs.invalid
adddir ./sub
Shall I record this patch? (1/1) [ynWsfqadjk], or ? for help: y
What is the patch name? sub
Do you want to add a long comment? [yn] n
Finished recording patch 'sub'
nimrod at midway:~/trees/test>
or more closely to what Andrew is trying to do:
nimrod at midway:~/trees/test> mkdir sub
nimrod at midway:~/trees/test> cd sub
nimrod at midway:~/trees/test/sub> darcs init
nimrod at midway:~/trees/test/sub> darcs record
No changes!
nimrod at midway:~/trees/test/sub> cd ..
nimrod at midway:~/trees/test> ls
sub
nimrod at midway:~/trees/test> darcs init
nimrod at midway:~/trees/test> darcs record --look-for-adds
Darcs needs to know what name (conventionally an email address) to use as the
patch author, e.g. 'Fred Bloggs <fred at bloggs.invalid>'. If you provide one
now it will be stored in the file '_darcs/prefs/author' and used as a default
in the future. To change your preferred author address, simply delete or edit
this file.
What is your email address? fred at bloggs.invalid
adddir ./sub
Shall I record this patch? (1/1) [ynWsfqadjk], or ? for help: y
What is the patch name? sub
Do you want to add a long comment? [yn] n
Finished recording patch 'sub'
nimrod at midway:~/trees/test>
--
_nimrod_a_abing_
More information about the darcs-users
mailing list