darcs

Issue 230 More robust pristine cache

Title More robust pristine cache
Priority feature Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, lele, thorkilnaur, tommy, transfire
Assigned To
Topics

Created on 2006-08-03.12:32:23 by transfire, last changed 2009-08-27.14:04:51 by admin.

Messages
msg843 (view) Author: transfire Date: 2006-08-03.12:32:16
Hi--

I have project using Darcs hosted at rubyforge.org. But they don't
support Darcs directly, so I decided to try using a subversion
"wrapping" around my darcs repo. Its seems to work okay. I let Darcs
do all the major lifting and then just "svn commit" from time to time.
It isn't perfect, but it does the trick. Well, almost. There's one
ugly problem. When I checkout from svn, although everything appears
normal, Darcs is not ignoring .svn boring files, even though the entry
(^|/)\.svn($|/) is listed in _darcs/prefs/boring. I can't figure out
why and am starting to think there may be a bug. It will ignore them
if I try to add an .svn file directly, but somehow it wants to record
all the .svn files subversion has changed.

T.
msg844 (view) Author: lele Date: 2006-08-03.12:55:59
TRANS wrote:
> New submission from TRANS <transfire@gmail.com>:
> 
> Hi--
> 
> I have project using Darcs hosted at rubyforge.org. But they don't
> support Darcs directly, so I decided to try using a subversion
> "wrapping" around my darcs repo. Its seems to work okay. I let Darcs
> do all the major lifting and then just "svn commit" from time to time.

I hope you know the existence of tailor ;-)

> It isn't perfect, but it does the trick. Well, almost. There's one
> ugly problem. When I checkout from svn, although everything appears
> normal, Darcs is not ignoring .svn boring files, even though the entry
> (^|/)\.svn($|/) is listed in _darcs/prefs/boring. I can't figure out
> why and am starting to think there may be a bug. It will ignore them
> if I try to add an .svn file directly, but somehow it wants to record
> all the .svn files subversion has changed.

Uhm, are you sure you didn't add them all when you initialized your 
darcs repo? The boring file simply prevents darcs propose those files to 
you, but once they are in the repo, it will track them as normal files.

hth,
ciao, lele.
msg845 (view) Author: droundy Date: 2006-08-03.13:46:20
On Thu, Aug 03, 2006 at 12:56:06PM +0000, Lele Gaifax wrote:
> Uhm, are you sure you didn't add them all when you initialized your 
> darcs repo? The boring file simply prevents darcs propose those files to 
> you, but once they are in the repo, it will track them as normal files.

That does sound likely.  The question then would become one of how
those files got added in the first place.
-- 
David Roundy
msg846 (view) Author: transfire Date: 2006-08-03.14:13:51
On 8/3/06, David Roundy <bugs@darcs.net> wrote:
>
> David Roundy <droundy@darcs.net> added the comment:
>
> On Thu, Aug 03, 2006 at 12:56:06PM +0000, Lele Gaifax wrote:
> > Uhm, are you sure you didn't add them all when you initialized your
> > darcs repo? The boring file simply prevents darcs propose those files to
> > you, but once they are in the repo, it will track them as normal files.
>
> That does sound likely.  The question then would become one of how
> those files got added in the first place.

Nope. Becuase I had been using Darcs for a while, and just added the
subversion wrapping yesterday. In exact order:

  1. ussing a repo already using darcs
  2. svn import to subvsersion server
  3. svn checkout a copy of repo
  4. darcs record

And it wants to record changes to .svn/entries.

Of course I am making one assumption, that when I did add my files to
Darcs it only adds specific files. It doesn't remember if I used -r on
some directory and try to reapply that every time does it?

T.
msg847 (view) Author: droundy Date: 2006-08-03.14:23:46
Can you try running darcs check?

And can you see if there are .svn files in _darcs/pristine? (or
_darcs/current, with repos created with older darcs).
-- 
David Roundy
msg848 (view) Author: transfire Date: 2006-08-03.14:45:54
On 8/3/06, David Roundy <bugs@darcs.net> wrote:
>
> David Roundy <droundy@darcs.net> added the comment:
>
> Can you try running darcs check?

Applying patch 30 of 30... done.
Looks like we have a difference...
Nothing

Inconsistent repo!

