On Fri, Nov 30, 2001 at 12:26:23AM -0800, Greg Stein wrote:
> On Thu, Nov 29, 2001 at 10:57:00PM -0500, Kevin Pilch-Bisson wrote:
> >...
> > > > +++ ./subversion/libsvn_wc/get_editor.c	Tue Nov 27 09:42:39 2001
> > > > @@ -1155,6 +1155,9 @@
> > > >                               tmp_txtb,
> > > >                               SVN_WC__LOG_ATTR_DEST,
> > > >                               txtb,
> > > > +                             SVN_WC__LOG_ATTR_PERM,
> > > > +                             svn_stringbuf_create
> > > > +                                (SVN_WC__LOG_PERM_READONLY, fb->pool),
> > > >                               NULL);
> > > >  
> > > >        if ( (! is_locally_modified)
> > > > @@ -1171,6 +1174,9 @@
> > > >                                   txtb,
> > > >                                   SVN_WC__LOG_ATTR_DEST,
> > > >                                   fb->name,
> > > > +                                 SVN_WC__LOG_ATTR_PERM,
> > > > +                                 svn_stringbuf_create
> > > > +                                    (SVN_WC__LOG_PERM_DEFAULT, fb->pool),
> > > >                                   NULL);
> > > >          }
> > > >    
> > > > @@ -1198,6 +1204,10 @@
> > > >                                           txtb,
> > > >                                           SVN_WC__LOG_ATTR_DEST,
> > > >                                           fb->name,
> > > > +                                         SVN_WC__LOG_ATTR_PERM,
> > > > +                                         svn_stringbuf_create
> > > > +                                             (SVN_WC__LOG_PERM_DEFAULT,
> > > > +                                              fb->pool),
> > > >                                           NULL);
> > > >                  }
> > > >                else  /* working file exists */
> > > > @@ -1411,6 +1421,9 @@
> > > >                                       fb->name,
> > > >                                       SVN_WC__LOG_ATTR_DEST,
> > > >                                       renamed_basename,
> > > > +                                     SVN_WC__LOG_ATTR_PERM,
> > > > +                                     svn_stringbuf_create
> > > > +                                        (SVN_WC__LOG_PERM_SRC, fb->pool),
> > > >                                       NULL);
> > > >                
> > > >                /* Copy the new file out into working area. */
> > > > @@ -1422,6 +1435,9 @@
> > > >                                       txtb,
> > > >                                       SVN_WC__LOG_ATTR_DEST,
> > > >                                       fb->name,
> > > > +                                     SVN_WC__LOG_ATTR_PERM,
> > > > +                                     svn_stringbuf_create 
> > > > +                                        (SVN_WC__LOG_PERM_DEFAULT, fb->pool),
> > > >                                       NULL);
> 
> Holy crap, that is some major suckage. Allocate a heap buffer so that we can
> put a constant string into the output XML? Blearg.
> 
> I guess the one saving grace is that it isn't within a loop, and fb->pool is
> about to be destroyed. But sheesh... what convolutions for an otherwise
> simple task :-(
> 
Agreed.  One possibility is to investigate the usage of svn_xml_make_open_tag,
and see whether it needs to be taking an svn_stringbuf, or could in fact
take an svn_string_t or const char *. 
I didn't think this patch was the place to go into that though.
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- application/pgp-signature attachment: stored
 
Received on Sat Oct 21 14:36:50 2006