[PATCH 1 of 1] subrepo: abort when there's no parent.path (issue2970)

Marc Simpson marc at 0branch.com
Thu Aug 25 14:51:10 CDT 2011


# HG changeset patch
# User Marc Simpson <marc at 0branch.com>
# Date 1314301680 -3600
# Node ID f6f5b75d63f1493c2e7093f7f17924256428f09d
# Parent  ff3e9368630663194c00bf47bee7097936fb4b51
subrepo: abort when there's no parent.path (issue2970)

diff -r ff3e93686306 -r f6f5b75d63f1 mercurial/subrepo.py
--- a/mercurial/subrepo.py	Mon Aug 22 00:42:38 2011 +0200
+++ b/mercurial/subrepo.py	Thu Aug 25 20:48:00 2011 +0100
@@ -204,6 +204,9 @@
         parent = _abssource(repo._subparent, push, abort=False)
         if parent:
             parent = util.url(parent)
+            if parent.path is None:
+                raise util.Abort(_("access to subrepository '%s' denied."
+                                 % source.path))
             parent.path = posixpath.join(parent.path, source.path)
             parent.path = posixpath.normpath(parent.path)
             return str(parent)


More information about the Mercurial-devel mailing list