Issue 1266 Does not warn when 'darcs init' is run inside a repository subdirectory

Title Does not warn when 'darcs init' is run inside a repository subdirectory
Priority bug Status resolved
Milestone Resolved in 2.8.0
Superseder Nosy List btcoburn, darcs-devel, dmitry.kurochkin, jaredj, kowey, thorkilnaur, twb
Assigned To
Topics ProbablyEasy, UI

Created on 2008-12-14.03:46:02 by btcoburn, last changed 2010-11-02.23:16:06 by noreply.

msg6823 (view) Author: btcoburn Date: 2008-12-14.03:45:57
IMHO, 'darcs init' should warn when it is run in a subfolder of an existing
repository. It currently warns when you are in the folder containing '_darcs',
so it *should* warn if you are in any subfolder of the repository. Either use
the same warning, or something like "Darcs does not support nested repositories.
This is probably not what you want to do.".

For example:
mkdir foo;
cd foo;
darcs init;
mkdir bar;
cd bar;
darcs init;

To fix this, darcs needs to walk up the folder hierarchy checking each parent
folder for an '_darcs' folder.
msg7194 (view) Author: twb Date: 2009-01-26.01:18:59
+1.  While there are legitimate uses for this behaviour, creating a repo
inside another repo is most likely accidental.  Therefore a warning acts
as a useful safety net.

I have create a test script in bugs/ for this issue (see the darcs-users
mailing list).
msg8104 (view) Author: kowey Date: 2009-08-12.09:59:53
This should be actually quite easy to implement as we already have code to do
the walking and checking.  We just need to call it and print a warning on Left.
msg12884 (view) Author: noreply Date: 2010-11-02.23:16:06
The following patch sent by Alexey Levan <exlevan@gmail.com> updated issue issue1266 with
status=resolved;resolvedin=2.8.0 HEAD

* Resolve issue1266: add a warning about nested repositories 
Ignore-this: f4fdcf0e2d2b46a82da6cee22e945e30
Date User Action Args
2008-12-14 03:46:02btcoburncreate
2009-01-26 01:19:05twbsettopic: + Confirmed
status: unread -> unknown
messages: + msg7194
nosy: + twb
2009-01-26 01:19:56twbsetpriority: wishlist -> bug
nosy: kowey, simon, twb, thorkilnaur, btcoburn, dmitry.kurochkin
2009-08-12 10:00:06koweysetstatus: unknown -> needs-implementation
nosy: + jaredj
topic: + ProbablyEasy
messages: + msg8104
2009-08-25 17:36:09adminsetnosy: + darcs-devel, - simon
2009-08-27 14:23:24adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, btcoburn, jaredj, dmitry.kurochkin
2010-03-23 18:02:21koweysettopic: - Confirmed
2010-11-02 23:16:06noreplysetstatus: needs-implementation -> resolved
messages: + msg12884
resolvedin: 2.8.0