[Digicool-CVS] CVS: CVSROOT - adjustlinks.py:1.5
Mon, 6 Aug 2001 12:45:39 -0400
Update of /cvs-repository/CVSROOT
In directory cvs.zope.org:/tmp/cvs-serv32550
For checkin notifcation unravelling, there was one more potential
container missing from the computation, which this checkin fixes.
When a checkin happens in a symlinked directory, the actual containing
path (which path_element_inodes was computing, but throwing away) was
not included in the list of candidates. This info is now returned
from path_element_inodes(), and included by .all_containers() when
it's different than the specified checkin path.
=== CVSROOT/adjustlinks.py 1.4 => 1.5 ===
"""Given a repo-relative path, return *all* the repository paths that
- contain it - both direct containers, and containers by virtue of
- symlinks in the repolinks map.
+ contain it - direct containers *and* directories that container it by
+ virtue of symlinks in the repolinks map.
- Used to identify all the checkin-notification subscriber entries that
- qualify for a particular file, not just the direct containers of the
+ This is used in postcommit_actions to identify all the
+ checkin-notification subscriber entries that qualify for a particular
+ file, not just the containers obvious from the checkin path.
We expect a path relative to the repository root, and return paths
relative to the repository root."""
@@ -235,8 +235,10 @@
path = path[len(os.sep):]
path = os.path.join(REPO_ROOT, path)
- element_inodes = path_element_inodes(path)
+ actual_path, element_inodes = path_element_inodes(path)
+ # Include actual path - it may be different than specified one.
+ got[actual_path[len(REPO_ROOT)+1:]] = 1
for link, target, lineno in self._recipe_lines:
and (os.stat(target)[ST_INO] in element_inodes)):
@@ -249,6 +251,7 @@
"""Return inodes of directory elements leading to path's physical location.
We return the empty list if path doesn't actually exist."""
+ actual_path = None
got = 
if (os.path.exists(path) or os.path.exists(split(path))):
origdir = os.getcwd()
@@ -258,14 +261,14 @@
- here = os.getcwd()
+ here = actual_path = os.getcwd()
while here and (here != '/'):
here = split(here)
- return got
+ return (actual_path, got)