Mercurial > hg
comparison mercurial/subrepo.py @ 13753:78a0a815fd41
subrepo: simplify hgsubrepo._get a little
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Thu, 24 Mar 2011 18:17:49 +0100 |
parents | 4f5ed2bd1724 |
children | ce6227306c9a |
comparison
equal
deleted
inserted
replaced
13752:366e014a1ded | 13753:78a0a815fd41 |
---|---|
430 self._repo.ui.note(_('removing subrepo %s\n') % subrelpath(self)) | 430 self._repo.ui.note(_('removing subrepo %s\n') % subrelpath(self)) |
431 hg.clean(self._repo, node.nullid, False) | 431 hg.clean(self._repo, node.nullid, False) |
432 | 432 |
433 def _get(self, state): | 433 def _get(self, state): |
434 source, revision, kind = state | 434 source, revision, kind = state |
435 try: | 435 if revision not in self._repo: |
436 self._repo.lookup(revision) | |
437 except error.RepoError: | |
438 self._repo._subsource = source | 436 self._repo._subsource = source |
439 srcurl = _abssource(self._repo) | 437 srcurl = _abssource(self._repo) |
440 self._repo.ui.status(_('pulling subrepo %s from %s\n') | 438 self._repo.ui.status(_('pulling subrepo %s from %s\n') |
441 % (subrelpath(self), srcurl)) | 439 % (subrelpath(self), srcurl)) |
442 other = hg.repository(self._repo.ui, srcurl) | 440 other = hg.repository(self._repo.ui, srcurl) |