[CMF-checkins] CVS: CMF/CMFStaging - VersionsTool.py:1.16

Shane Hathaway shane at zope.com
Mon Mar 29 15:14:50 EST 2004


Update of /cvs-repository/CMF/CMFStaging
In directory cvs.zope.org:/tmp/cvs-serv13494

Modified Files:
	VersionsTool.py 
Log Message:
Separated the auto-copy-forward tests.

One test tries a sticky tag.  The other tries an old but non-sticky tag.


=== CMF/CMFStaging/VersionsTool.py 1.15 => 1.16 ===
--- CMF/CMFStaging/VersionsTool.py:1.15	Wed Feb  4 17:05:02 2004
+++ CMF/CMFStaging/VersionsTool.py	Mon Mar 29 15:14:20 2004
@@ -122,12 +122,11 @@
         if not repo.isUnderVersionControl(obj):
             repo.applyVersionControl(obj)
         elif self.auto_copy_forward:
-            info = repo.getVersionInfo(obj)
-            stuck = (info.sticky and info.sticky[0] != 'B')
-            if stuck:
-                # The object has a sticky tag.  Get it unstuck by
-                # copying the old state forward after the object
-                # has been checked out.
+            if not repo.isResourceUpToDate(obj, require_branch=1):
+                # The object is not at the latest revision or has a
+                # sticky tag.  Get it unstuck by copying the old state
+                # forward after the object has been checked out.
+                info = repo.getVersionInfo(obj)
                 old_state = repo.getVersionOfResource(
                     info.history_id, info.version_id)
                 # Momentarily revert to the branch.




More information about the CMF-checkins mailing list