You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jan De Luyck <ma...@kcore.org> on 2015/05/04 14:14:37 UTC

Branch issue

Hello folks,

Perhaps a stupid subversion question, but one i haven't been able to figure
out yet:

I've got two scripts in the same directory, which are basically variants -
one for RHEL6, one for RHEL7. Most of the content will be the same, with
small changes here and there. The files are named according to the RHEL
version.

Unfortunatly the scripts have to be completely self-contained, so using
modules/shared libraries/... is not an option.

Ideally I'd like to only have to manage one script, and pull the changes
into the second. But sofar I  haven't figured out a way yet to do this. The
only thing I thought of is moving both to a separate dir, and branching one
from the other. Doesn't seem ideal though.

Any pointers/ideas how I could tackle this?

Kind regards

Jan

Re: Branch issue

Posted by Branko Čibej <br...@wandisco.com>.
On 04.05.2015 14:14, Jan De Luyck wrote:
> Hello folks,
>
> Perhaps a stupid subversion question, but one i haven't been able to
> figure out yet:
>
> I've got two scripts in the same directory, which are basically
> variants - one for RHEL6, one for RHEL7. Most of the content will be
> the same, with small changes here and there. The files are named
> according to the RHEL version.
>
> Unfortunatly the scripts have to be completely self-contained, so
> using modules/shared libraries/... is not an option.
>
> Ideally I'd like to only have to manage one script, and pull the
> changes into the second. But sofar I  haven't figured out a way yet to
> do this. The only thing I thought of is moving both to a separate dir,
> and branching one from the other. Doesn't seem ideal though.
>
> Any pointers/ideas how I could tackle this?

Any copy is a branch. It doesn't have to be a copy of a directory.
Therefore, you can take one file, make a copy of it, put the contents of
the second file in the copy, and from then on just "svn merge" into the
copy every time you change something in the master file.

-- Brane


Re: Branch issue

Posted by Jan De Luyck <ma...@kcore.org>.
While I agree with that, this is not a possibility right now. So I'm just
looking for an easy way to manage this, save from pulling diffs and
reapplying them.

Jan

On Mon, May 4, 2015 at 3:26 PM, KM <in...@yahoo.com> wrote:

> In my opinion this sounds more like a coding issue than a source control
> issue, unless I am misunderstanding you. I don't think svn should be used
> to control the contents of your files.  You need to make the script generic
> so one version will work for all versions of RHEL.  Then you may control
> one script with svn.
>
> There are probably plenty of shell programming mechanisms you may use to
> get the script to be more vanilla or generic and work on all RHEL
> versions.  If they indeed need to be very different then you should control
> them separately.
>
> This is just my opinion though.
> KM
>
>  ------------------------------
>  *From:* Jan De Luyck <ma...@kcore.org>
> *To:* users@subversion.apache.org
> *Sent:* Monday, May 4, 2015 8:14 AM
> *Subject:* Branch issue
>
> Hello folks,
>
> Perhaps a stupid subversion question, but one i haven't been able to
> figure out yet:
>
> I've got two scripts in the same directory, which are basically variants -
> one for RHEL6, one for RHEL7. Most of the content will be the same, with
> small changes here and there. The files are named according to the RHEL
> version.
>
> Unfortunatly the scripts have to be completely self-contained, so using
> modules/shared libraries/... is not an option.
>
> Ideally I'd like to only have to manage one script, and pull the changes
> into the second. But sofar I  haven't figured out a way yet to do this. The
> only thing I thought of is moving both to a separate dir, and branching one
> from the other. Doesn't seem ideal though.
>
> Any pointers/ideas how I could tackle this?
>
> Kind regards
>
> Jan
>
>
>
>
>

Re: Branch issue

Posted by KM <in...@yahoo.com>.
In my opinion this sounds more like a coding issue than a source control issue, unless I am misunderstanding you. I don't think svn should be used to control the contents of your files.  You need to make the script generic so one version will work for all versions of RHEL.  Then you may control one script with svn.  
There are probably plenty of shell programming mechanisms you may use to get the script to be more vanilla or generic and work on all RHEL versions.  If they indeed need to be very different then you should control them separately.
This is just my opinion though.KM
       From: Jan De Luyck <ma...@kcore.org>
 To: users@subversion.apache.org 
 Sent: Monday, May 4, 2015 8:14 AM
 Subject: Branch issue
   
Hello folks,
Perhaps a stupid subversion question, but one i haven't been able to figure out yet:
I've got two scripts in the same directory, which are basically variants - one for RHEL6, one for RHEL7. Most of the content will be the same, with small changes here and there. The files are named according to the RHEL version.
Unfortunatly the scripts have to be completely self-contained, so using modules/shared libraries/... is not an option.
Ideally I'd like to only have to manage one script, and pull the changes into the second. But sofar I  haven't figured out a way yet to do this. The only thing I thought of is moving both to a separate dir, and branching one from the other. Doesn't seem ideal though.
Any pointers/ideas how I could tackle this?
Kind regards
Jan