Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 15474:95174c381525
forget: support forgetting explicit paths in subrepos
Change the behavior of the forget command such that explicit paths in
subrepos are handled by forgetting the file in the subrepo. This eliminates the
previous behavior where if you called "hg forget" for an explicit path in a
subrepo, it would state that the file is already untracked.
author | David M. Carr <david@carrclan.us> |
---|---|
date | Wed, 09 Nov 2011 19:46:51 -0500 |
parents | 9e99d2bbb1b1 |
children | 646759147717 |
comparison
equal
deleted
inserted
replaced
15473:d90b0b30464b | 15474:95174c381525 |
---|---|
358 walk recursively through the directory tree, finding all files | 358 walk recursively through the directory tree, finding all files |
359 matched by the match function | 359 matched by the match function |
360 ''' | 360 ''' |
361 pass | 361 pass |
362 | 362 |
363 def forget(self, files): | |
364 pass | |
365 | |
363 class hgsubrepo(abstractsubrepo): | 366 class hgsubrepo(abstractsubrepo): |
364 def __init__(self, ctx, path, state): | 367 def __init__(self, ctx, path, state): |
365 self._path = path | 368 self._path = path |
366 self._state = state | 369 self._state = state |
367 r = ctx._repo | 370 r = ctx._repo |
550 return ctx.flags(name) | 553 return ctx.flags(name) |
551 | 554 |
552 def walk(self, match): | 555 def walk(self, match): |
553 ctx = self._repo[None] | 556 ctx = self._repo[None] |
554 return ctx.walk(match) | 557 return ctx.walk(match) |
558 | |
559 def forget(self, files): | |
560 ctx = self._repo[None] | |
561 ctx.forget(files) | |
555 | 562 |
556 class svnsubrepo(abstractsubrepo): | 563 class svnsubrepo(abstractsubrepo): |
557 def __init__(self, ctx, path, state): | 564 def __init__(self, ctx, path, state): |
558 self._path = path | 565 self._path = path |
559 self._state = state | 566 self._state = state |