> And can you see if there are .svn files in _darcs/pristine? (or
> _darcs/current, with repos created with older darcs).

Ah ha! That what's happening... Subversion is the one not ignoring
Darcs and thus is adding .svn/ throughout _darcs. That must be cuasing
the problem.

So now the question becomes how do I tell Subversion to keep these
files but not version them and hence not add those .svn folders to
_darcs?

Thanks!
T.
msg849 (view) Author: droundy Date: 2006-08-03.14:57:26
On Thu, Aug 03, 2006 at 02:45:59PM +0000, TRANS wrote:
> On 8/3/06, David Roundy <bugs@darcs.net> wrote:
> >
> > David Roundy <droundy@darcs.net> added the comment:
> >
> > Can you try running darcs check?
> 
> Applying patch 30 of 30... done.
> Looks like we have a difference...
> Nothing
> 
> Inconsistent repo!

What version of darcs are you using? This isn't a very nice failure
message...

> > And can you see if there are .svn files in _darcs/pristine? (or
> > _darcs/current, with repos created with older darcs).
> 
> Ah ha! That what's happening... Subversion is the one not ignoring
> Darcs and thus is adding .svn/ throughout _darcs. That must be cuasing
> the problem.

That's what I was suspecting.  This should be alleviated when (and I
have no idea when this'll happen) we implement a single-file pristine
cache.  It's on the long TODO list, but is a fair amount of work.  :(
Nothing conceptually challenging, just tedious.
-- 
David Roundy
msg850 (view) Author: kowey Date: 2006-08-04.05:46:00
Why not use Tailor, as Lele pointed out?
http://www.darcs.net/DarcsWiki/Tailor

