You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Shridhar Daithankar <gh...@ghodechhap.net> on 2005/05/11 11:11:40 UTC

Finding out latest revision in a branch

Hi,

How can I find out latest revision in the branch? I want to merge a feature 
branch in another SCM by hand.(Project requirements..)

I can find the starting revision in the branch by using svn log 
--stop-on-copy. The latest modified revision is given by svn info.

However I can not diff them directly because some of the intermediate 
revisions are from other branch and produce a huge diff. which is useless.

INOW, how can I find the head of the branch?

Regards,
 Shridhar

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

Re: Finding out latest revision in a branch

Posted by Shridhar Daithankar <gh...@ghodechhap.net>.
On Wednesday 11 May 2005 7:59 pm, Ben Collins-Sussman wrote:
> > ===================================================================
> > --- trunk/include/header1.h (revision 0)
> > +++ trunk/include/header1.h (revision 81)
>
> It simply means that header1.h was added somewhere between r78 and r81.
>
> I suggest you use 'svn log -v' from now on, since it shows all the
> changed paths in each commit.

Oh Ok. Thanks for the very quick response.

Regards,
 Shridhar

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

Re: Finding out latest revision in a branch

Posted by Ben Collins-Sussman <su...@collab.net>.
On May 11, 2005, at 9:05 AM, Shridhar Daithankar wrote:

> On Wednesday 11 May 2005 7:26 pm, Ben Collins-Sussman wrote:
>
>> On May 11, 2005, at 8:13 AM, Shridhar Daithankar wrote:
>>
>>> I don't have a problem from what I see but as I mentioned earlier,
>>> I got a
>>> diff between a revision 0 and revision 82. That is something I
>>> could not
>>> understand.
>>>
>>
> shridhar@ps0499:~/tmp/branch$ svn diff -r78:81|head
> Index: trunk/include/header1.h
> ===================================================================
> --- trunk/include/header1.h (revision 0)
> +++ trunk/include/header1.h (revision 81)
>

It simply means that header1.h was added somewhere between r78 and r81.

I suggest you use 'svn log -v' from now on, since it shows all the  
changed paths in each commit.


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

RE: Finding out latest revision in a branch

Posted by Dale Worley <dw...@pingtel.com>.
> From: Shridhar Daithankar [mailto:ghodechhap@ghodechhap.net]
>
> shridhar@ps0499:~/tmp/branch$ svn diff -r78:81|head
> Index: trunk/include/header1.h
> ===================================================================
> --- trunk/include/header1.h (revision 0)
> +++ trunk/include/header1.h (revision 81)
> @@ -0,0 +1,375 @@

IIRC, that means that file trunk/include/header1.h is not present in rev 78.
Check the other files in that diff; I suspect that most of them will show
"revision 78" and "revision 81".

Dale


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

Re: Finding out latest revision in a branch

Posted by Shridhar Daithankar <gh...@ghodechhap.net>.
On Wednesday 11 May 2005 7:26 pm, Ben Collins-Sussman wrote:
> On May 11, 2005, at 8:13 AM, Shridhar Daithankar wrote:
> > I don't have a problem from what I see but as I mentioned earlier,
> > I got a
> > diff between a revision 0 and revision 82. That is something I
> > could not
> > understand.
>
> I apologize, I don't understand the diff problem.  Maybe you can re-
> explain in more detail what you're trying to accomplish, along with
> *exact* commands you're typing.

OK. Here are the commands. Sensitive stuff is trimmed with <<text>>..:-) but 
that should not affect anything.

shridhar@ps0499:~/tmp/branch$ svn log --stop-on-copy
------------------------------------------------------------------------
r82 | shridhar | 2005-03-04 18:57:44 +0530 (Fri, 04 Mar 2005) | 1 line

<<Description>>
------------------------------------------------------------------------
r81 | shridhar | 2005-03-04 16:37:40 +0530 (Fri, 04 Mar 2005) | 1 line

<<Description>>
------------------------------------------------------------------------
r79 | chemlms | 2005-03-04 14:17:20 +0530 (Fri, 04 Mar 2005) | 2 lines

<<Description>>
------------------------------------------------------------------------
r78 | shridhar | 2005-03-04 13:50:23 +0530 (Fri, 04 Mar 2005) | 1 line

<<Description>>
------------------------------------------------------------------------
shridhar@ps0499:~/tmp/branch$ svn diff -r78:79|head
Index: dev/rpc/src/logon.c
===================================================================
--- dev/rpc/src/logon.c (revision 78)
+++ dev/rpc/src/logon.c (revision 79)
@@ -66,6 +66,7 @@
 #include <sys/socket.h>
+#include <grp.h>

svn: Can't write to stream: Broken pipe
shridhar@ps0499:~/tmp/branch$ svn diff -r78:81|head
Index: trunk/include/header1.h
===================================================================
--- trunk/include/header1.h (revision 0)
+++ trunk/include/header1.h (revision 81)
@@ -0,0 +1,375 @@
+#ifndef UCP_EXT_H
+#define UCP_EXT_H
svn: Can't write to stream: Broken pipe
shridhar@ps0499:~/tmp/branch$ svn diff -r81:82|head
Index: include/slt_msg.h
===================================================================
--- include/slt_msg.h   (revision 81)
+++ include/slt_msg.h   (revision 82)

