You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Corrado Labinaz <co...@ngi.it> on 2006/10/03 10:08:03 UTC

Which branches this file belong to?

Hi,
 
suppose you have file trunk/myfile.c
It goes through these modifications:
 
revision 
100            file created
150            copied to branches/release1
200            copied to branches/release2
230            copied to branches/release3
250            fixed bug
 
Well, AFAIK it's not possibile to get the above list.
 
If I use "svn log trunk/myfile.c" I get
100            file created
250            fixed bug
 
while if I execute i.e. "svn log branches/release2/myfile.c" I get
100            file created
200            copied to branches/release2
 
Why do I need the full list?
Because after applying the bugfix at revision 250, I need to apply the same
bugfix to older releases.
"svn copy trunk/myfile.c branches/release1" should be enough most of the
time.
But I don't know which releases to copy to (release1, 2, 3, all of them or
none of them?)
 
(BTW this was easy with CVS, where every file get tagged with the branch
number it belong to)
 
Is there a way to get the full list above?
 
Kind regards,
    Corrado

Re: Which branches this file belong to?

Posted by Wim Coenen <wc...@gmail.com>.
2006/10/3, Corrado Labinaz <co...@ngi.it>:
> Hi,
>
> suppose you have file trunk/myfile.c
> It goes through these modifications:
>
> revision
> 100            file created
> 150            copied to branches/release1
> 200            copied to branches/release2
> 230            copied to branches/release3
> 250            fixed bug
<snip>
> Is there a way to get the full list above?

I don't think there is an easy way. You might be interested in reading
http://svn.collab.net/repos/svn/trunk/notes/schema-tradeoffs.txt,
especially "user question #3".

Typically you are only maintaining one or two "old release" branches, so it
shouldn't be much of a problem to examine each branch to see whether
you want/need to backport your trunk change.

> "svn copy trunk/myfile.c branches/release1" should be enough most of the time.
>

I think it is safer if you merge only the specific trunk change which
you want to
backport. After all, the reason for having an "older release" dev branch is that
you only want bugfixes there. See the section "Copying Specific Changes" at
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.copychanges.html

HTH,
Wim Coenen.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Which branches this file belong to?

Posted by Duncan Murdoch <mu...@stats.uwo.ca>.
On 10/3/2006 6:08 AM, Corrado Labinaz wrote:
> Hi,
>  
> suppose you have file trunk/myfile.c
> It goes through these modifications:
>  
> revision 
> 100            file created
> 150            copied to branches/release1
> 200            copied to branches/release2
> 230            copied to branches/release3
> 250            fixed bug
>  
> Well, AFAIK it's not possibile to get the above list.
>  
> If I use "svn log trunk/myfile.c" I get
> 100            file created
> 250            fixed bug
>  
> while if I execute i.e. "svn log branches/release2/myfile.c" I get
> 100            file created
> 200            copied to branches/release2
>  
> Why do I need the full list?
> Because after applying the bugfix at revision 250, I need to apply the same
> bugfix to older releases.
> "svn copy trunk/myfile.c branches/release1" should be enough most of the
> time.
> But I don't know which releases to copy to (release1, 2, 3, all of them or
> none of them?)
>  
> (BTW this was easy with CVS, where every file get tagged with the branch
> number it belong to)
>  
> Is there a way to get the full list above?

To see the filenames of all copy targets, get a verbose log of the 
entire repository, and grep for "(from /trunk/myfile.c".

I think you'd need to write your own script to see the revision numbers 
  when the copy occurred; they'll be reported on a different line than 
the filenames.

Duncan Murdoch

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Which branches this file belong to?

