List Info

Thread: Remove directory




Remove directory
user name
2006-12-17 17:44:45
On Sat, Dec 16, 2006 at 12:59:38PM +0100, Markus Döbele
wrote:
> Hello darcs users out there,

Hi,

> First I want to say I really like darcs and we will use
it for versioning all 
> our codes and config files.
> 
> I have 2 questions I couldn't find out so far.
> 
> 1. How can I recursively remove a directory from being
managed by darcs? (We 
> need the folder but no version control for it)

This can unfortunately be hazardous. Current darcs doesn't
do
anything to protect non-managed data in the repo. Any patch
that
adds, moves or removes a managed file or directory will
ignore
any existing non-managed file or directory that's "in
the way".
Obviously it works well in practice, or someone would have
fixed
this by now, though I still think it should be fixed. So it
is a
bit adventurous to have (any kind of) patches in the repo
containing file paths to something that shouldn't be
touched.

The second problem is there is no "unadd" patch in
darcs; there
is only "remove" patches. Although it is possible
to record a
remove patch without removing the file or directory, it is
not
possible to pull, push or apply the patch without also
performing the remove in the target repo.

The best thing I can think of is to first 'darcs mv' the
dirs
(maybe to some .attic dir to create a safe "name
space") and
record and push that patch to all repos with tmp dirs. Then
cp
the tmp dirs back in all repos, and finally perhaps rm -rf
the
moved tmp dirs in .attic, record and push. The last step is
not
at all necessary, but saves some space (if patches are
compressed).


> 2. How can I exclude a folder from being included into
darcs when I add the 
> whole folder above recursively. (I know there is a
boring file. But how do I 
> specify a folder here? Is there a working regex for
that?)

The regex to use is:

  (^|/)tmp($|/)


-- 
Tommy Pettersson <ptplysator.liu.se>

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net
http://www.abridgegame.org/mailman/listinfo/darcs-users
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )