Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 20317:d6939f29b3b3 stable
subrepo: do not try to get hidden revisions
If a subrepo revision is hidden (because it was amended, for example) it does
not make sense to try to "get" it from the remote subrepository.
Note that in order to avoid making the change look bigger than it is, this adds
an unnecessary else clause. This will be removed on a follow up patch.
author | Angel Ezquerra <angel.ezquerra@gmail.com> |
---|---|
date | Sun, 24 Nov 2013 02:10:14 +0100 |
parents | 4c96c50ef937 |
children | c5aef7a66607 |
comparison
equal
deleted
inserted
replaced
20316:40f08c31844c | 20317:d6939f29b3b3 |
---|---|
699 self._repo.ui.note(_('removing subrepo %s\n') % subrelpath(self)) | 699 self._repo.ui.note(_('removing subrepo %s\n') % subrelpath(self)) |
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 not in self._repo: | 704 if revision in self._repo.unfiltered(): |
705 return | |
706 else: | |
705 self._repo._subsource = source | 707 self._repo._subsource = source |
706 srcurl = _abssource(self._repo) | 708 srcurl = _abssource(self._repo) |
707 other = hg.peer(self._repo, {}, srcurl) | 709 other = hg.peer(self._repo, {}, srcurl) |
708 if len(self._repo) == 0: | 710 if len(self._repo) == 0: |
709 self._repo.ui.status(_('cloning subrepo %s from %s\n') | 711 self._repo.ui.status(_('cloning subrepo %s from %s\n') |