LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2018, 10:12 AM   #1
dsl_
Member
 
Registered: Jul 2008
Location: Denmark
Distribution: Debian
Posts: 71

Rep: Reputation: 0
SVN and similar version control systems.


I'm in a discussion with a friend about how you use a version control system. In this particular case SVN. He seems to think that it's OK to use certain parts of the SVN directory structure to check in files he's not sure will compile. In other words experimenting directly in the version control directories.

In my world you never check anything into a a version control system you're not already sure is working. You use your IDE to verify that everything works and #then# you check it in.

He uses the TFM to argue in favour of his actions. Intuitively though, it makes little sense to me.

Short of RTFM can anyone tell me if my intuition is correct?

Regards,
Soren


Edit: Sorry. We Danes are per definition a little slow on the uptake.

Last edited by dsl_; 08-02-2018 at 10:15 AM.
 
Old 08-02-2018, 11:04 AM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
SVN and similar version control systems.

I don't have a lot of experience with subversion. I do use git quite a bit. I usually create a separate branch for testing changes. I even keep separate branches to track remote git repositories of similar code bases. That way it is easier to roll back changes without making the commit log dirty. It makes it very simple by deleting the branch locally. I almost never upload testing or temporary branches to my remote git server where I have full access.
 
1 members found this post helpful.
Old 08-02-2018, 11:11 AM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
dsl_: you are correct for SVN.

What mralk said is true for git, Mercurial, and other things that are better than SVN.

That is why everyone has switched to git.
 
1 members found this post helpful.
Old 08-06-2018, 09:49 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
deleted.

Last edited by Habitual; 08-06-2018 at 09:50 AM.
 
Old 08-07-2018, 07:46 AM   #5
dsl_
Member
 
Registered: Jul 2008
Location: Denmark
Distribution: Debian
Posts: 71

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Habitual View Post
deleted.
Does not compute.
 
Old 08-07-2018, 06:35 PM   #6
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by mralk3 View Post
I don't have a lot of experience with subversion. I do use git quite a bit. I usually create a separate branch for testing changes. I even keep separate branches to track remote git repositories of similar code bases. That way it is easier to roll back changes without making the commit log dirty. It makes it very simple by deleting the branch locally. I almost never upload testing or temporary branches to my remote git server where I have full access.
I would note that SVN encodes branches as directories (i.e., to make a branch in SVN, you copy your code to a new directory).
 
Old 08-08-2018, 01:00 AM   #7
mina86
Member
 
Registered: Aug 2008
Distribution: Debian
Posts: 517

Rep: Reputation: 229Reputation: 229Reputation: 229
I’d say that code outside of trunk does not need to be correct similarly to how code outside of master branch (and all other release branches) doesn’t have to be correct in a git repository.

How else would you do a review? You need to share your code with others and that code isn’t necessarily its final version. Or you could have just a simple proof of concept which demonstrates an idea. Than again, I actually don’t know how you do reviews in Subversion.

With git though, once you’re ready to merge the branch you can rebase and play around with it to clean up the history such that each commit in the branch does compile and then merge that into master. I don’t know how that looks in Subversion.
 
Old 08-08-2018, 01:59 AM   #8
dsl_
Member
 
Registered: Jul 2008
Location: Denmark
Distribution: Debian
Posts: 71

Original Poster
Rep: Reputation: 0
I could accept the idea of having branches for experimentation, but I'm talking about the very branch that supposedly contains the working version.

That, I find a little weird.

Regards
 
Old 08-08-2018, 07:04 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you might want to put code into a version control system for different reasons: for example just to save it. You do not need to rely [only] on your on linux. Or because you want to share it with your staff.
But there is no general way of working, so you cannot have a common, global solution. It always depend on the team, the job and the other tools used.
 
Old 08-08-2018, 09:42 AM   #10
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by mina86 View Post
How else would you do a review?
On svn? You're supposed to generate a patch with "svn diff" and have that reviewed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Git, SVN and Mercurial Open-Source Version Control Systems Update for Critical Security Vulnerability LXer Syndicated Linux News 0 08-12-2017 04:41 AM
Version Control Systems techningeer Linux - Software 1 02-17-2014 06:18 PM
Samba and version control systems Phaethar Linux - Server 1 05-31-2007 06:00 PM
This version of nuvexport requires either the cvs or svn version of ffmpeg?? zeltak Linux - Software 2 02-02-2007 04:54 AM
Version Control Systems -Quick Review frankie_DJ Programming 6 10-06-2005 03:56 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration