Changes between Version 32 and Version 33 of DarcsEvaluation


Ignore:
Timestamp:
Jul 24, 2008 2:32:21 PM (7 years ago)
Author:
batterseapower
Comment:

Mercurial equivalent to Git problem

Legend:

Unmodified
Added
Removed
Modified
  • DarcsEvaluation

    v32 v33  
    352352This goes wrong with git version 1.5.2.5.  I wouldn't be surprised if other versions work, but the underlying issue is that git doesn't store information about file and directory renames, and has to rely on heuristics to recover the information when necessary.  Converting a darcs repo into a git repo is a lossy conversion - it discards information about renames.
    353353
     354Hg doesn't seem to deal with it well either:
     355{{{
     356rm -rf repo1 repo2
     357
     358mkdir repo1
     359cd repo1
     360hg init
     361printf "b\nd\n" >file
     362hg add file
     363hg status
     364hg commit -m "bd"
     365
     366cd ..
     367hg clone repo1 repo2
     368 
     369cd repo1
     370hg rename file file1
     371hg commit -m move
     372printf "a\nb\nd\ne\n" >file1
     373hg commit -m "abde" file1
     374printf "a\nb\nc\nd\ne\n" >file1
     375hg commit -m "abcde" file1
     376 
     377cd ../repo2
     378hg transplant --source ../repo1 tip
     379# transplant the most recent change from repo1
     380# BANG!!!
     381#
     382# searching for changes
     383# applying b613e5e3dc1a
     384# unable to find 'file1' for patching
     385# 1 out of 1 hunk FAILED -- saving rejects to file file1.rej
     386# file1: No such file or directory
     387# patch failed to apply
     388# abort: Fix up the merge and run hg transplant --continue
     389}}}
    354390
    355391== Darcs alternatives still in the running ==