开发者

How to move up a bazaar repository one hierarchy level up?

I have a project hierarchy like this, with a bazaar repository that has been created in subFolder_1.

 a_folder
   +-- subFolder_1
       +-- .bzr
       +-- ... (more content)
   +-- subFolder_2

I now would like to move the bazaar repository one level up, like if I had created it in a_folder.

The new structure should then look like this:

开发者_如何学JAVA a_folder
   +-- .bzr
   +-- subFolder_1
       +-- ... (more content)
   +-- subFolder_2

I would like to keep the history (commit logs and content of the commits). How should I proceed?


Make a backup before trying the following:

cd subFolder_1

# tell bzr that all your files moved into a subFolder_1:
bzr mkdir subFolder_1
bzr mv <all the files in subFolder_1> subFolder_1

# move the .bzr dir to a_folder
mv .bzr ..

# move your files back to where they belong
mv subFolder_1/<all the files in subFolder_1> .
rmdir subFolder_1

# now everything should be as you want it
cd ..
bzr commit


Just copy content of a_folder (subFolder_1 and subFolder_2) inside subFolder_1 except .bzr of course.
Add and commit.
Move with bzr +-- ... (more content) to newly created subFolder_1.
Then, rename with explorer your top old-folder +-- subFolder_1 to a_folder.
Then you can also push your project to nother name/branch.


I just went the easy way: moved the .bzr directory one level up. Next commit, everything was removed / added as every path was modified (different root hierarchy).
Aside from that, it seems to work. I didn't notice any side effect.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