@@ -275,7 +275,7 @@ def add(cls, repo, name, path, url=None, branch=None, no_checkout=False):
275275 branch_is_default = branch is None
276276 if has_module and url is not None :
277277 if url not in [r .url for r in sm .module ().remotes ]:
278- raise ValueError ("Specified URL '%s' does not match any remote url of the repository at '%s'" % (url , sm .module_path () ))
278+ raise ValueError ("Specified URL '%s' does not match any remote url of the repository at '%s'" % (url , sm .abspath ))
279279 # END check url
280280 # END verify urls match
281281
@@ -287,7 +287,7 @@ def add(cls, repo, name, path, url=None, branch=None, no_checkout=False):
287287 mrepo = sm .module ()
288288 urls = [r .url for r in mrepo .remotes ]
289289 if not urls :
290- raise ValueError ("Didn't find any remote url in repository at %s" % sm .module_path () )
290+ raise ValueError ("Didn't find any remote url in repository at %s" % sm .abspath )
291291 # END verify we have url
292292 url = urls [0 ]
293293 else :
@@ -493,7 +493,7 @@ def move(self, module_path):
493493 #END handle existance
494494
495495 # move the module into place if possible
496- cur_path = self .module_path ()
496+ cur_path = self .abspath
497497 if os .path .exists (cur_path ):
498498 os .renames (cur_path , dest_path )
499499 #END move physical module
@@ -522,8 +522,6 @@ def move(self, module_path):
522522
523523 return self
524524
525-
526-
527525 @unbare_repo
528526 def remove (self , module = True , force = False , configuration = True , dry_run = False ):
529527 """Remove this submodule from the repository. This will remove our entry
@@ -559,7 +557,7 @@ def remove(self, module=True, force=False, configuration=True, dry_run=False):
559557 # take the fast lane and just delete everything in our module path
560558 # TODO: If we run into permission problems, we have a highly inconsistent
561559 # state. Delete the .git folders last, start with the submodules first
562- mp = self .module_path ()
560+ mp = self .abspath
563561 method = None
564562 if os .path .islink (mp ):
565563 method = os .remove
@@ -691,7 +689,7 @@ def module(self):
691689 :raise InvalidGitRepositoryError: if a repository was not available. This could
692690 also mean that it was not yet initialized"""
693691 # late import to workaround circular dependencies
694- module_path = self .module_path ()
692+ module_path = self .abspath
695693 try :
696694 repo = git .Repo (module_path )
697695 if repo != self .repo :
@@ -703,10 +701,6 @@ def module(self):
703701 raise InvalidGitRepositoryError ("Repository at %r was not yet checked out" % module_path )
704702 # END handle exceptions
705703
706- def module_path (self ):
707- """:return: full path to the root of our module. It is relative to the filesystem root"""
708- return join_path_native (self .repo .working_tree_dir , self .path )
709-
710704 def module_exists (self ):
711705 """:return: True if our module exists and is a valid git repository. See module() method"""
712706 try :
0 commit comments