##// END OF EJS Templates
subrepo: remove unnecessary else clause in hgsubrepo._get...
Angel Ezquerra -
r20318:c5aef7a6 stable
parent child Browse files
Show More
@@ -703,32 +703,31 b' class hgsubrepo(abstractsubrepo):'
703 703 source, revision, kind = state
704 704 if revision in self._repo.unfiltered():
705 705 return
706 self._repo._subsource = source
707 srcurl = _abssource(self._repo)
708 other = hg.peer(self._repo, {}, srcurl)
709 if len(self._repo) == 0:
710 self._repo.ui.status(_('cloning subrepo %s from %s\n')
711 % (subrelpath(self), srcurl))
712 parentrepo = self._repo._subparent
713 shutil.rmtree(self._repo.path)
714 other, cloned = hg.clone(self._repo._subparent.baseui, {},
715 other, self._repo.root,
716 update=False)
717 self._repo = cloned.local()
718 self._initrepo(parentrepo, source, create=True)
719 self._cachestorehash(srcurl)
706 720 else:
707 self._repo._subsource = source
708 srcurl = _abssource(self._repo)
709 other = hg.peer(self._repo, {}, srcurl)
710 if len(self._repo) == 0:
711 self._repo.ui.status(_('cloning subrepo %s from %s\n')
712 % (subrelpath(self), srcurl))
713 parentrepo = self._repo._subparent
714 shutil.rmtree(self._repo.path)
715 other, cloned = hg.clone(self._repo._subparent.baseui, {},
716 other, self._repo.root,
717 update=False)
718 self._repo = cloned.local()
719 self._initrepo(parentrepo, source, create=True)
721 self._repo.ui.status(_('pulling subrepo %s from %s\n')
722 % (subrelpath(self), srcurl))
723 cleansub = self.storeclean(srcurl)
724 remotebookmarks = other.listkeys('bookmarks')
725 self._repo.pull(other)
726 bookmarks.updatefromremote(self._repo.ui, self._repo,
727 remotebookmarks, srcurl)
728 if cleansub:
729 # keep the repo clean after pull
720 730 self._cachestorehash(srcurl)
721 else:
722 self._repo.ui.status(_('pulling subrepo %s from %s\n')
723 % (subrelpath(self), srcurl))
724 cleansub = self.storeclean(srcurl)
725 remotebookmarks = other.listkeys('bookmarks')
726 self._repo.pull(other)
727 bookmarks.updatefromremote(self._repo.ui, self._repo,
728 remotebookmarks, srcurl)
729 if cleansub:
730 # keep the repo clean after pull
731 self._cachestorehash(srcurl)
732 731
733 732 @annotatesubrepoerror
734 733 def get(self, state, overwrite=False):
General Comments 0
You need to be logged in to leave comments. Login now