問題描述
如何簽入從不同存儲庫簽出的代碼 (How to check in code which is checked out from different repository)
We deal with two repositories one at client side and one at our end. I checked out some code from client repository and made some changes.Now I want to check in the same code in our repository. How it can be done ? Also is there any good way to sync two repositories ? PS: I am using Tortoise SVN.
~Ajinkya.
參考解法
方法 1:
After some trial and error I got some workaround. I exported the code from client repository made some changes then I exported it(Right click on folder -> TortoiseSVN -> Export) to new location.Then imported the code to our repository.It helped me for now. Please share if anybody else have any better solution.
方法 2:
Ok a few options.
- if you can use relocate option, you should be able to commit changes another repository.
- If two repositories are simply dulpicated, you can try create a patch.
Above two may not be valid option. Read more: 3. Use merging tools to merge two checkout. Simple and easy. 4. Try Git, it can work with svn.
方法 3:
as far as my knowledge is concerned we cannot commit the code to a repository unless it is checked out from the same repository.
one way to commit in your case is upload the downloaded code from client repository to your repository,check out the same and make changes and then commit. i know this is not as desired by you.
if you find a better approach plz update so that it helps others too..
TNQ
方法 4:
As far as I know, there's no way to specify where you're checking in. svn commit
simply has no option for that.
(by Ajinkya、Ajinkya、xijing dai、Dinakar、Maxpm)