Replying Richard Hipp:
> On Mon, May 27, 2013 at 3:35 PM, Isaac Jurado <dipto...@gmail.com> wrote:
>
>> Hello,
>>
>> I'm testing Fossil by migrating a bunch of Mercurial repositories.
>> Unlike Git, Mercurial tracks file renames.  However, in order to create
>> a Fossil repository I have to follow the Mercurial -> Git -> Fossil
>> path.
>>
>> On the first conversion I lose file copying/renaming information.  But
>> the "git fast-export" command has the -M and -C switches to enable
>> copy/rename detection heuristics.  Therefore, the last conversion step
>> looks like:
>>
>>     git fast-export -M -C --all | fossil import --git ../myrepo.fossil
>>
>> The good news is that the heuristics work, as Fossil fails with the
>> following message:
>>
>>     cannot handle R records, use --full-tree
>>
>
> Do you have a git-fast-export output file that you can send me for
> testing purposes (perhaps via private email)?

Well, I've been digging around a bit.  After reading the git-fast-import
man page and doing some experiments, I've discovered the following:

The "R " record has exactly the same syntax as the "C " record.
Therefore, for each file that has been renamed there is a commit record
like:

    R old_name new_name

If, apart from a rename, there were changes in the file contents, an
additional "M " record is appended just below the rename.

I'm not really sure about the value and support of file rename in
Fossil for three reasons:

  1. There is no "copy" command
  2. The "mv/rename" command does not actually operate on the
     filesystem, but after the user has performed the operation
  3. This mail:
  http://lists.fossil-scm.org:8080/pipermail/fossil-users/2008-July/000325.html

I'm willing to carry on and try to fix this missing import piece, but
only if it is worth the trouble.

Does "mv/rename" improve the delta algorithm and/or file tracking in any
way?

Regards.

-- 
Isaac Jurado

"The noblest pleasure is the joy of understanding."
                                  Leonardo da Vinci
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to