On Mar 26, 2008, at 1:30 PM, mabshoff wrote:

> On Mar 26, 9:27 pm, Robert Bradshaw <[EMAIL PROTECTED]>
> wrote:
>> On Mar 26, 2008, at 11:53 AM, William Stein wrote:
>>
>>
>>
>>> Hi Jason (or anybody),
>>
>>> Does anybody have a clue if it is possible to take a directory  
>>> (e.g.,
>>> devel/sage/) with an .hg repo directory
>>> in it, and do the following:
>>
>>>   (1) export everything in the .hg repo to something (perhaps a  
>>> ton of
>>> stuff) in plain text format,
>>>   (2) delete .hg
>>>   (3) do something that recovers the .hg directory from the output
>>> of (1).
>>
>>> Note that just doing hg_sage.export([0..10000]), where say 10000 is
>>> the tip, doesn't work, because
>>> that looses all information about branching, etc., hence fails
>>> completely.
>>
>>> If mercurial can't do the above, that is a _very_ serious problem  
>>> for
>>> the longterm viability of
>>> Mercurial at least for Sage.      So any ideas how to do the above?
>>
>>> The reason for doing (1) -- (3) is that it is possible to scan  
>>> an .hg
>>> directory with antivirus tools.
>>> Thus something silly like "base64-encode a tarball of .hg" won't  
>>> work.
>>
>> I think it should be possible to export a series of patches and a
>> (python) script that would apply the patches in the right order,
>> clone, and merge to get back the original repository. It might not be
>> the most efficient however. I'll look into this more.
>>
>> Has anyone tried contacting the mercurial developers?
>
> Nope, that doesn't work on the Sage repo. Exporting all 9028
> changesets of 2.11.alpha1 took about 40 minutes, but on reimport to a
> fresh repo failed around 1300 changesets. The problem is that export
> of a merge on diffs against on parent. So if you resolve a merge
> conflict in a merge changeset things go FUBAR.
>
> That was with 0.9.5, but I haven't tried 1.0 yet.

I was talking about something more sophisticated than export/import,  
which won't work the instant one has multiple branches. One needs to  
actually create multiple heads, apply patches, then resolve them. Hg  
export doesn't have enough information to do this.

- Robert



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to