Posted by Dukhat <u2...@telia.com>.
Corrado Labinaz wrote:
> Hi,
>  
> suppose you have file trunk/myfile.c
> It goes through these modifications:
>  
> revision
> 100            file created
> 150            copied to branches/release1
> 200            copied to branches/release2
> 230            copied to branches/release3
> 250            fixed bug
>  
> Well, AFAIK it's not possibile to get the above list.
>  
> If I use "svn log trunk/myfile.c" I get
> 100            file created
> 250            fixed bug
>  
> while if I execute i.e. "svn log branches/release2/myfile.c" I get
> 100            file created
> 200            copied to branches/release2
>  
> Why do I need the full list?
> Because after applying the bugfix at revision 250, I need to apply the 
> same bugfix to older releases.
> "svn copy trunk/myfile.c branches/release1" should be enough most of the 
> time.
> But I don't know which releases to copy to (release1, 2, 3, all of them 
> or none of them?)
>  
> (BTW this was easy with CVS, where every file get tagged with the branch 
> number it belong to)
>  
> Is there a way to get the full list above?
>  
> Kind regards,
>     Corrado

Last time I wrote something here, it got sort of shot down. Barring 
that, you could try the "Revision graph" command of TortoiseSVN.

/Micke

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Which branches this file belong to?

Posted by Andy Levy <an...@gmail.com>.
On 10/3/06, Corrado Labinaz <co...@ngi.it> wrote:
>
>
> Hi,
>
> suppose you have file trunk/myfile.c
> It goes through these modifications:
>
> revision
> 100            file created
> 150            copied to branches/release1
> 200            copied to branches/release2
> 230            copied to branches/release3
> 250            fixed bug
>
> Well, AFAIK it's not possibile to get the above list.
>
> If I use "svn log trunk/myfile.c" I get
>
> 100            file created
>
> 250            fixed bug
>
> while if I execute i.e. "svn log branches/release2/myfile.c" I get
>
> 100            file created
>
> 200            copied to branches/release2
>
> Why do I need the full list?
> Because after applying the bugfix at revision 250, I need to apply the same
> bugfix to older releases.
> "svn copy trunk/myfile.c branches/release1" should be enough most of the
> time.
> But I don't know which releases to copy to (release1, 2, 3, all of them or
> none of them?)
>
> (BTW this was easy with CVS, where every file get tagged with the branch
> number it belong to)
>
> Is there a way to get the full list above?

That's because (from what I've read) in CVS, a copy isn't really a
copy, it's a property of the file,  In Subversion, once you make a
copy of the file, you have an actual copy, and the connection between
the original and the copy has been severed for the future.

If you know that the bug fix was done in a particular revision (or
range of revisions), can you just svn merge those changes from
branch/release1 to branch/release2 (and all your other old releases),
or use svn diff to create a patch that can be applied to your older
releases?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Which branches this file belong to?

Posted by Talden <ta...@gmail.com>.
It's disappointing that Subversion doesn't provide for you to see all
future revisions of a given URL@revision across copies/moves as well
as it's past revisions.

I think it's pretty tough to argue that such a feature isn't a useful
SCM tracking facility (albeit far from the highest value feature an
SCM tool might offer).

On the other hand, while I wouldn't expect to have to hack together a
tool to perform such a function, I also wouldn't expect it to be
highly performant if the book-keeping needed would otherwise harm the
performance of higher demand functionality.

--
Talden

On 10/4/06, Mark <ma...@mitsein.net> wrote:
> You could use a file property on the file in trunk to keep track of
> each branch you have copied it to.  You can just make this part of
> your procedure for branching.
>
> On 10/3/06, Corrado Labinaz <co...@ngi.it> wrote:
> >
> >
> > Hi,
> >
> > suppose you have file trunk/myfile.c
> > It goes through these modifications:
> >
> > revision
> > 100            file created
> > 150            copied to branches/release1
> > 200            copied to branches/release2
> > 230            copied to branches/release3
> > 250            fixed bug
> >
> > Well, AFAIK it's not possibile to get the above list.
> >
> > If I use "svn log trunk/myfile.c" I get
> >
> > 100            file created
> >
> > 250            fixed bug
> >
> > while if I execute i.e. "svn log branches/release2/myfile.c" I get
> >
> > 100            file created
> >
> > 200            copied to branches/release2
> >
> > Why do I need the full list?
> > Because after applying the bugfix at revision 250, I need to apply the same
> > bugfix to older releases.
> > "svn copy trunk/myfile.c branches/release1" should be enough most of the
> > time.
> > But I don't know which releases to copy to (release1, 2, 3, all of them or
> > none of them?)
> >
> > (BTW this was easy with CVS, where every file get tagged with the branch
> > number it belong to)
> >
> > Is there a way to get the full list above?
> >
> > Kind regards,
> >     Corrado
>
>
> --
> Mark
> "Blessed is he who finds happiness in his own foolishness, for he will
> always be happy."
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Which branches this file belong to?

