Fix duplicate Dependency that appeared by switching from a flat list to a tree.
Fix duplicate Dependency that appeared by switching from a flat list to a tree.

Instead of keeping the reference information in the parent, note for each Dependency if it should be processed with self.should_process. I had to hack a bit with the hooks to also enforce recursion_limit() to keep the old behavior, otherwise From() could cause hooks to run that weren't run before.

BUG=50015
TEST=hooks are run properly. Tested with webkit and pagespeed and buildbot master, fixes running the same checkout multiple times.

Review URL: http://codereview.chromium.org/3124017

git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@55895 0039d316-1c4b-4281-b951-d872f2087c98

fanjunwei/depot_tools,hsharsha/depot_tools,Chilledheart/depot_tools,fanjunwei/depot_tools,chinmaygarde/depot_tools,HackFisher/depot_tools,jankeromnes/depot_tools,fracting/depot_tools,jankeromnes/depot_tools,coreos/depot_tools,liaorubei/depot_tools,kaiix/depot_tools,cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools,azureplus/chromium_depot_tools,jankeromnes/depot_tools,azureplus/chromium_depot_tools,cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools,Neozaru/depot_tools,Chilledheart/depot_tools,hsharsha/depot_tools,kromain/chromium-tools,Midrya/chromium,airtimemedia/depot_tools,smikes/depot_tools,cybertk/depot_tools,azunite/chrome_build,eatbyte/depot_tools,kromain/chromium-tools,gcodetogit/depot_tools,G-P-S/depot_tools,jankeromnes/depot_tools,smikes/depot_tools,liaorubei/depot_tools,sarvex/depot-tools,coreos/depot_tools,cybertk/depot_tools,michalliu/chromium-depot_tools,cybertk/depot_tools,ajohnson23/depot_tools,fanjunwei/depot_tools,michalliu/chromium-depot_tools,eatbyte/depot_tools,Phonebooth/depot_tools,xuyuhan/depot_tools,withtone/depot_tools,primiano/depot_tools,smikes/depot_tools,G-P-S/depot_tools,disigma/depot_tools,azunite/chrome_build,coreos/depot_tools,yetu/repotools,G-P-S/depot_tools,michalliu/chromium-depot_tools,gcodetogit/depot_tools,HackFisher/depot_tools,CoherentLabs/depot_tools,kaiix/depot_tools,duongbaoduy/gtools,Neozaru/depot_tools,disigma/depot_tools,azureplus/chromium_depot_tools,chinmaygarde/depot_tools,CoherentLabs/depot_tools,Chilledheart/depot_tools,sarvex/depot-tools,HackFisher/depot_tools,smikes/depot_tools,mlufei/depot_tools,npe9/depot_tools,aleonliao/depot_tools,coreos/depot_tools,Neozaru/depot_tools,withtone/depot_tools,yetu/repotools,Neozaru/depot_tools,liaorubei/depot_tools,SuYiling/chrome_depot_tools,sarvex/depot-tools,jankeromnes/depot_tools,npe9/depot_tools,mlufei/depot_tools,airtimemedia/depot_tools,duongbaoduy/gtools,Phonebooth/depot_tools,airtimemedia/depot_tools,aleonliao/depot_tools,G-P-S/depot_tools,kaiix/depot_tools,cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools,hsharsha/depot_tools,duanwujie/depot_tools,Chilledheart/depot_tools,primiano/depot_tools,mlufei/depot_tools,fracting/depot_tools,fracting/depot_tools,Chilledheart/depot_tools,duanwujie/depot_tools,smikes/depot_tools,liaorubei/depot_tools,chinmaygarde/depot_tools,primiano/depot_tools,duanwujie/depot_tools,michalliu/chromium-depot_tools,xuyuhan/depot_tools,azunite/chrome_build,npe9/depot_tools,Midrya/chromium,kromain/chromium-tools,coreos/depot_tools,npe9/depot_tools,yetu/repotools,SuYiling/chrome_depot_tools,eatbyte/depot_tools,xuyuhan/depot_tools,Phonebooth/depot_tools,Midrya/chromium,cybertk/depot_tools,withtone/depot_tools,ajohnson23/depot_tools,coreos/depot_tools,disigma/depot_tools,Neozaru/depot_tools,aleonliao/depot_tools,kromain/chromium-tools,HackFisher/depot_tools,cybertk/depot_tools,xuyuhan/depot_tools,SuYiling/chrome_depot_tools,gcodetogit/depot_tools,sarvex/depot-tools,eatbyte/depot_tools,duongbaoduy/gtools,fanjunwei/depot_tools,ajohnson23/depot_tools,Phonebooth/depot_tools,jankeromnes/depot_tools,airtimemedia/depot_tools,jankeromnes/depot_tools