[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Updating a locally modified file with endline translation

From: Vladimir Prus <ghost_at_cs.msu.su>
Date: 2002-02-15 09:58:40 CET

Karl Fogel wrote:

> > ===================================================================
> > --- ./subversion/libsvn_wc/get_editor.c
> > +++ ./subversion/libsvn_wc/get_editor.c Thu Feb 14 17:04:57 2002
> > @@ -1843,6 +1843,13 @@
> > FALSE,
> > pool));
> >
> > + /* Make the temporary working file name relative
> > to + the parent directory. */
> > + tmp_working = svn_stringbuf_ncreate
> > + (tmp_working->data + parent_dir->len + 1,
> > + tmp_working->len - parent_dir->len - 1,
> > + pool);
> > +
> > /* Copy the working file to tmp-working with
> > LF's, and any keywords contracted. */
>
> The context here doesn't show it, but this new assignment to
> tmp_working immediately follows another assignment (by reference) to
> tmp_working. They can't both be right, since the first *use* of the
> variable occurs later on. :-)

I don't see any problem here: the second assignment uses the result of the
first, doesn't it? This is similar to what happens on lines 1784 and 1808 in
the same file.

> Also it seems odd that the old way would work in most circumstances,
> yet not for your reproduction recipe.

Does the old way work indeed? Is there any existing test that passes the
block of code that I've patched?

- Volodya

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:08 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.