The patch I forgot to attach...
On 10/23/05, Nathan Cournia <[EMAIL PROTECTED]> wrote:
> Thanks for the reply.
>
> I've hacked my way around the problem for the time being. Attached is patch.
>
> The patch basically adds any subdirectories it sees in each changeset.
> This means that in each changeset a directory appears, the patch will
> try to re-add the directory.
>
> It's a horrible hack, but it does work (in my case) when going from
> monotone to svn. I can think of many ways to easily break this hack,
> so I don't really recommend it to anyone. Hopefully, the patch will
> inspire someone more knowledgeable in monotone and tailor to write
> proper support.
>
> I've also found another problem with tailor's monotone->svn
> conversion. In monotone, if I do the following:
>
> monotone rename a b
> monotone add a
> monotone commit
>
> and then try to convert to svn, tailor will loose a.
>
> With that said, I'm not sure if it's fair to label monotone as a
> "fully supported" source system.
>
> Thanks.
>
> nathan
>
> On 10/22/05, rghetta <[EMAIL PROTECTED]> wrote:
> > On Fri, 2005-10-21 at 18:45 -0400, Nathan Cournia wrote:
> > > I'm not sure what the problem is. Perhaps monotone is failing to tell
> > > svn that the 'proposal' directory should be added?
> > Yes, the monotone backend doesn't emit "add dir" changeset records.
> > Unfortunately I had very little time to look at this problem, sorry.
> >
> > Riccardo
> >
> >
> > _______________________________________________
> > Tailor mailing list
> > [email protected]
> > http://lists.zooko.com/mailman/listinfo/tailor
> >
>
--- tailor-0.9.18/vcpx/monotone.py 2005-10-16 21:54:51.000000000 -0400
+++ tailor-0.9.18.hack/vcpx/monotone.py 2005-10-23 20:21:14.000000000 -0400
@@ -360,6 +360,24 @@
if token == "add_file" or token=="add_directory":
chentry = chset.addEntry(fname[1:-1], chset.revision)
chentry.action_kind = chentry.ADDED
+
+ # if the file is contained within a subdir, try to add
+ # the subdir.
+ # FIXME this trys to re-add each subdirectory each
+ # commit (SVN is ok with this). ideally we should
+ # only add the subdirectory on the changeset
+ # where it first appeared.
+ path = fname[1:-1].split("/")
+ build = ''
+ while( len(path) > 1 ):
+ build += path.pop(0)
+ # check if we've already added this directory in
+ # the changeset were currently working on
+ if len( [e for e in chset.entries if e.name==build])==0:
+ # is a real update
+ chentry = chset.addEntry(build, chset.revision)
+ chentry.action_kind = chentry.ADDED
+ build += '/'
elif token == "delete_file" or token=="delete_directory":
chentry = chset.addEntry(fname[1:-1], chset.revision)
chentry.action_kind = chentry.DELETED
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor