Dealing with duplicated hashes

Wolfgang Denk wd at denx.de
Wed Sep 14 00:43:59 EST 2011


Dear Jeremy,

on Tue, 10 May 2011 I wrote:
> Hi,
> 
> assume we have a series of 3 patches, and changes are requested for
> the first and the last one:
> 
> 	1/3 -> Changes Requested
> 	2/3 -> New
> 	3/3 -> Changes Requested
> 
> The posted changes his code as requested, and posts a new version of
> his patch series, i. e. we have:
> 
> 	v2 1/3 -> New
> 	v2 2/3 -> New
> 	v2 3/3 -> New
> 
> 	1/3 -> Changes Requested
> 	2/3 -> Superseeded
> 	3/3 -> Changes Requested
> 
> Note that patch 2/2 got reposted unchanged.
> 
> When I apply the v2 series of patches, I will use
> "pwclient update -s 'Accepted' -h $HASH" to update the database.
> 
> Unfortunately, both versions of the 2/3 patch will have the same hash
> value (unchanged repost, you remember?), and what happens is this:
> 
> 	v2 1/3 -> Accepted
> 	v2 2/3 -> New
> 	v2 3/3 -> Accepted
> 
> 	1/3 -> Changes Requested
> 	2/3 -> Accepted
> 	3/3 -> Changes Requested
> 
> The action always gets applied to the oldest entry only.
> 
> This is not what I intended.  Well, I have to admit that I'm not sure
> what "correct" behaviour would be.  Originally I would have expected
> that only the most recent entry gets changed, but after second thought
> I think it would also make sense if _all_ entries with the same hash
> get changed in the same way - they represent multiple copies of the
> same patch after all.
> 
> 
> What do you think?

I came to the conclusion that the current behaviour is actually a bug.
I have seen cases where new patch versions were sent because changes
to the commit message were requested - yet pwclient will always access
the old patch, and thus eventually apply the wrong one.

Sorry, I cannot fix this myself, so I need help here.

Thanks in advance.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When a program is being  tested,  it  is  too  late  to  make  design
changes.                  -- Geoffrey James, "The Tao of Programming"


More information about the Patchwork mailing list