diff hg_delta_editor.py @ 325:4f4db3d2fdbb

2.4 compat fixes.
author Augie Fackler <durin42@gmail.com>
date Mon, 18 May 2009 17:09:26 -0500
parents 05cd4a5138bf
children
line wrap: on
line diff
--- a/hg_delta_editor.py
+++ b/hg_delta_editor.py
@@ -408,7 +408,11 @@ class HgChangeReceiver(delta.Editor):
         for tags_path in self.tag_locations:
             if path and (path.startswith(tags_path) and
                          len(path) > len('%s/' % tags_path)):
-                tag, _, subpath = path[len(tags_path)+1:].partition('/')
+                tag = path[len(tags_path)+1:]
+                if '/' in tag:
+                    tag, subpath = tag.split('/', 1)
+                else:
+                    subpath = ''
                 return (subpath, tag, '%s/%s' % (tags_path, tag))
         return (None, None, None)