You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Anastasios Angelidis <vo...@videotron.ca> on 2005/10/26 13:54:06 UTC
Understanding merging.
I run: svn log --verbose svn://myserver/Development/Test_Project and get
listing below.
I would like to merge r4 into r5 so I run: svn merge -r 4:5
svn://mtlw-angt-01/Development/Test_Project/Trunk But I get a blank
response. Bassically svn returns to the prompt again. What I'm I doing
wrong?
Thanks
------------------------------------------------------------------------
r5 | tassoa | 2005-10-25 16:46:20 -0400 (Tue, 25 Oct 2005) | 1 line
Changed paths:
M /Test_Project/Trunk/index.html
Added new paragraph.
------------------------------------------------------------------------
r4 | tassoa | 2005-10-25 16:44:57 -0400 (Tue, 25 Oct 2005) | 1 line
Changed paths:
M /Test_Project/Branches/Bug_Fixes/index.html
Fixed spelling mistake found in the <title> tag. Should read "Hello
World!" and not "Hello Wrld!".
------------------------------------------------------------------------
r3 | tassoa | 2005-10-25 16:39:48 -0400 (Tue, 25 Oct 2005) | 1 line
Changed paths:
A /Test_Project/Branches/Bug_Fixes (from /Test_Project/Trunk:2)
Fix spelling mistake in the title of the page.
------------------------------------------------------------------------
r2 | tassoa | 2005-10-25 16:35:09 -0400 (Tue, 25 Oct 2005) | 1 line
Changed paths:
M /Test_Project/Trunk/index.html
Started the html code for the home page.
------------------------------------------------------------------------
r1 | tassoa | 2005-10-25 16:31:48 -0400 (Tue, 25 Oct 2005) | 1 line
Changed paths:
A /Test_Project
A /Test_Project/Branches
A /Test_Project/Tags
A /Test_Project/Trunk
A /Test_Project/Trunk/index.html
Initial import.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Understanding merging.
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 26, 2005, at 17:08, Anastasios Angelidis wrote:
>> In that case, get a working copy of Trunk, go into it, and merge
>> the change into the working copy:
>>
>> cd /path/to/working/copy/of/Trunk
>> svn merge -r3:4 svn://myserver/Development/Test_Project/Branches/
>> Bug_Fixes
>>
>> This means "Make a recipe that transforms revision 3 of the
>> Bug_Fixes branch into revision 4, and apply that recipe to the
>> working copy I'm in right now."
>>
>
> Ok it worked but I'm not exactly understanding why -r3:4. The
> working copy is at r5 and I want to merge r4 into it... to make the
> working copy finally r6. Maybe you can explain it differently? Thanks
>
The fact that your working copy is at revision 5 right now is
irrelevant.
You also do not know for certain that, when you commit, you will get
revision 6. If there are other developers, they may be committing
other things, and you might end up with revision 7, or 8, or 10, or
52. That's also irrelevant.
What's relevant is the revision in which the change occurred that you
want to merge, and the path in the repository where the change was
made. In your case, it happened in revision 4 of Branches/Bug_Fixes.
Revision 4 has the change; the revision before that, revision 3, did
not have the change. So, to construct a diff that applies the change,
you need to ask for a difference between revisions 3 and 4, rooted at
the Branches/Bug_Fixes path, because that corresponds to the path of
the working copy of Trunk that you have now (because Branches/
Bug_Fixes was at one time a copy of Trunk).
When you do the merge, the difference gets applied to your working
copy of Trunk, you commit it, and thus, the change that had occurred
in revision 4 of the branch has now been made to the trunk.
If it's still unclear, look more closely into what Subversion is
doing. Look at the diff it's generating:
svn diff -r3:4 \
svn://myserver/Development/Test_Project/Branches/Bug_Fixes
Convince yourself that the list of instructions printed by this
command are indeed the changes that you want performed on your
working copy of Trunk.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Understanding merging.
Posted by Scott Palmer <sc...@2connected.org>.
On 26-Oct-05, at 11:08 AM, Anastasios Angelidis wrote:
>
> Ok it worked but I'm not exactly understanding why -r3:4. The
> working copy is at r5 and I want to merge r4 into it... to make the
> working copy finally r6. Maybe you can explain it differently? Thanks
If you want the changes in revision X you merge rX-1:X... I.e. you
merge the changes that took you FROM revision X-1 TO revision X
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Subversion crashing on a copy command. Where are the logs?
Posted by Anastasios Angelidis <vo...@videotron.ca>.
Anastasios Angelidis wrote:
> John Szakmeister wrote:
>
>> On Monday 31 October 2005 20:24, Anastasios Angelidis wrote:
>> [snip]
>>
>>
>>> Yeah regardless of the command it should not crash it. I guess I can
>>> report it...
>>>
>>
>>
>> If you run svnserve in the foreground (not as a service), you might
>> be able to get more information about why it's crashing. Just a
>> thought. :-)
>>
>> -John
>>
>>
> Voila!
>
> Assertion failed: is_canonical (base, blen), file
> C:\Home\brane\src\svn\releases\subversion-1.2.3\subversion\libsvn_subr\path.c,
> line 114
>
> abnormal program termination
>
> By the way the copy command is crashing this server using: -rMyRevNum
> --revision MyRevNum and even @MyRevNum
Ok it's added to the issue traker: Issue 2432
>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Subversion crashing on a copy command. Where are the logs?
Posted by Anastasios Angelidis <vo...@videotron.ca>.
John Szakmeister wrote:
>On Monday 31 October 2005 20:24, Anastasios Angelidis wrote:
>[snip]
>
>
>>Yeah regardless of the command it should not crash it. I guess I can
>>report it...
>>
>>
>
>If you run svnserve in the foreground (not as a service), you might be able to
>get more information about why it's crashing. Just a thought. :-)
>
>-John
>
>
Voila!
Assertion failed: is_canonical (base, blen), file
C:\Home\brane\src\svn\releases\subversion-1.2.3\subversion\libsvn_subr\path.c,
line 114
abnormal program termination
By the way the copy command is crashing this server using: -rMyRevNum
--revision MyRevNum and even @MyRevNum
>---------------------------------------------------------------------
>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: Subversion crashing on a copy command. Where are the logs?
Posted by John Szakmeister <jo...@szakmeister.net>.
On Monday 31 October 2005 20:24, Anastasios Angelidis wrote:
[snip]
> Yeah regardless of the command it should not crash it. I guess I can
> report it...
If you run svnserve in the foreground (not as a service), you might be able to
get more information about why it's crashing. Just a thought. :-)
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Subversion crashing on a copy command. Where are the logs?
Posted by Anastasios Angelidis <vo...@videotron.ca>.
Joshua Varner wrote:
>On 10/31/05, Madan U Sreenivasan <ma...@collab.net> wrote:
>
>
>>On Mon, 2005-10-31 at 21:36, Anastasios Angelidis wrote:
>>
>>
>>>Hi I'm running subversion svnserve, version 1.2.3 (r15833) as a windows
>>>service.
>>>
>>>When I run the following command: C:\SVNTesting>svn copy -r17
>>>svn://myserver/Test_Project/Trunk/index.html ./index.html
>>>
>>>
>>thats a little vague. I think, it should be
>>svn copy svn://myserver/Test_Project/Trunk/index.html@r17 ./index.html
>>
>>
>>
>This is right you need peg revisions, -r says cp the file represented
> by the URL svn://myserver/Test_Project/Trunk/index.html at revision
>17 to index.html. But that file does not exist.
>svn://myserver/Test_Project/Trunk/index.html@r17 means the file
>at svn://myserver/Test_Project/Trunk/index.html in rev 17.
>
>
>
Allthough with the copy command you can issue a -r even a --revision
>>>I get: svn: Can't read from connection: An existing connection was
>>>forcibly closed by the remote host.
>>>
>>>When I look at the Windows 2000 event viewer, I see: SVNService process
>>>ended prematurely: ("C:\Programming\Subversion\bin\svnserve.exe" "-d"
>>>"-r" "e:\\SVNRepositories")
>>>
>>>I can always reproduce this. I restart the service, I run some commands
>>>using Tortoise, to see that all is good. Then once I try the above copy
>>>command, bam!
>>>
>>>
>>hmmm, this is something we need to try to understand why. But, I dont
>>have the resources to try these out, right now. Maybe someone else could
>>give it a shot?
>>
>>
>>
>It should not however crash. That seems to be a bug.
>
>Josh
>
>
Yeah regardless of the command it should not crash it. I guess I can
report it...
>---------------------------------------------------------------------
>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: Subversion crashing on a copy command. Where are the logs?
Posted by Joshua Varner <jl...@gmail.com>.
On 10/31/05, Madan U Sreenivasan <ma...@collab.net> wrote:
> On Mon, 2005-10-31 at 21:36, Anastasios Angelidis wrote:
> > Hi I'm running subversion svnserve, version 1.2.3 (r15833) as a windows
> > service.
> >
> > When I run the following command: C:\SVNTesting>svn copy -r17
> > svn://myserver/Test_Project/Trunk/index.html ./index.html
> thats a little vague. I think, it should be
> svn copy svn://myserver/Test_Project/Trunk/index.html@r17 ./index.html
>
This is right you need peg revisions, -r says cp the file represented
by the URL svn://myserver/Test_Project/Trunk/index.html at revision
17 to index.html. But that file does not exist.
svn://myserver/Test_Project/Trunk/index.html@r17 means the file
at svn://myserver/Test_Project/Trunk/index.html in rev 17.
> > I get: svn: Can't read from connection: An existing connection was
> > forcibly closed by the remote host.
> >
> > When I look at the Windows 2000 event viewer, I see: SVNService process
> > ended prematurely: ("C:\Programming\Subversion\bin\svnserve.exe" "-d"
> > "-r" "e:\\SVNRepositories")
> >
> > I can always reproduce this. I restart the service, I run some commands
> > using Tortoise, to see that all is good. Then once I try the above copy
> > command, bam!
> hmmm, this is something we need to try to understand why. But, I dont
> have the resources to try these out, right now. Maybe someone else could
> give it a shot?
>
It should not however crash. That seems to be a bug.
Josh
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Subversion crashing on a copy command. Where are the logs?
Posted by Madan U Sreenivasan <ma...@collab.net>.
On Mon, 2005-10-31 at 21:36, Anastasios Angelidis wrote:
> Hi I'm running subversion svnserve, version 1.2.3 (r15833) as a windows
> service.
>
> When I run the following command: C:\SVNTesting>svn copy -r17
> svn://myserver/Test_Project/Trunk/index.html ./index.html
thats a little vague. I think, it should be
svn copy svn://myserver/Test_Project/Trunk/index.html@r17 ./index.html
> I get: svn: Can't read from connection: An existing connection was
> forcibly closed by the remote host.
>
> When I look at the Windows 2000 event viewer, I see: SVNService process
> ended prematurely: ("C:\Programming\Subversion\bin\svnserve.exe" "-d"
> "-r" "e:\\SVNRepositories")
>
> I can always reproduce this. I restart the service, I run some commands
> using Tortoise, to see that all is good. Then once I try the above copy
> command, bam!
hmmm, this is something we need to try to understand why. But, I dont
have the resources to try these out, right now. Maybe someone else could
give it a shot?
Regards,
Madan.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Subversion crashing on a copy command. Where are the logs?
Posted by Anastasios Angelidis <vo...@videotron.ca>.
Hi I'm running subversion svnserve, version 1.2.3 (r15833) as a windows
service.
When I run the following command: C:\SVNTesting>svn copy -r17
svn://myserver/Test_Project/Trunk/index.html ./index.html
I get: svn: Can't read from connection: An existing connection was
forcibly closed by the remote host.
When I look at the Windows 2000 event viewer, I see: SVNService process
ended prematurely: ("C:\Programming\Subversion\bin\svnserve.exe" "-d"
"-r" "e:\\SVNRepositories")
I can always reproduce this. I restart the service, I run some commands
using Tortoise, to see that all is good. Then once I try the above copy
command, bam!
Any ideas? Is there a log I can look at, so I can maybe report this.
By the way this is what I'm trying...
I deleted a file from revision 17 and now want to bring it back. As the
book sujests to use the copy command.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Understanding merging.
Posted by William Nagel <bi...@stagelogic.com>.
On Oct 26, 2005, at 10:08 AM, Anastasios Angelidis wrote:
> Ryan Schmidt wrote:
>
>
>> On Oct 26, 2005, at 15:54, Anastasios Angelidis wrote:
>>
>>
>>> I run: svn log --verbose svn://myserver/Development/Test_Project
>>> and get listing below.
>>>
>>> I would like to merge r4 into r5 so I run: svn merge -r 4:5
>>> svn:// mtlw-angt-01/Development/Test_Project/Trunk But I get a
>>> blank response. Bassically svn returns to the prompt again. What
>>> I'm I doing wrong?
>>>
>>> Thanks
>>>
>>> --------------------------------------------------------------------
>>> -- --
>>> r5 | tassoa | 2005-10-25 16:46:20 -0400 (Tue, 25 Oct 2005) | 1 line
>>> Changed paths:
>>> M /Test_Project/Trunk/index.html
>>>
>>> Added new paragraph.
>>> --------------------------------------------------------------------
>>> -- --
>>> r4 | tassoa | 2005-10-25 16:44:57 -0400 (Tue, 25 Oct 2005) | 1 line
>>> Changed paths:
>>> M /Test_Project/Branches/Bug_Fixes/index.html
>>>
>>> Fixed spelling mistake found in the <title> tag. Should read
>>> "Hello World!" and not "Hello Wrld!".
>>> --------------------------------------------------------------------
>>> -- --
>>>
>>
>>
>> You're confused about terminology.
>>
>> A revision of the repository represents a point in time. At
>> revision 4, it looked one way, and at revision 5, it looked a
>> slightly different way. Revisions are permanent and never get
>> changed again.
>>
>> In revision 4, you made a change to a file in a directory
>> Bug_Fixes in the directory Branches. I assume what you want to do
>> is to make that same change to the same file in the directory Trunk.
>>
>
> Yes
>
>
>>
>> In that case, get a working copy of Trunk, go into it, and merge
>> the change into the working copy:
>>
>> cd /path/to/working/copy/of/Trunk
>> svn merge -r3:4 svn://myserver/Development/Test_Project/Branches/
>> Bug_Fixes
>>
>> This means "Make a recipe that transforms revision 3 of the
>> Bug_Fixes branch into revision 4, and apply that recipe to the
>> working copy I'm in right now."
>>
>
> Ok it worked but I'm not exactly understanding why -r3:4. The
> working copy is at r5 and I want to merge r4 into it... to make the
> working copy finally r6. Maybe you can explain it differently? Thanks
You're thinking of a revision as a change. It's not. It's a static
state. Let's say your repository is at revision 3. Now, on
Thursday, you commit some changes. The repository is now at revision
4, which represents the state of the repository with those changes
applied. Then on Friday you make some modifications and commit
again. Now you're at revision 5, with revision 4 representing the
state of the repository on Thursday and revision 3 representing the
state of the repository on Wednesday.
Ok, so you want to merge the changes that were applied in revision 4
to a branch. Revision 4 by itself doesn't have any changes, though.
It's just a static snapshot of the repository as it looked on
Thursday. What you really want to do is not merge "revision 4" but
rather merge the difference between revision 3 and revision 4, hence
the need to merge -r3:4. If you instead wanted to merge all of the
changes that were applied in both revision 3 and 4 you'd want to
merge the difference between revisions 2 and 4 and would type -r2:4.
You can also merge the difference between revisions that are out of
order. For example, you could type "merge -r4:3", which would do a
reverse diff from 4 to 3 (you can use this to remove a revision from
the head).
Ok, now that I've probably thoroughly confused you, let me try to
state things slightly more simply:
Merge takes two revisions and creates a diff of those two revisions
(similar to if you'd used the diff command). It then applies that
diff to the current working copy (similar if you'd used the patch
command). So, the "-rX:Y" doesn't tell merge to merge from X into
Y. Instead, it tells merge to merge the difference between X and Y
into the local working copy.
-Bill
>
>
>>
>> Now you resolve any conflicts that might have occurred, test the
>> change to make sure it works, then you commit the working copy,
>> stating in your commit message that you merged revision 4 of the
>> Bug_Fixes branch into the trunk.
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Understanding merging.
Posted by Anastasios Angelidis <vo...@videotron.ca>.
Ryan Schmidt wrote:
> On Oct 26, 2005, at 15:54, Anastasios Angelidis wrote:
>
>> I run: svn log --verbose svn://myserver/Development/Test_Project and
>> get listing below.
>>
>> I would like to merge r4 into r5 so I run: svn merge -r 4:5 svn://
>> mtlw-angt-01/Development/Test_Project/Trunk But I get a blank
>> response. Bassically svn returns to the prompt again. What I'm I
>> doing wrong?
>>
>> Thanks
>>
>> ----------------------------------------------------------------------
>> --
>> r5 | tassoa | 2005-10-25 16:46:20 -0400 (Tue, 25 Oct 2005) | 1 line
>> Changed paths:
>> M /Test_Project/Trunk/index.html
>>
>> Added new paragraph.
>> ----------------------------------------------------------------------
>> --
>> r4 | tassoa | 2005-10-25 16:44:57 -0400 (Tue, 25 Oct 2005) | 1 line
>> Changed paths:
>> M /Test_Project/Branches/Bug_Fixes/index.html
>>
>> Fixed spelling mistake found in the <title> tag. Should read "Hello
>> World!" and not "Hello Wrld!".
>> ----------------------------------------------------------------------
>> --
>
>
> You're confused about terminology.
>
> A revision of the repository represents a point in time. At revision
> 4, it looked one way, and at revision 5, it looked a slightly
> different way. Revisions are permanent and never get changed again.
>
> In revision 4, you made a change to a file in a directory Bug_Fixes
> in the directory Branches. I assume what you want to do is to make
> that same change to the same file in the directory Trunk.
Yes
>
> In that case, get a working copy of Trunk, go into it, and merge the
> change into the working copy:
>
> cd /path/to/working/copy/of/Trunk
> svn merge -r3:4 svn://myserver/Development/Test_Project/Branches/
> Bug_Fixes
>
> This means "Make a recipe that transforms revision 3 of the Bug_Fixes
> branch into revision 4, and apply that recipe to the working copy I'm
> in right now."
Ok it worked but I'm not exactly understanding why -r3:4. The working
copy is at r5 and I want to merge r4 into it... to make the working copy
finally r6. Maybe you can explain it differently? Thanks
>
> Now you resolve any conflicts that might have occurred, test the
> change to make sure it works, then you commit the working copy,
> stating in your commit message that you merged revision 4 of the
> Bug_Fixes branch into the trunk.
>
>
>
> ---------------------------------------------------------------------
> 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: Understanding merging.
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 26, 2005, at 15:54, Anastasios Angelidis wrote:
> I run: svn log --verbose svn://myserver/Development/Test_Project
> and get listing below.
>
> I would like to merge r4 into r5 so I run: svn merge -r 4:5 svn://
> mtlw-angt-01/Development/Test_Project/Trunk But I get a blank
> response. Bassically svn returns to the prompt again. What I'm I
> doing wrong?
>
> Thanks
>
> ----------------------------------------------------------------------
> --
> r5 | tassoa | 2005-10-25 16:46:20 -0400 (Tue, 25 Oct 2005) | 1 line
> Changed paths:
> M /Test_Project/Trunk/index.html
>
> Added new paragraph.
> ----------------------------------------------------------------------
> --
> r4 | tassoa | 2005-10-25 16:44:57 -0400 (Tue, 25 Oct 2005) | 1 line
> Changed paths:
> M /Test_Project/Branches/Bug_Fixes/index.html
>
> Fixed spelling mistake found in the <title> tag. Should read "Hello
> World!" and not "Hello Wrld!".
> ----------------------------------------------------------------------
> --
You're confused about terminology.
A revision of the repository represents a point in time. At revision
4, it looked one way, and at revision 5, it looked a slightly
different way. Revisions are permanent and never get changed again.
In revision 4, you made a change to a file in a directory Bug_Fixes
in the directory Branches. I assume what you want to do is to make
that same change to the same file in the directory Trunk.
In that case, get a working copy of Trunk, go into it, and merge the
change into the working copy:
cd /path/to/working/copy/of/Trunk
svn merge -r3:4 svn://myserver/Development/Test_Project/Branches/
Bug_Fixes
This means "Make a recipe that transforms revision 3 of the Bug_Fixes
branch into revision 4, and apply that recipe to the working copy I'm
in right now."
Now you resolve any conflicts that might have occurred, test the
change to make sure it works, then you commit the working copy,
stating in your commit message that you merged revision 4 of the
Bug_Fixes branch into the trunk.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org