patch: monotone source for mercurial convert extension
pmezard at gmail.com
Tue Mar 25 11:49:46 CDT 2008
Mikkel Fahnøe Jørgensen a écrit :
>> Patrick Mézard:
>> FYI, the original converter did not record file removal. I don't know if the issue was
>> already in your submission or came during the integration but it's fixed by now.
> I think it was something I happened to voice my opinion about :-)
> There was no direct delete support when I wrote the code, but my
> converter does handle rename and deletion (based on one other
> converter doing something similar - svn I think). Deletion works as
> follows: the driver logic assumes file delete in hg when get file
> fails in the converter object. The converter should then try to only
> generate errors for deleted files. In monotone->hg this is handled by
> caching a list of known files and directories. There is a slight twist
> on this, since hg doesn't track directories directly and in monotone a
> directory might be deleted, or renamed thereby complicating the
> conversion logic, but this ought to be handled correctly.
Ok, the problem is the driver does not try to get the file if it is not listed in the list returned by getchanges(), so the error is never raised. I fixed it so the unit test would pass, details are here:
I probably missed the issue with deleted directories though. Sorry if I fixed this too fast, if you have a better fix in mind do not hesitate, there is no problem undoing mine to push a better one. I will add a test for removed directories and see what happens.
More information about the Mercurial-devel