At file:///data/jelmer/bzr-svn/trunk/

------------------------------------------------------------
revno: 1881
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: trunk
timestamp: Tue 2008-09-09 04:52:20 +0200
message:
  Fix parsing of paths in v4.
modified:
  layout.py                      layout.py-20080323165407-y9qw8nx4oykvoe1k-1
=== modified file 'layout.py'
--- a/layout.py 2008-09-06 23:49:34 +0000
+++ b/layout.py 2008-09-09 02:52:20 +0000
@@ -182,7 +182,7 @@
             inside the branch
         """
         assert isinstance(path, str)
-        parts = path.split("/")
+        parts = path.strip("/").split("/")
         for i, p in enumerate(parts):
             if (i > 0 and parts[i-1] in ("branches", "tags")) or p == "trunk":
                 if parts[i-1] == "tags":
@@ -438,7 +438,7 @@
         :return: Tuple with type ('tag', 'branch'), project name, branch path 
and path 
             inside the branch
         """
-        parts = path.split("/")
+        parts = path.strip("/").split("/")
         for i in range(len(parts)+1):
             bp = "/".join(parts[:i])
             if self.is_branch(bp):
@@ -562,7 +562,7 @@
     for idx, pattern in enumerate(itemlist):
         if pb is not None:
             pb.update("finding branches", idx, len(itemlist))
-        for bp in expand_branch_pattern([], pattern.split("/"), check_path,
+        for bp in expand_branch_pattern([], pattern.strip("/").split("/"), 
check_path,
                 find_children, project):
             if verify_fn(bp, project):
                 yield "", bp, bp.split("/")[-1]


-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to