[PATCH 3 of 5] localrepo: add memcommit() to commit without working directory
Patrick Mézard
pmezard at gmail.com
Sat Jun 14 10:29:23 CDT 2008
Patrick Mézard a écrit :
> Matt Mackall a écrit :
>> Seems unfortunate to introduce a whole new type for this when we have
>> something that's almost what's wanted.
>>
>> Here's another approach: let's make commit take a context and then
>> invent a new sort of context that we'd call a memctx. A memctx would be
>> a subclass of a regular ctx with the ability to overlay various bits of
>> it (parents, branch names, file flags and contents).
>
> Trying use filectx() instead of filelog, I hit workingfilectx.renamed():
>
> """
> def renamed(self):
> rp = self._repopath
> if rp == self._path:
> return None
> return rp, self._changectx._parents[0]._manifest.get(rp, nullid)
> """
>
> Shouldn't we talk to the dirstate instead, returning self._repo.dirstate.copied(rp) or something like that ?
Ignore that, self._repopath already does that.
--
Patrick Mézard
More information about the Mercurial-devel
mailing list