changeset 13753:78a0a815fd41

subrepo: simplify hgsubrepo._get a little
author Martin Geisler <mg@aragost.com>
date Thu, 24 Mar 2011 18:17:49 +0100
parents 366e014a1ded
children ae157ca56cd5
files mercurial/subrepo.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Thu Mar 24 08:51:58 2011 -0700
+++ b/mercurial/subrepo.py	Thu Mar 24 18:17:49 2011 +0100
@@ -432,9 +432,7 @@
 
     def _get(self, state):
         source, revision, kind = state
-        try:
-            self._repo.lookup(revision)
-        except error.RepoError:
+        if revision not in self._repo:
             self._repo._subsource = source
             srcurl = _abssource(self._repo)
             self._repo.ui.status(_('pulling subrepo %s from %s\n')