Posted by Mark <ma...@mitsein.net>.
You could use a file property on the file in trunk to keep track of
each branch you have copied it to.  You can just make this part of
your procedure for branching.

On 10/3/06, Corrado Labinaz <co...@ngi.it> wrote:
>
>
> Hi,
>
> suppose you have file trunk/myfile.c
> It goes through these modifications:
>
> revision
> 100            file created
> 150            copied to branches/release1
> 200            copied to branches/release2
> 230            copied to branches/release3
> 250            fixed bug
>
> Well, AFAIK it's not possibile to get the above list.
>
> If I use "svn log trunk/myfile.c" I get
>
> 100            file created
>
> 250            fixed bug
>
> while if I execute i.e. "svn log branches/release2/myfile.c" I get
>
> 100            file created
>
> 200            copied to branches/release2
>
> Why do I need the full list?
> Because after applying the bugfix at revision 250, I need to apply the same
> bugfix to older releases.
> "svn copy trunk/myfile.c branches/release1" should be enough most of the
> time.
> But I don't know which releases to copy to (release1, 2, 3, all of them or
> none of them?)
>
> (BTW this was easy with CVS, where every file get tagged with the branch
> number it belong to)
>
> Is there a way to get the full list above?
>
> Kind regards,
>     Corrado


-- 
Mark
"Blessed is he who finds happiness in his own foolishness, for he will
always be happy."

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Which branches this file belong to?

Posted by "Reedick, Andrew" <An...@BellSouth.com>.
>	From: Corrado Labinaz [mailto:corradolab@ngi.it] 
>	Sent: Tuesday, October 03, 2006 6:08 AM
>	To: users@subversion.tigris.org
>	Subject: Which branches this file belong to?
>	
>	
>	Hi,
>	 
>	suppose you have file trunk/myfile.c
>	It goes through these modifications:
>	 
>	revision 
>	100            file created
>	150            copied to branches/release1
>	200            copied to branches/release2
>	230            copied to branches/release3
>	250            fixed bug
>	 
>	Well, AFAIK it's not possibile to get the above list.
>	 
>	If I use "svn log trunk/myfile.c" I get
>		100            file created
>		250            fixed bug
>	 
>	while if I execute i.e. "svn log branches/release2/myfile.c" I
get
>		100            file created
>			200            copied to branches/release2
>		 
>	Why do I need the full list?
>	Because after applying the bugfix at revision 250, I need to
apply the same bugfix to older releases.
>	"svn copy trunk/myfile.c branches/release1" should be enough
most of the time.
>	But I don't know which releases to copy to (release1, 2, 3, all
of them or none of them?)
>	 
>	(BTW this was easy with CVS, where every file get tagged with
the branch number it belong to)
>	 
>	Is there a way to get the full list above?
>	 
>	Kind regards,
>	    Corrado


Summary:  (In general) merging trunk/.../myfile.c to
release1/.../myfile.c is bad.  Merging trunk to release1 is good.

It's easy with CVS since each file object contained all the branches, so
it was easy for branch A to know about branch B.  In Subversion, once
you create a branch, the parent branch has no references to the child
branch.  However, the child branch is aware of the parent branch
(specifically the branch point.)  

SVN is more oriented to operating on entire directory trees.  Instead of
focusing on individual files, it's "better" (in general) to think in
terms of merging trunk to release1.  Since SVN doesn't do merge
tracking, it's painful to merge dozens of individual files, instead of
merging by entire branches/directory trees.

You, the user, know that you have three releases and a trunk.  Therefore
you already know that you need to merge the trunk fix to the release
branches.  The real question is whether you:
a) merge the fix from the trunk to each release (trunk -> release1,
trunk -> release2, etc.) or 
b) merge from trunk -> release1 -> release2 -> release3 (release2 gets
the fix by merging in release1)



*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA623


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org