开发者

How can I merge new previously-uncommitted changes from a former subversion working directory into a newly imported bazaar repository?

开发者 https://www.devze.com 2023-01-28 14:49 出处:网络
I had upgraded to Ubuntu server开发者_开发问答 10.04 - however it removed SVK which I had been using for distributed-vc needs, as much of my old projects were still wrapped up in self-hosted subversio

I had upgraded to Ubuntu server开发者_开发问答 10.04 - however it removed SVK which I had been using for distributed-vc needs, as much of my old projects were still wrapped up in self-hosted subversion repositories on various servers. This was working adequately for the time being between my various systems. I decided to migrate onto Bazaar which I was already evaluating using in newer projects.

I have installed the bzr-svn plugin to allow the use of svn-import - and successfully set up repositories in /var/bzr/repos/ where all the projects were imported into their own set (using the auto-detected trunk2 layout). bzr log confirms successful importation of all the projects.

Unfortunately, several of my projects have several uncommitted changes in a working folder - these I would like to remerge back into the central /var/bzr/repos/projectname repository. I would like these to be new revisions on top of the newly imported repositories.

How should I go about this?

These working folders are i.e. /var/www/projectname/htdocs - some are on the development server, and some are on a windows laptop (which already has bazaar and subversion installed)

I have tried running bzr init and bzr merge file://var/bzr/repos/projectname/trunk - this creates a large number of conflicts; alternatively I have tried: bzr init; bzr add, and bzr merge .

In each case I have tried erasing the newly generated files from the merge - and renaming .moved files back, and committing - this has the effect of causing the revision numbers to start from 1, and running backwards to -301. Another different result was the total loss of log history when I tried to "bzr push" locally committed changes back up. Fortunately I have been able to reset and reimport the repository from the original subversion source each time.

The long route would be to simply branch/checkout into a new folder, and diff/redo the new changes over, but I would like to avoid recoding changes or running a kdiff directory merge operation.

The desired result would be to have the new changes applied onto the central /var/bzr/repos/projectname branch while preserving the revision numbers and log.


If I understand correctly, I would: copy the .bzr dir from the branch you want to base the other changes on (mainline/main) into the workingdir with the other changes. Then you can do a bzr commit in there and push it to your mainline/main branch. Repeat for each workingtree with uncommitted changes.


If you havent't commited on the bzr repository, you can commit on the svn working folder (therefore placing those changes on the SVN repository), and repeat the svn-import operation with bazaar. It will only add the missing revisions.

0

精彩评论

暂无评论...
验证码 换一张
取 消