700 hg.clean(self._repo, node.nullid, False) |
700 hg.clean(self._repo, node.nullid, False) |
701 |
701 |
702 def _get(self, state): |
702 def _get(self, state): |
703 source, revision, kind = state |
703 source, revision, kind = state |
704 if revision in self._repo.unfiltered(): |
704 if revision in self._repo.unfiltered(): |
705 return |
705 return True |
706 self._repo._subsource = source |
706 self._repo._subsource = source |
707 srcurl = _abssource(self._repo) |
707 srcurl = _abssource(self._repo) |
708 other = hg.peer(self._repo, {}, srcurl) |
708 other = hg.peer(self._repo, {}, srcurl) |
709 if len(self._repo) == 0: |
709 if len(self._repo) == 0: |
710 self._repo.ui.status(_('cloning subrepo %s from %s\n') |
710 self._repo.ui.status(_('cloning subrepo %s from %s\n') |
726 bookmarks.updatefromremote(self._repo.ui, self._repo, |
726 bookmarks.updatefromremote(self._repo.ui, self._repo, |
727 remotebookmarks, srcurl) |
727 remotebookmarks, srcurl) |
728 if cleansub: |
728 if cleansub: |
729 # keep the repo clean after pull |
729 # keep the repo clean after pull |
730 self._cachestorehash(srcurl) |
730 self._cachestorehash(srcurl) |
|
731 return False |
731 |
732 |
732 @annotatesubrepoerror |
733 @annotatesubrepoerror |
733 def get(self, state, overwrite=False): |
734 def get(self, state, overwrite=False): |
734 self._get(state) |
735 inrepo = self._get(state) |
735 source, revision, kind = state |
736 source, revision, kind = state |
736 self._repo.ui.debug("getting subrepo %s\n" % self._path) |
737 repo = self._repo |
737 hg.updaterepo(self._repo, revision, overwrite) |
738 repo.ui.debug("getting subrepo %s\n" % self._path) |
|
739 if inrepo: |
|
740 urepo = repo.unfiltered() |
|
741 ctx = urepo[revision] |
|
742 if ctx.hidden(): |
|
743 urepo.ui.warn( |
|
744 _('revision %s in subrepo %s is hidden\n') \ |
|
745 % (revision[0:12], self._path)) |
|
746 repo = urepo |
|
747 hg.updaterepo(repo, revision, overwrite) |
738 |
748 |
739 @annotatesubrepoerror |
749 @annotatesubrepoerror |
740 def merge(self, state): |
750 def merge(self, state): |
741 self._get(state) |
751 self._get(state) |
742 cur = self._repo['.'] |
752 cur = self._repo['.'] |