The rough idea is that rather than having one repository shared by svn
and darcs (which easily leads to these kind of stumbling over each
other's metadata), you have one repository for darcs, a separate one for
svn, and the magical tailor script to mediate between the two.

Alternately, you could also convince some of the ruby+darcs crowd to set
up a collective trac-darcs server:
http://www.darcs.net/DarcsWiki/TracOnDarcs
msg851 (view) Author: droundy Date: 2006-08-04.11:46:16
I'm closing this bug, since it appears to be svn corrupting the darcs
repository, and thus not our bug.

David
msg866 (view) Author: transfire Date: 2006-08-07.15:21:09
On 8/4/06, David Roundy <bugs@darcs.net> wrote:
>
> David Roundy <droundy@darcs.net> added the comment:
>
> I'm closing this bug, since it appears to be svn corrupting the darcs
> repository, and thus not our bug.

Actually, I think it is a Darcs bug. Sure one could argue that SVN is
poorly designed for dropping a .svn entry in every directory like it
does, but that is the stadard way of adding "hidden" meta info to a
directory. So Darcs really needs to be able to handle that --it's not
only subversion that might do something like that. Appearently darcs
assumes anything in it's _darcs repo is  a reflection of the outside.
So therein lies the conflict. Is there a way, or can a way be made, to
tell Darcs to ignore certain hidden entires?

Thanks,
T.
msg867 (view) Author: droundy Date: 2006-08-08.10:25:15
Okay, I will recategorize this, then, as a request for not using the directory
contents as cache.  This is in the plans, but noone's agreed to do it.  Ignoring
corruption of the pristine cache by other programs is a bad idea, and just using
a flat file for the cache would solve the problem nicely.

David
msg868 (view) Author: kowey Date: 2006-08-08.11:25:38
Plus this would make darcs more resistant to Unison-induced errors.
msg869 (view) Author: droundy Date: 2006-08-08.13:43:22
On Tue, Aug 08, 2006 at 11:25:41AM +0000, Eric Kow wrote:
> Plus this would make darcs more resistant to Unison-induced errors.

And automake-induced errors, and frontpage-induced errors...
-- 
David Roundy
msg870 (view) Author: transfire Date: 2006-08-08.14:14:42
I'm not a Haskell programmer, but could one just adapt the file
rountines to redirect to a tar archive instead?

Sorry if that's nieve.

T.
msg871 (view) Author: droundy Date: 2006-08-08.14:26:23
On Tue, Aug 08, 2006 at 02:14:46PM +0000, TRANS wrote:
> I'm not a Haskell programmer, but could one just adapt the file
> rountines to redirect to a tar archive instead?
> 
> Sorry if that's nieve.

Roughly speaking, that's what we'd do.  Except that we'd probably use
a filesystem called halfs that is written in haskell (and has a
library interface), because that'd be easier.  Tar isn't designed to
deal with issues like removal of files (or files changing size), so
we'd need custom code in any case.  It's probably a few days of work
for someone who knows what they're doing, but those who know what
they're doing are mostly busy with other things.  I've been hoping
that Isaac would (author of halfs) would do it, but he's also got lots
of other stuff on his plate (and he doesn't really know darcs' source
code).

It's the sort of thing that could happen in conjunction with a
hackathon.
-- 
David Roundy
msg872 (view) Author: kowey Date: 2006-08-08.15:06:50
> It's the sort of thing that could happen in conjunction with a
> hackathon.

Alternately, I wonder if this kind of thing would make for a good
student project, like in a Haskell course or something.  Not that I
have any candidates to propose or anything.
msg2289 (view) Author: kowey Date: 2007-12-19.10:53:26
Implemented in unstable (darcs 2.0.0pre1) with:

Thu Dec  6 21:43:47 GMT 2007  David Roundy <droundy@darcs.net>
  * implement new hashed pristine format
msg2290 (view) Author: kowey Date: 2007-12-19.10:54:56
Oops, that's not exactly single-file, but it does reduce the risk of corruption.
 Renaming and keeping 'resolved'

 (feel free to re-open if you think a single file pristine cache really is the
right solution)
History
Date User Action Args
2006-08-03 12:32:23transfirecreate
2006-08-03 12:56:06lelesetstatus: unread -> unknown
nosy: + lele
messages: + msg844
2006-08-03 13:46:25droundysetnosy: droundy, tommy, lele, transfire
messages: + msg845
2006-08-03 14:13:56transfiresetnosy: droundy, tommy, lele, transfire
messages: + msg846
2006-08-03 14:23:51droundysetnosy: droundy, tommy, lele, transfire
messages: + msg847
2006-08-03 14:45:59transfiresetnosy: droundy, tommy, lele, transfire
messages: + msg848
2006-08-03 14:57:30droundysetnosy: droundy, tommy, lele, transfire
messages: + msg849
2006-08-04 05:46:07koweysetnosy: + kowey
messages: + msg850
2006-08-04 11:46:20droundysetstatus: unknown -> resolved
nosy: droundy, tommy, kowey, lele, transfire
messages: + msg851
2006-08-07 15:21:13transfiresetstatus: resolved -> unknown
nosy: droundy, tommy, kowey, lele, transfire
messages: + msg866
2006-08-08 10:25:20droundysetpriority: not-our-bug -> feature
nosy: droundy, tommy, kowey, lele, transfire
messages: + msg867
2006-08-08 11:25:41koweysetnosy: droundy, tommy, kowey, lele, transfire
messages: + msg868
2006-08-08 13:43:26droundysetnosy: droundy, tommy, kowey, lele, transfire
messages: + msg869
2006-08-08 14:14:46transfiresetnosy: droundy, tommy, kowey, lele, transfire
messages: + msg870
2006-08-08 14:26:27droundysetnosy: droundy, tommy, kowey, lele, transfire
messages: + msg871
2006-08-08 15:06:54koweysetnosy: droundy, tommy, kowey, lele, transfire
messages: + msg872
2007-07-19 04:36:47koweysetnosy: + beschmi
title: Darcs not ignoring .svn boring files -> Single-file pristine cache
2007-08-09 12:40:37koweylinkissue100 superseder
2007-12-19 10:53:27koweysetstatus: unknown -> resolved-in-unstable
messages: + msg2289
2007-12-19 10:54:58koweysetmessages: + msg2290
title: Single-file pristine cache -> More robust pristine cache
2008-09-04 21:28:53adminsetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:48:46adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, lele, transfire
2009-08-06 20:51:10adminsetnosy: - beschmi
2009-08-10 21:54:03adminsetnosy: + lele, transfire, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:55:22adminsetnosy: - dagit
2009-08-25 18:00:35adminsetnosy: + darcs-devel, - simon
2009-08-27 14:04:51adminsetnosy: tommy, kowey, darcs-devel, lele, transfire, thorkilnaur, dmitry.kurochkin