366 pass |
366 pass |
367 |
367 |
368 def forget(self, ui, match, prefix): |
368 def forget(self, ui, match, prefix): |
369 return [] |
369 return [] |
370 |
370 |
|
371 def revert(self, ui, substate, *pats, **opts): |
|
372 return [] |
|
373 |
371 class hgsubrepo(abstractsubrepo): |
374 class hgsubrepo(abstractsubrepo): |
372 def __init__(self, ctx, path, state): |
375 def __init__(self, ctx, path, state): |
373 self._path = path |
376 self._path = path |
374 self._state = state |
377 self._state = state |
375 r = ctx._repo |
378 r = ctx._repo |
570 return ctx.walk(match) |
573 return ctx.walk(match) |
571 |
574 |
572 def forget(self, ui, match, prefix): |
575 def forget(self, ui, match, prefix): |
573 return cmdutil.forget(ui, self._repo, match, |
576 return cmdutil.forget(ui, self._repo, match, |
574 os.path.join(prefix, self._path), True) |
577 os.path.join(prefix, self._path), True) |
|
578 |
|
579 def revert(self, ui, substate, *pats, **opts): |
|
580 # reverting a subrepo is done by updating it to the revision |
|
581 # specified in the corresponding substate dictionary |
|
582 ui.status(_('reverting subrepo %s\n') % substate[0]) |
|
583 |
|
584 # Update the repo to the revision specified in the given substate |
|
585 self.get(substate, overwrite=True) |
575 |
586 |
576 class svnsubrepo(abstractsubrepo): |
587 class svnsubrepo(abstractsubrepo): |
577 def __init__(self, ctx, path, state): |
588 def __init__(self, ctx, path, state): |
578 self._path = path |
589 self._path = path |
579 self._state = state |
590 self._state = state |