You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by yixiaodafang <yi...@gmail.com> on 2010/04/23 22:14:29 UTC
Can I have one project link to two subversion server?
Hi,
I want to know whether I can have one project link to two different
server. Here is what I want to do. First I check out the project from
official server. During the time, I will make a lot of intermediate
changes before I finanlly commit them into the official server. Since
not all the changes will be in the final release and a lot of testing
code that should not be checked into the official server. I created
another repository in another computer. I checked all code I got from
official server to the new computer. During the work, I will check the
changes to the second computer for testing and development. After
everything works and cleanup the code, then I will check the code to
the official server. I want to know how can I switch between the two
servers during the development.
Thanks
Frank
Re: Can I have one project link to two subversion server?
Posted by Ryan Schmidt <su...@ryandesign.com>.
Please use Reply All so your replies go to the list too, not just to me.
On Apr 23, 2010, at 17:27, frank wang wrote:
> Thank you very much for the very quick response.
>
> It seems that I could not do it on svn. Currently I use SVN from
> official server and perforce on my computer, so I can keep track all
> my debug stuff in perforce. After the code works, I clean up the code
> and then check them into the SVN server.
>
> I do not have the control on the official server and it does allow us
> to create branch for it.
You mean you don't have permission to create a branch on the official server? If that's so, and you cannot get permission to do so, then either continue what you're doing with Perforce, or use svk as I suggested or git as Bob suggested to manage your changes locally.
Re: Can I have one project link to two subversion server?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 23, 2010, at 17:14, yixiaodafang wrote:
> I want to know whether I can have one project link to two different
> server. Here is what I want to do. First I check out the project from
> official server. During the time, I will make a lot of intermediate
> changes before I finanlly commit them into the official server. Since
> not all the changes will be in the final release and a lot of testing
> code that should not be checked into the official server. I created
> another repository in another computer. I checked all code I got from
> official server to the new computer. During the work, I will check the
> changes to the second computer for testing and development. After
> everything works and cleanup the code, then I will check the code to
> the official server. I want to know how can I switch between the two
> servers during the development.
No, that's not how Subversion works.
You could look into svk, which is based on Subversion, works with existing Subversion repositories, and I believe does let you work that way.
But the usual way to do what you're asking would be to create a branch on the official server and do your intermediate work on that branch, then merge it to the trunk when you're done.
Re: Can I have one project link to two subversion server?
Posted by David Bartmess <di...@edingo.net>.
On 4/26/2010 11:04 PM, frank wang wrote:
> Thanks for all reply.
>
> I like the subversion since it is a nice tool running both on window
> and linux. I looked git and svk and it seems they are only running on
> linux and I am uisng windowXP. I really hope that svk can become more
> stable and mature and runs on window.
>
> Anyway, here is reason I want to check in the code into a private
> resository before I merge the code into the office SVN. During the
> development, I added a lot of codes for debugging in many stages. I
> want to keep track these changes during the development, so if
> anything does not work, then I can easily trace back to find a working
> version. All these debugged codes are not supposed to be checked in to
> the official SVN. After all debugging steps, I will clean the code and
> test it. Once it is working, then the final code will be checked into
> the official SVN. By doing this, I can add debug code, print out the
> results and will not worry that later I lost track if something I
> added break the code.
>
> Thanks
>
> Frank
> On Fri, Apr 23, 2010 at 4:19 PM, Curley, John<Jo...@windriver.com> wrote:
>
>> Hi all,
>>
>> Sounds to me like the developers want to avoid branching and merging.
>> Try it. You might like it.
>>
>> Seriously though, if you have concerns with branching and merging, I
>> suggest some training and make some trial runs in a test repository. I
>> believe there are software tools that will help you manage the branching
>> and merging.
>>
>> HTH,
>> John
>>
>>
>
>
This is exactly what branching and merging are for. Work on a branch to
work out all the kinks in the code, and once satisfied, then you merge
to the trunk to checkin your changes. If your IT dept. doesn't allow
branching, then that's broken, not Subversion....
--
"Dingo" Dave Bartmess
Broomfield, CO. USA
http://edingo.net
Re: Can I have one project link to two subversion server?
Posted by David Weintraub <qa...@gmail.com>.
On Tue, Apr 27, 2010 at 1:04 AM, frank wang <yi...@gmail.com> wrote:
> Anyway, here is reason I want to check in the code into a private
> resository before I merge the code into the office SVN.
> During the development, I added a lot of codes for debugging in many stages
There is no reason why you can't have debugging information in your
code and have displaying the debugging information as optional. If you
look at Maven and Ant, they both have debug settings. You use the
debug setting, and you get debug information. You don't use it, and
you see nothing.
You can always remove the debug information later on if you want, but
just because you'll have debug information doesn't mean that you have
to work offline from the rest of your team.
Staying connected with the rest of your team, doing regular commits to
the branch and repository place your fellow developers are working
helps produce better code. It forces you to communicate.
Most of the time, when a developer tells me they have to work
independently from the rest of the team and don't want to check in
their code into the repository until it is 100% complete, I find that
there is really another reason involved.
For example, the developer doesn't want to take time to do all those
tests because they want to work on finishing up the features. If they
check in their code, their fellow developers will bug them about this
or that not working. In reality, it's better and faster to look for
bugs while you code. Yes, debugging isn't fun, but it's why you get
paid the big bucks.
Sometimes, it is because the developer is biting off more than they
can reasonably handle. Restructuring what they want to do into more
manageable pieces usually helps.
Other developers tell me they don't want to commit incomplete code.
All code is incomplete. If it wasn't, there wouldn't be any changes
and we'd all be out of a job. Methods and classes can return faux data
for testing purposes. For example, if I was working on a method that
returns the price of an object, I could return either a fixed price or
a random value that would be good enough for other developers to use
for their coding while I work on the routines to actually connect to
the server and look up the price.
So, take a look at what you want to do and determine whether you
really should be working off to the side in your own repository.
Working off line like that means you miss the feedback of your fellow
developers and you miss the changes they're making which could end up
breaking everything you're doing.
--
David Weintraub
qazwart@gmail.com
RE: Can I have one project link to two subversion server?
Posted by Bob Archer <Bo...@amsi.com>.
> Thanks for all reply.
>
> I like the subversion since it is a nice tool running both on window
> and linux. I looked git and svk and it seems they are only running on
> linux and I am uisng windowXP. I really hope that svk can become more
> stable and mature and runs on window.
FYI: Git runs on Windows, Linux and Mac just as svn does. Here is a link to the native windows version.
http://code.google.com/p/msysgit/
You can use git-svn command to interface it will an svn repository.
Although, as others have said, branches in SVN are exactly to satisfy the scenarios you outline also.
BOb
Re: Can I have one project link to two subversion server?
Posted by Les Mikesell <le...@gmail.com>.
frank wang wrote:
> Thanks for all reply.
>
> I like the subversion since it is a nice tool running both on window
> and linux. I looked git and svk and it seems they are only running on
> linux and I am uisng windowXP. I really hope that svk can become more
> stable and mature and runs on window.
>
> Anyway, here is reason I want to check in the code into a private
> resository before I merge the code into the office SVN. During the
> development, I added a lot of codes for debugging in many stages. I
> want to keep track these changes during the development, so if
> anything does not work, then I can easily trace back to find a working
> version. All these debugged codes are not supposed to be checked in to
> the official SVN. After all debugging steps, I will clean the code and
> test it. Once it is working, then the final code will be checked into
> the official SVN. By doing this, I can add debug code, print out the
> results and will not worry that later I lost track if something I
> added break the code.
What you describe here is exactly the scenario where most places would use a
branch in the one-and-only subversion repository. Branches don't affect
anything else until you merge into the trunk - or wherever the code destined for
release is. There are some rare legitimate reasons to avoid working this way -
like not having network connectivity or temporarily testing with components that
others using the repository would not be allowed to see. But this sounds like
you or whoever manages the repository just doesn't want to use subversion the
way it is designed - and there's not a good alternative.
--
Les Mikesell
lesmikesell@gmail.com
Re: Can I have one project link to two subversion server?
Posted by frank wang <yi...@gmail.com>.
Thanks for all reply.
I like the subversion since it is a nice tool running both on window
and linux. I looked git and svk and it seems they are only running on
linux and I am uisng windowXP. I really hope that svk can become more
stable and mature and runs on window.
Anyway, here is reason I want to check in the code into a private
resository before I merge the code into the office SVN. During the
development, I added a lot of codes for debugging in many stages. I
want to keep track these changes during the development, so if
anything does not work, then I can easily trace back to find a working
version. All these debugged codes are not supposed to be checked in to
the official SVN. After all debugging steps, I will clean the code and
test it. Once it is working, then the final code will be checked into
the official SVN. By doing this, I can add debug code, print out the
results and will not worry that later I lost track if something I
added break the code.
Thanks
Frank
On Fri, Apr 23, 2010 at 4:19 PM, Curley, John <Jo...@windriver.com> wrote:
> Hi all,
>
> Sounds to me like the developers want to avoid branching and merging.
> Try it. You might like it.
>
> Seriously though, if you have concerns with branching and merging, I
> suggest some training and make some trial runs in a test repository. I
> believe there are software tools that will help you manage the branching
> and merging.
>
> HTH,
> John
>
RE: Can I have one project link to two subversion server?
Posted by "Curley, John" <Jo...@windriver.com>.
Hi all,
Sounds to me like the developers want to avoid branching and merging.
Try it. You might like it.
Seriously though, if you have concerns with branching and merging, I
suggest some training and make some trial runs in a test repository. I
believe there are software tools that will help you manage the branching
and merging.
HTH,
John
RE: Can I have one project link to two subversion server?
Posted by Bob Archer <Bo...@amsi.com>.
> I want to know whether I can have one project link to two different
> server. Here is what I want to do. First I check out the project from
> official server. During the time, I will make a lot of intermediate
> changes before I finanlly commit them into the official server. Since
> not all the changes will be in the final release and a lot of testing
> code that should not be checked into the official server. I created
> another repository in another computer. I checked all code I got from
> official server to the new computer. During the work, I will check the
> changes to the second computer for testing and development. After
> everything works and cleanup the code, then I will check the code to
> the official server. I want to know how can I switch between the two
> servers during the development.
Nope... not really. You have a few options..
1. Use a feature branch on the official server. When your done with your work merge it to the main folder path.
2. Create a diff of your changes, apply it to a WC checkout from the official server and commit it.
3. Use a distributed 3rd part version of svn. I think there is one called silkSVN.
4. You can use Git locally. It will allow you to create local branches, do local commits, etc. Then when you are ready you can push whatever you want to svn using the git-svn commant.
5. Move 100% to a distirbuted source control like Git or Mercurrial.
BOb
Re: Can I have one project link to two subversion server?
Posted by Les Mikesell <le...@gmail.com>.
On 4/23/2010 6:02 PM, David Weintraub wrote:
>
> If you want to use the distributed method, you can try SVK:
> http://svk.bestpractical.com. SVK is a layer on top of the Subversion
> repository and allows you to work with Subversion as a distributed
> repository.
>
> If you don't have to use Subversion, you might want to look at Git or
> Bitkeeper which are built from the ground up to be distributed version
> control systems.
There's also git-svn which appears to work like SVK except that you'd
use git tools locally on a git branch until you want to push your
changes back. Sounds like a reasonable match for this scenario.
--
Les Mikesell
lesmikesel@gmail.com
Re: Can I have one project link to two subversion server?
Posted by David Weintraub <qa...@gmail.com>.
On Fri, Apr 23, 2010 at 6:14 PM, yixiaodafang <yi...@gmail.com> wrote:
> I want to know whether I can have one project link to two different
> server. Here is what I want to do. First I check out the project from
> official server. During the time, I will make a lot of intermediate
> changes before I finanlly commit them into the official server.
You actually asked something that is being debated heavily in the CM
community: Central vs. Distributed repositories.
In Git, you can do exactly what you want, and this is one of the
reasons people like Git. In Git, you can checkout the entire
repository, then use it as if it's your own private repository. Then,
you check in the changes you've made back to the main repository.
A lot of people think this is a better way to do version control, but
one of the problems is that it allows you to work too independently
from everyone else. For example, there's no reason not to check your
changes back into the main repository after working on your project
for a month.
Being forced to use a centralized repository forces you to work with
your fellow developers. You have to take "smaller bites" when you make
changes. You have to do a bit more planning of what you want and think
it through better. You have to coordinate your work with everyone
else. The result is better software.
There are times when distributed version control systems work the
best. Usually, these are the cases where the owner of the repository
really doesn't want to centrally maintain a list of who can or cannot
make changes. Instead, they want to trust a small group and have this
group take the responsibility of tracking others.
However, if you have deadlines and commitments to customers, you are
better off using a centralized version control system. You can track
who can and cannot make changes. You track who made the changes, and
you force people to work together.
You didn't mention why you want to work the way you do. If this is for
commercial software, and you are doing some major work which would
prevent you from checking in your changes on a daily basis, you
probably want to create a feature branch in the main repository. Then,
you want to regularly merge the changes taking place on the trunk with
your stuff, so you don't fall out of sync with the rest of the
project.
If you want to use the distributed method, you can try SVK:
http://svk.bestpractical.com. SVK is a layer on top of the Subversion
repository and allows you to work with Subversion as a distributed
repository.
If you don't have to use Subversion, you might want to look at Git or
Bitkeeper which are built from the ground up to be distributed version
control systems.
--
David Weintraub
qazwart@gmail.com