How can I diff two arbitrary revisions in Mercurial in such a way that I can apply the diff to an SVN working copy?

You have several options to transfer the tip to you svn directory: hg diff & patch: cd /svn/working/copy hg -R /hg/working/copy -r svn.15500:tip | patch -p1` copying changed files! /bin/bash REV=$1 HG=/hg/working/copy cd /svn/working/copy # copy changed files, tar is used instead of cp to preserve file paths hg -R $HG st --rev $REV:tip -man0 | xargs -0 tar -cC $HG | tar x # add new files, cuses warnings if there are no new files hg -R $HG st --rev $REV:tip -an0 | xargs -0 svn add # remove deleted files, will cause warnings if there are no deleted files hg -R $HG st --rev $REV:tip -rn0 | xargs svn rm Another way is to use tortoisehg where along with the rebase extension cloning is possible. This would be the following workflow: hgimportsvn http://svn.

Server/repo/trunk cd trunk hgpullsvn cd .. hg clone trunk work cd work #Hack Hack Hack cd ../trunk hgpullsvn # if there are new revisions rebase ../work before pull hg pull ../work hgpushsvn #rebase cd work hg pull --rebase.

You have several options to transfer the tip to you svn directory: hg diff & patch: cd /svn/working/copy hg -R /hg/working/copy -r svn.15500:tip | patch -p1` copying changed files #! /bin/bash REV=$1 HG=/hg/working/copy cd /svn/working/copy # copy changed files, tar is used instead of cp to preserve file paths hg -R $HG st --rev $REV:tip -man0 | xargs -0 tar -cC $HG | tar x # add new files, cuses warnings if there are no new files hg -R $HG st --rev $REV:tip -an0 | xargs -0 svn add # remove deleted files, will cause warnings if there are no deleted files hg -R $HG st --rev $REV:tip -rn0 | xargs svn rm Another way is to use tortoisehg, where along with the rebase extension cloning is possible. This would be the following workflow: hgimportsvn http://svn.

Server/repo/trunk cd trunk hgpullsvn cd .. hg clone trunk work cd work #Hack Hack Hack cd ../trunk hgpullsvn # if there are new revisions rebase ../work before pull hg pull ../work hgpushsvn #rebase cd work hg pull --rebase.

What I ended up doing was rather lame (I think). My goal was to take the contents of my Mercurial repository and overwrite my SVN working copy with them (so I can commit them to SVN later). I don't really care about the detailed history of the changes from Mercurial - the commit will be "rolled up" in the SVN repo.

Non-working approach, A1: delete SVN working copy contents and then copy over the Mercurial working copy. Will not work because ... the . Svn folders get destroyed.

Working approach, A2: Use the find command to delete everything but the . Svn folders from the SVN working copy. Then just copy the Mecurial working copy over.

SVN will detect the changes and allow me to commit. Problems with approach A2: 1. It's manual.2.

If any directories are empty, Mercurial won't be tracking those, but they will be in the SVN repository (I haven't had this problem, but it could happen). 3. Lose Mecurial history on the SVN side.

There's not much you can do about this since the SVN metadata is not as rich as Mercurial's. 4. Only good when one developer is committing in the SVN repo.

If multiple devs are committing, then you will have to synchronize with all of their changes, including syncing those changes with all clones. Advantages with approach A2: 1) It's easy. In the svn working copy root, run this command: # delete all files in an SVN working copy, except those # in the .

Svn folders; directories are not deleted find . -path "*. Svn" -prune -o -type f -exec rm -v {} + Use the file manager to drag the Mecurial working copy contents into the SVN working copy (you can use a script for this).

Use TortoiseSVN to commit (you can verify all the changes easily that way). With that said, I'll accept the previous answer as it's probably The Right Way to do it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions