• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Which is the correct way for code check-in of new changes into a subversion repository

 
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When one checks out code from repository , changes the code and again has do to check-in, in between if the code has already changed how to take the new changes and add your changes. I know this can be done by compare option of eclipse which comes after right click. This way is quite confusing. Is this the proper way?

thanks.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Subversion also has a compare function.

If the source is updated when you do check-in, you can
1. update/merge your local copy before check-in
2. merge your check-in source directly to the server

The safer approach is option 1. So that you at least won't mess up the server's source.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While compare works, it isn't the best way. Eclipse has Team > Synchronize with Repository.

This shows you a view of any changes you need to pull, any conflicts and any commits. You first pull any non-conflicting changes. Then you merge any conflicting ones. If needed, test again and re-sync. If not, you commit from that screen.
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks all. Is it a good practiced to do check-in check-out from eclipse or to keep a particualar location where you check-in check-out the code and copy paste to/from Eclipse?
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Having yet another place to keep code, and having to manually synchronize that place with an Eclipse project -- that doesn't sound like good practice to me.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Eclipse subversion plugins can handle checkin/checkout just fine. There's no need for a separate staging area.

Also, realize that Subversion projects contain more than just the project code. There's a hidden ".svn" directory in each subdirectory of the project tree that assists Subversion. You can't just simply copy stuff to a new location with impunity.
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You can't just simply copy stuff to a new location with impunity.



Thanks. Your reply said that we cant do check-in check-out properly by copying like that but I have been successfully doing it that way. I do checkout at a location. copy the files e.g the associated .java files to my eclipse, do changes in eclipse, copy the changed java classes from eclipse to that location and do check-in. It works fine.I did not quite understand what you meant by one cannot do that with impunity.
 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because if your working copy didn't include the hidden SVN directories and files, the SVN checkin doesn't have the necessary metadata.
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Because if your working copy didn't include the hidden SVN directories and files, the SVN checkin doesn't have the necessary metadata.



The aim is to transfer latest files from repository to local eclipse and after doing coding transferring modified files to repository.

If the above aim is being achieved successfully using my way of check-in check-out why do I have to worry about metadata?
thanks
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Presumably the way you are doing things, your Eclipse installation knows nothing about SVN so you can't use Eclipse to look at earlier versions of code. You can't use Eclipse to compare your code to earlier versions, or to extract code fragments from earlier versions. Am I right? If so then it seems to me you're doing a lot of extra work which provides, um, what can I call them? Negative benefits.
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it seems I cant do these things. I am using Gitlab repository not SVN repository. After the advice in this forum I am thinking of configuring it through eclipse now instead of a location. The reason I was doing this way was to avoid confusion that may arise in case of using eclipse.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI this is in reference your old post regarding oversease hunt.
Can you please help me with your experience on the same
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic