No announcement yet.

SVN merge missing changes for some revisions

  • Filter
  • Time
  • Show
Clear All
new posts

  • SVN merge missing changes for some revisions

    Not sure if this topic is already discussed or not, as i am new to this forum.
    I am facing issues while svn merging. while merging code from one branch to another, at times, some of the code from some files is missed. also when a new file is added, it doesnot add the file and gives an issue "working copy is obstructed" or something like this and lets me keep the working copy state.

    [B]Scenario:[/B] there are multiple branches say [B]dev[/B], [B]staging[/B], [B]demo [/B]and production. Development team is using the branch [B]dev[/B]. Code is merged into a staging branch and deployed through "svn update" command on the server.

    We downloaded the code deployed from staging server, removed the .svn folder, made a new branch say [B]staging2[/B] and committed the code in that branch.
    further merging from dev branch will be done to staging2 branch for local testing before releasing to staging branch and deployed (svn update) on a new context in apache say staging2.

    Now, when i merge the code from dev branch to staging2 branch, there are times when it misses the changes in some of the files in revisions mentioned while merging. Also some newly added files in that specific revision (at dev branch) also dont get added to staging2 branch and it gives me error like working copy is obstructed and lets me to "keep working copy state".

    This is causing a major issue in release management and also the missing code has already caused a lot of ambiguities in the environment.
    Also i am new to [B]svn:mergeinfo[/B] property. when i perform a merge, the property doesnt get updated and the revision i merged earlier is still not marked as merged when i try to remerge it.

    Kindly guide me with the issue and let me know if i need to clear any thing in this case.

    Last edited by DougR; 01-12-2017, 01:22 PM. Reason: Still trying to get bold to be bold.

  • #2
    understood. that is a good suggestion for future, but currently i am still stuck. is there any solution in the current scenario? or do i have to re-create a new branch?


    • #3
      (sorry for the re-post above - the Forum software appears to have a bug and lost my original post)

      Since you've lost the revision history continuity on the branch you're on you should simply remove it (that won't lose the revision history of those files - they're fixed in Subversion's history forever) but now you can intentionally do what you accidentally did before in order to fix the situation.

      In a new working copy for the entire repo (not a checkout of the branch) do the following:

      1. Copy out of the repository the new files from the current branch (tar? zip?, etc.).
      2. Change into the parent directory of your mis-created "staging2" branch.
      3. Use "svn remove" to remove the broken "staging2" branch.
      4. Use "svn copy" to copy the original "staging" branch into a new "staging2" branch.
      5. Unpack your copied files into the new "staging2" branch.
      6. Determine which have changed, "svn add" them all and then "svn checkin".

      Now you're back on course.


      • #4
        Thanks for helping me out.. applied the suggested change yesterday day start and things working fine till now.. not facing too many issues while merging, newly added files are being added to the target repo fine and history is maintained properly.

        thankyou so much. Really appreciate your support.