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

Re: [PATCH] Handle loop-critical variable in parse_mergeinfo_from_db()

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-07-18 00:00:44 CEST

On Mon, 17 Jul 2006, Daniel Berlin wrote:

> Madan U Sreenivasan wrote:
> > Currently parse_mergeinfo_from_db() - I wonder why it is not
> > parse_merge_info_from_db() -

This name would be more consistent.

> > ...will fail for mergeinfo from more than one source.
> > This is because, the variable lastmergedfrom (which is used in the
> > if condition that creates new hash key-value pairs and reinitializes the
> > value array) is never set. The attached patch fixes this.

Committed in r20713.

> > I feel the while loop could be simpler, but this patch only does whats
> > best with the existing code.
> It's not the easiest code in the world to understand, granted.
> It could be written nicer, I just wanted something that worked.

I've had a hard time understanding this code, too. Refactoring it for
comprehensibility after writing some regression tests wouldn't be out
of line.

> The while loop fixing is a different problem.
> > I also see that the parse_mergeinfo_from_db() function contains empty
> > lines with whitespaces. Maybe we should take this up and remove the
> > whitespaces. Any committer volunteers?
> Feel free to just whitespace-cleanup the region and commit the result.

Handled in r20714.

  • application/pgp-signature attachment: stored
Received on Tue Jul 18 00:01:32 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.