$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: ghost_at_[hidden]
Date: 2007-10-26 10:57:57
Author: vladimir_prus
Date: 2007-10-26 10:57:56 EDT (Fri, 26 Oct 2007)
New Revision: 40482
URL: http://svn.boost.org/trac/boost/changeset/40482
Log:
Record base revision for ported files.
Assign unique numeric ids for virtual targets and
use them for hashing.
Text files modified: 
   branches/build/python_port/python/boost/build/build/alias.py          |     5 +++--                                   
   branches/build/python_port/python/boost/build/build/build_request.py  |     1 +                                       
   branches/build/python_port/python/boost/build/build/feature.py        |     1 +                                       
   branches/build/python_port/python/boost/build/build/project.py        |     1 +                                       
   branches/build/python_port/python/boost/build/build/property_set.py   |     1 +                                       
   branches/build/python_port/python/boost/build/build/targets.py        |     8 +++++---                                
   branches/build/python_port/python/boost/build/build/virtual_target.py |    18 ++++++++++++++++++                      
   7 files changed, 30 insertions(+), 5 deletions(-)
Modified: branches/build/python_port/python/boost/build/build/alias.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/alias.py	(original)
+++ branches/build/python_port/python/boost/build/build/alias.py	2007-10-26 10:57:56 EDT (Fri, 26 Oct 2007)
@@ -2,6 +2,9 @@
 # Distributed under the Boost Software License, Version 1.0. 
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 
 
+# Status: ported (danielw)
+# Base revision: 40480
+
 #  This module defines the 'alias' rule and associated class.
 #
 #  Alias is just a main target which returns its source targets without any 
@@ -22,8 +25,6 @@
 #    alias big_lib : : @/external_project/big_lib/<link>static ;
 #
 
-# Status: ported (danielw)
-
 import targets
 import property_set
 from boost.build.manager import get_manager
Modified: branches/build/python_port/python/boost/build/build/build_request.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/build_request.py	(original)
+++ branches/build/python_port/python/boost/build/build/build_request.py	2007-10-26 10:57:56 EDT (Fri, 26 Oct 2007)
@@ -1,5 +1,6 @@
 # Status: being ported by Vladimir Prus
 # TODO: need to re-compare with mainline of .jam
+# Base revision: 40480
 #
 #  (C) Copyright David Abrahams 2002. Permission to copy, use, modify, sell and
 #  distribute this software is granted provided this copyright notice appears in
Modified: branches/build/python_port/python/boost/build/build/feature.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/feature.py	(original)
+++ branches/build/python_port/python/boost/build/build/feature.py	2007-10-26 10:57:56 EDT (Fri, 26 Oct 2007)
@@ -1,5 +1,6 @@
 # Status: mostly ported.
 # TODO: carry over tests.
+# Base revision: 40480
 #
 # Copyright 2001, 2002, 2003 Dave Abrahams 
 # Copyright 2002, 2006 Rene Rivera 
Modified: branches/build/python_port/python/boost/build/build/project.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/project.py	(original)
+++ branches/build/python_port/python/boost/build/build/project.py	2007-10-26 10:57:56 EDT (Fri, 26 Oct 2007)
@@ -1,4 +1,5 @@
 # Status: being ported by Vladimir Prus
+# Base revision: 40480
 
 # Copyright 2002, 2003 Dave Abrahams 
 # Copyright 2002, 2005, 2006 Rene Rivera 
Modified: branches/build/python_port/python/boost/build/build/property_set.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/property_set.py	(original)
+++ branches/build/python_port/python/boost/build/build/property_set.py	2007-10-26 10:57:56 EDT (Fri, 26 Oct 2007)
@@ -1,5 +1,6 @@
 # Status: ported.
 # One FIXME remains that depends on property.py being finished.
+# Base revision: 40480
 
 #  Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
 #  distribute this software is granted provided this copyright notice appears in
Modified: branches/build/python_port/python/boost/build/build/targets.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/targets.py	(original)
+++ branches/build/python_port/python/boost/build/build/targets.py	2007-10-26 10:57:56 EDT (Fri, 26 Oct 2007)
@@ -1,6 +1,7 @@
 # Status: being ported by Vladimir Prus
 # Still to do: call toolset.requirements when those are ported.
 # Remember the location of target.
+# Base revision: 40480
 
 # Copyright Vladimir Prus 2002-2007.
 # Copyright Rene Rivera 2006.
@@ -226,7 +227,10 @@
 
 class GenerateResult:
     
-    def __init__ (self, ur = None, targets = []):
+    def __init__ (self, ur=None, targets=None):
+        if not targets:
+            targets = []
+        
         self.__usage_requirements = ur
         self.__targets = targets
 
@@ -244,7 +248,6 @@
         
         self.__usage_requirements = self.__usage_requirements.add (other.usage_requirements ())
         self.__targets.extend (other.targets ())
-        self.__targets = unique (self.__targets)
 
 class AbstractTarget:
     """ Base class for all abstract targets.
@@ -395,7 +398,6 @@
         for t in self.targets_to_build ():
             g = t.generate (ps)
             result.extend (g)
-
             
         self.manager_.targets().decrease_indent ()
         return result
Modified: branches/build/python_port/python/boost/build/build/virtual_target.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/virtual_target.py	(original)
+++ branches/build/python_port/python/boost/build/build/virtual_target.py	2007-10-26 10:57:56 EDT (Fri, 26 Oct 2007)
@@ -1,5 +1,6 @@
 # Status: being ported by Vladimir Prus
 # Essentially ported, minor fixme remain.
+# Base revision: 40480
 # 
 #  Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
 #  distribute this software is granted provided this copyright notice appears in
@@ -92,6 +93,8 @@
         
         # All targets ever registed
         self.all_targets_ = []
+
+        self.next_id_ = 0
         
     def register (self, target):
         """ Registers a new virtual target. Checks if there's already registered target, with the same
@@ -129,6 +132,9 @@
         # TODO: Don't append if we found pre-existing target?
         self.recent_targets_.append(result)
         self.all_targets_.append(result)
+
+        result.set_id(self.next_id_)
+        self.next_id_ = self.next_id_+1
     
         return result
 
@@ -152,6 +158,10 @@
         result = FileTarget (file, False, file_type, project,
                              None, file_location)       
         self.files_ [path] = result
+        
+        result.set_id(self.next_id_)
+        self.next_id_ = self.next_id_+1
+        
         return result
 
     def recent_targets(self):
@@ -255,6 +265,14 @@
         """
         return self.project_
 
+    def set_id(self, id):
+        self.id_ = id
+
+    def __hash__(self):
+        return self.id_
+
+    def __cmp__(self, other):
+        return self.id_ - other.id_
 
     def depends (self, d):
         """ Adds additional instances of 'VirtualTarget' that this