[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Wed, 2005-11-02 at 13:32 +0100, Julien Cugnière wrote:
> I would like to mention that Subversion does not (yet) support *true*
> renames. This means that "svn rename A B" is in fact just a shortcut for
> "svn copy A B; svn delete A". This preserves history, and most of the
> time works OK, but there are subtle side effects, and not all svn
> commands are rename-aware.
>
> Here is an example, that I got from some subversion doc, although I
> don't remember which:
>
> * revision 100: branch is created from trunk
> * revision 101: trunk/a.txt is edited
> * revision 102: branch/a.txt is renamed to branch/b.txt
>
> If you try to merge revision 101 from "trunk" to "branch", svn will
> complain that branch/a.txt does not exist. This works if you explicitely
> merge from "trunk/a.txt" to "branch/b.txt", but this isn't exactly
> convenient if there are more than 1 file modified in revision 101.
I see. I actually tried i, and I get this:
Skipped missing target: 'a.txt'
A b.txt
And nothing gets modified.
> If you try to merge revision 102 from branch to trunk, then trunk/a.txt
> will be replaced by branch/b.txt, undoing the modifications from
> revision 101 ! This is because revision 102 contains a copy and a delete
> rather than a rename.
Here it just says:
Skipped missing target: 'b.txt'
A a.txt
And doesn't actually modify anything as well.
It's nice that you also can simply get a diff of what it tries to change
by replacing "svn merge" with "svn diff" :) In the first case, it gave:
Index: a.txt
===================================================================
--- a.txt (.../trunk) (revision 87)
+++ a.txt (.../branch/mybranch) (revision 87)
@@ -1 +0,0 @@
-This is the modified a.txt.
Index: b.txt
===================================================================
--- b.txt (.../trunk) (revision 0)
+++ b.txt (.../branch/mybranch) (revision 87)
@@ -0,0 +1 @@
+This is the original a.txt.
In the second:
Index: b.txt
===================================================================
--- b.txt (.../branch/mybranch) (revision 87)
+++ b.txt (.../trunk) (revision 87)
@@ -1 +0,0 @@
-This is the original a.txt.
Index: a.txt
===================================================================
--- a.txt (.../branch/mybranch) (revision 0)
+++ a.txt (.../trunk) (revision 87)
@@ -0,0 +1 @@
+This is the modified a.txt.
But, I think the case we will have in Allegro is like this:
"branch" is the 4.2.x, "trunk" 4.3.x (or any other directory names)
* revision 101: trunk/a.txt is renamed to b.txt
* revision 102: trunk/b.txt is modified
And now, you can simply merge the changes from trunk to the 4.2.0
branch. (Either including or excluding the name change, depending on
which revisions you specify.)
--
Elias Pschernig