Announcement

Collapse
No announcement yet.

Broke history path by independently renaming folders in the trunk and in the branch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Broke history path by independently renaming folders in the trunk and in the branch

    Hello,
    here is the problem (I have also posted the question on StackOverflow, but it hasn't raised much interest):

    I had two working copies: of a trunk and of a branch:

    * trunk -> App 1.0
    * branches -> 1.2 -> App 1.0

    I needed to rename `App 1.0` to `Application` ("1.0" being an archaism from the days where versioning was done "manually" and SVN was underused to put it mildly; I'm trying to set it right now, although I haven't had much experience with source control).

    I did TortoiseSVN -> Rename on my 1.2\App 1.0 and trunk\App 1.0 local disk folders (working copies), and I renamed the folders in the repository as well (via the Repo-browser).

    And yet code file abc.cs in the 1.2 branch still "thinks" that its base is the old file: App 1.0/abc.cs.

    Diff with previous version gives me an error ("Subversion reported an error: Unable to find repository location for 1.2\App 1.0\abc.cs in revision 604").

    See the revision graph for this file:

    Name:  1dac95b5b5fbdbe57692de3bf2369e8e.jpg
Views: 1
Size:  46.5 KB

    (I edited out the actual name of the application for reasons easy to understand.)

    Propagating trunk modifications by merging them into the branch is now a bit troublesome.


    What's more, my collegue still has an App 1.0 working copy (hasn't comitted nor updated it yet), so I'm somewhat afraid that we're about to mess things up, and I'm not sure how to go on from here.

    The question is: where did I do wrong, and how do I fix that (both for me as well as my collegue)?

    I guess that renaming both folders independently was the mistake that broke history tracing (no direct connection between 637 and 639 on the picture now, while that's what I would need, isn't it?).

    I'm just not sure what I should have done instead, and neither how to fix it.

  • #2
    Originally posted by Morawski View Post
    Hello,
    here is the problem (I have also posted the question on StackOverflow, but it hasn't raised much interest):

    I had two working copies: of a trunk and of a branch:

    * trunk -> App 1.0
    * branches -> 1.2 -> App 1.0

    I needed to rename `App 1.0` to `Application` ("1.0" being an archaism from the days where versioning was done "manually" and SVN was underused to put it mildly; I'm trying to set it right now, although I haven't had much experience with source control).

    I did TortoiseSVN -> Rename on my 1.2\App 1.0 and trunk\App 1.0 local disk folders (working copies), and I renamed the folders in the repository as well (via the Repo-browser).
    So, you didn't commit the rename in your working copy before doing the rename directly in the repository?

    Comment


    • #3
      Originally posted by mbooth View Post
      So, you didn't commit the rename in your working copy before doing the rename directly in the repository?
      No.

      I am not positively sure whether I performed TortoiseSVN Rename on the local folder, or a rename in the repository via RepoBrowser first.

      I would say that the former was first, although I can't swear on my life.

      What I am 100% certain though is that I didn't commit nor update anything - basically, I have not transferred any data between the local copy and the repository - until the local folder and the folder in the repository were BOTH identically renamed. And all working copies were up to date before I started renaming. But after committing TortoiseSVN 'thought' that the renamed folder was added, and originally named folder got deleted, which is the root cause of the trouble I believe.

      I've done a major cleanup now, I started from scratch, created a branch again etc. So fixing the situation is not a priority now, I've done it "manually".

      What I am very curious about is how it should be done properly?

      What I've got is:
      [branches] -> [1.2]
      [trunk]

      and the same folder structure on my disk (working copies).

      Now let's say I'm told 1.2 will actually be 1.3.

      To keep things nice and neat, I want to rename the branch accordingly. How do I do this?

      Should I rename the 1.2 branch in the repository and then check it out into a new, empty 1.3 folder? Will merging trunk changes (like bug fixes) into the branch still work properly?
      Last edited by Morawski; 04-13-2012, 09:15 AM.

      Comment


      • #4
        Hi there,

        You could have done this via Tortoise using the rename command, or via the command line using 'svn move'.

        Where you went wrong is that after renaming the folder in the repo browser you should have completed SVN update in Tortoise, which would have performed the rename action for you on your working copy.
        Mand Beckett
        WANdisco

        Read the WANdisco blog for Subversion, uberSVN and SmartSVN tips and tricks | Find me on Twitter

        Comment


        • #5
          I understand now - thanks! I accepted your answer on SO.

          Comment


          • #6
            No worries, give us a shout if you need anything else
            Mand Beckett
            WANdisco

            Read the WANdisco blog for Subversion, uberSVN and SmartSVN tips and tricks | Find me on Twitter

            Comment

            Working...
            X