comparison mercurial/subrepo.py @ 15286:4be845e3932c stable

subrepo: pull revisions on demand when archiving hg subrepos Before, running 'hg archive -S' could result in abort: unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'! if a subrepo was missing completely or had missing changesets. Now, the missing changesets will be pulled or cloned as appropriate. This make Mercurial subrepos match Git subrepos which already took care to fetch any missing commits before starting the archive.
author Martin Geisler <mg@aragost.com>
date Mon, 17 Oct 2011 16:45:19 +0200
parents 5d700b7edd85
children b3e19c355ca7
comparison
equal deleted inserted replaced
15285:42e71f5852ee 15286:4be845e3932c
416 except error.RepoLookupError, inst: 416 except error.RepoLookupError, inst:
417 self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n') 417 self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n')
418 % (inst, subrelpath(self))) 418 % (inst, subrelpath(self)))
419 419
420 def archive(self, ui, archiver, prefix): 420 def archive(self, ui, archiver, prefix):
421 self._get(self._state + ('hg',))
421 abstractsubrepo.archive(self, ui, archiver, prefix) 422 abstractsubrepo.archive(self, ui, archiver, prefix)
422 423
423 rev = self._state[1] 424 rev = self._state[1]
424 ctx = self._repo[rev] 425 ctx = self._repo[rev]
425 for subpath in ctx.substate: 426 for subpath in ctx.substate: