@@ -116,7 +116,7 @@ def _set_cache_(self, attr):
116116 except cp .NoSectionError :
117117 raise ValueError ("This submodule instance does not exist anymore in '%s' file"
118118 % os .path .join (self .repo .working_tree_dir , '.gitmodules' ))
119- # end
119+ # end
120120 self ._url = reader .get_value ('url' )
121121 # git-python extension values - optional
122122 self ._branch_path = reader .get_value (self .k_head_option , git .Head .to_full_path (self .k_head_default ))
@@ -411,7 +411,7 @@ def add(cls, repo, name, path, url=None, branch=None, no_checkout=False):
411411 del (writer )
412412
413413 # we deliberatly assume that our head matches our index !
414-
414+
415415 try :
416416 repo .head .commit
417417 parent_repo_is_empty = False
@@ -429,7 +429,7 @@ def add(cls, repo, name, path, url=None, branch=None, no_checkout=False):
429429 return sm
430430
431431 def update (self , recursive = False , init = True , to_latest_revision = False , progress = None , dry_run = False ,
432- force = False , keep_going = False ):
432+ force = False , keep_going = False ):
433433 """Update the repository of this submodule to point to the checkout
434434 we point at with the binsha of this instance.
435435
@@ -444,14 +444,14 @@ def update(self, recursive=False, init=True, to_latest_revision=False, progress=
444444 :param progress: UpdateProgress instance or None of no progress should be shown
445445 :param dry_run: if True, the operation will only be simulated, but not performed.
446446 All performed operations are read-only
447- :param force:
447+ :param force:
448448 If True, we may reset heads even if the repository in question is dirty. Additinoally we will be allowed
449- to set a tracking branch which is ahead of its remote branch back into the past or the location of the
449+ to set a tracking branch which is ahead of its remote branch back into the past or the location of the
450450 remote branch. This will essentially 'forget' commits.
451- If False, local tracking branches that are in the future of their respective remote branches will simply
451+ If False, local tracking branches that are in the future of their respective remote branches will simply
452452 not be moved.
453- :param keep_going: if True, we will ignore but log all errors, and keep going recursively.
454- Unless dry_run is set as well, keep_going could cause subsequent/inherited errors you wouldn't see
453+ :param keep_going: if True, we will ignore but log all errors, and keep going recursively.
454+ Unless dry_run is set as well, keep_going could cause subsequent/inherited errors you wouldn't see
455455 otherwise.
456456 In conjunction with dry_run, it can be useful to anticipate all errors when updating submodules
457457 :note: does nothing in bare repositories
@@ -487,7 +487,8 @@ def update(self, recursive=False, init=True, to_latest_revision=False, progress=
487487 op |= BEGIN
488488 # END handle start
489489
490- progress .update (op , i , len_rmts , prefix + "Fetching remote %s of submodule %r" % (remote , self .name ))
490+ progress .update (op , i , len_rmts , prefix + "Fetching remote %s of submodule %r"
491+ % (remote , self .name ))
491492 #===============================
492493 if not dry_run :
493494 remote .fetch (progress = progress )
@@ -589,11 +590,11 @@ def update(self, recursive=False, init=True, to_latest_revision=False, progress=
589590 base_commit = mrepo .merge_base (mrepo .head .commit , hexsha )
590591 if len (base_commit ) == 0 or base_commit [0 ].hexsha == hexsha :
591592 if force :
592- log .debug ("Will force checkout or reset on local branch that is possibly in the future of" +
593- "the commit it will be checked out to, effectively 'forgetting' new commits" )
593+ log .debug ("Will force checkout or reset on local branch that is possibly in the future of"
594+ + "the commit it will be checked out to, effectively 'forgetting' new commits" )
594595 else :
595- log .info ("Skipping %s on branch '%s' of submodule repo '%s' as it contains un-pushed commits" ,
596- is_detached and "checkout" or "reset" , mrepo .head , mrepo )
596+ log .info ("Skipping %s on branch '%s' of submodule repo '%s' as it contains "
597+ + "un-pushed commits" , is_detached and "checkout" or "reset" , mrepo .head , mrepo )
597598 may_reset = False
598599 # end handle force
599600 # end handle if we are in the future
@@ -619,7 +620,8 @@ def update(self, recursive=False, init=True, to_latest_revision=False, progress=
619620 mrepo .head .reset (hexsha , index = True , working_tree = True )
620621 # END handle checkout
621622 # if we may reset/checkout
622- progress .update (END | UPDWKTREE , 0 , 1 , prefix + "Done updating working tree for submodule %r" % self .name )
623+ progress .update (END | UPDWKTREE , 0 , 1 , prefix + "Done updating working tree for submodule %r"
624+ % self .name )
623625 # END update to new commit only if needed
624626 except Exception as err :
625627 if not keep_going :
@@ -633,7 +635,7 @@ def update(self, recursive=False, init=True, to_latest_revision=False, progress=
633635 # in dry_run mode, the module might not exist
634636 if mrepo is not None :
635637 for submodule in self .iter_items (self .module ()):
636- submodule .update (recursive , init , to_latest_revision , progress = progress , dry_run = dry_run ,
638+ submodule .update (recursive , init , to_latest_revision , progress = progress , dry_run = dry_run ,
637639 force = force , keep_going = keep_going )
638640 # END handle recursive update
639641 # END handle dry run
@@ -898,14 +900,14 @@ def set_parent_commit(self, commit, check=True):
898900 """Set this instance to use the given commit whose tree is supposed to
899901 contain the .gitmodules blob.
900902
901- :param commit:
902- Commit'ish reference pointing at the root_tree, or None to always point to the
903+ :param commit:
904+ Commit'ish reference pointing at the root_tree, or None to always point to the
903905 most recent commit
904906 :param check:
905907 if True, relatively expensive checks will be performed to verify
906908 validity of the submodule.
907909 :raise ValueError: if the commit's tree didn't contain the .gitmodules blob.
908- :raise ValueError:
910+ :raise ValueError:
909911 if the parent commit didn't store this submodule under the current path
910912 :return: self"""
911913 if commit is None :
0 commit comments