svn: Can't write to stream: Broken pipe

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

Re: Finding out latest revision in a branch

Posted by Ben Collins-Sussman <su...@collab.net>.
On May 11, 2005, at 8:13 AM, Shridhar Daithankar wrote:
>
> I don't have a problem from what I see but as I mentioned earlier,  
> I got a
> diff between a revision 0 and revision 82. That is something I  
> could not
> understand.
>

I apologize, I don't understand the diff problem.  Maybe you can re- 
explain in more detail what you're trying to accomplish, along with  
*exact* commands you're typing.


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

Re: Finding out latest revision in a branch

Posted by Shridhar Daithankar <gh...@ghodechhap.net>.
On Wednesday 11 May 2005 6:26 pm, Ben Collins-Sussman wrote:
> On May 11, 2005, at 7:36 AM, Shridhar Daithankar wrote:
> > Is there a way where I can see the branch progress.
>
> Run 'svn log branchURL'.... ?

Yes. That is how I got so far. But thanks for confirming that up.  I wasn't 
sure if that covers the files in the tree. (I don't remember how I drew the 
conclusion that files in tree can have bigger revision than the branch 
itself. But anyways..)

I don't have a problem from what I see but as I mentioned earlier, I got a 
diff between a revision 0 and revision 82. That is something I could not 
understand.

Thanks for the quick response. 

 Regards,
  Shridhar

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

Re: Finding out latest revision in a branch

Posted by Ben Collins-Sussman <su...@collab.net>.
On May 11, 2005, at 7:36 AM, Shridhar Daithankar wrote:

>
> Is there a way where I can see the branch progress.

Run 'svn log branchURL'.... ?


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

RE: Finding out latest revision in a branch

Posted by Dale Worley <dw...@pingtel.com>.
> From: Shridhar Daithankar [mailto:ghodechhap@ghodechhap.net]
>
> - In working copy, I do a svn log, I get following revisions,
> 1,4,5,78,79,81,82 with branch creation on revision 78.

I assume that you mean that the branch directory first exists in revision
78.

> The diff 78:82 is 768517 lines which is hell lot more than I
> can account for.
> but at least it mentions that it is diffing between 78 and 82.

You might want to output the diff into a file and browse the file to look
for what is causing all the differences.  My suspicion is that you have
altered the end-of-line characters, replaced tabs with spaces, or done some
such formatting change.  You may want to do this to get a cleaner diff:

    svn diff --diff-cmd=diff -x--ignore-all-space -r78:82 ...directory...
>file

If you have Gnu diff, that will show all the changes that are not just
whitespace changes.

> The diff 78:81 is 765087 lines but it mentions that it is
> diffing revision 0 and 81!!.

I would check again that you did the diff correctly, as that is not correct
behavior.

> Is there a way where I can see the branch progress. AFAIU,
> you can get history
> of either file or directory but not the branch as such.

In Subversion, a branch is just a directory, so there is no branch history
separate from directory history.

Dale


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

Re: Finding out latest revision in a branch

Posted by Shridhar Daithankar <gh...@ghodechhap.net>.
On Wednesday 11 May 2005 5:04 pm, Ben Collins-Sussman wrote:
> On May 11, 2005, at 6:11 AM, Shridhar Daithankar wrote:
> The 'head' of all branches is simply the global HEAD revision, right?

Right.
>
> You can use 'HEAD' as a revision number on the commandline.  But if
> you want to know the actual value of HEAD at this moment, a simple
> 'svn status -u' will show that on the last line it prints.

That is head...:-(

OK. Let me describe the details.

- In working copy, I do a svn log, I get following revisions, 
1,4,5,78,79,81,82 with branch creation on revision 78.

- Revision 82 is a patch merge and has nothing to do with the feature for 
which the branch was created. So I don't want it. So I need to look at 81. 
(The patch was merge in a hope that ultimately I will merge three svn 
branches in one SVN branch. But right now, I am merging 3 svn branches into 
another SCM by hand.)

The diff 78:82 is 768517 lines which is hell lot more than I can account for. 
but at least it mentions that it is diffing between 78 and 82.

The diff 78:81 is 765087 lines but it mentions that it is diffing revision 0 
and 81!!.

And this is the bit that disturbs me. It gives me a feeling that I don't know 
what is happening.

Is there a way where I can see the branch progress. AFAIU, you can get history 
of either file or directory but not the branch as such. And I don't have hook 
emails etc. set up to refer to.

Any help is appreciated. TIA.

 Regards
  Shridhar


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

Re: Finding out latest revision in a branch

Posted by Ben Collins-Sussman <su...@collab.net>.
On May 11, 2005, at 6:11 AM, Shridhar Daithankar wrote:

> Hi,
>
> How can I find out latest revision in the branch? I want to merge a  
> feature
> branch in another SCM by hand.(Project requirements..)
>
> I can find the starting revision in the branch by using svn log
> --stop-on-copy. The latest modified revision is given by svn info.
>
> However I can not diff them directly because some of the intermediate
> revisions are from other branch and produce a huge diff. which is  
> useless.
>
> INOW, how can I find the head of the branch?

The 'head' of all branches is simply the global HEAD revision, right?

You can use 'HEAD' as a revision number on the commandline.  But if  
you want to know the actual value of HEAD at this moment, a simple  
'svn status -u' will show that on the last line it prints.


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