Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8282257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:18:42+00:00 2026-06-08T10:18:42+00:00

A project I’m working on desperately needs refactoring. The problem is that there are

  • 0

A project I’m working on desperately needs refactoring. The problem is that there are typically multiple branches (maintenance, new features, etc.) and I’m not so sure we can easily move, rename and delete files and directories and merge the changes. My fear is that I’d move a file in a refactoring branch while someone else is updating the file in another branch. I’ve been hoping for a small window where the trunk has everything and no branches are needed, but the business is always needing changes (either immediately or as part of a minor release).

Our source control is managed with Subversion. Is it easy/possible to drastically change the project in one branch while keeping the changes in synch with others? I’m pretty good about merging changes to keep branches up-to-date and maybe just making small refactoring changes at a time will work. Otherwise, can this really only be done by setting aside some time where we’ll only work on refactoring (i.e., no other branches)? I’ve been trying to convince business owners that we need some time to refactor and, while they agree, it just doesn’t seem possible right now.

One of the important things about refactoring is that it should always be done (not just once-in-a-while). That seems doable with actual code (breaking up functions, removing duplicate code, etc.) but I’m not so confident about appropriately renaming and grouping files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:18:43+00:00Added an answer on June 8, 2026 at 10:18 am

    It is do-able in SVN, but I can tell you that you will face a lot of different issue. Think twice if you really want the refactoring goes to every branch? It don’t seems to be reasonable to merge the refactored code to release branches (which is the maintenance branches for releasing minor fixes for production versions).

    Although SVN can let you merge from any branch to any branch, it is always more reasonable to merge between a branch and the originated branch. Therefore, if you have something like this:

    Rel-1.0          /---------------->
    Rel-1.1         /   /------------------->
    Trunk      --------------------------------*------>
    FeatureA         \-------->  \       \     ^ (rev. X)
    FeatureB                      \-->    \    |
    Refactor                               \--->
    

    Instead of doing the refactoring job in Refactor and merge it to every other branch, it is more reasonable to reintegrate the change in Refactor branch to Trunk (assume in revision X), and then merge revision X from Trunk to other branches that need this change. For Release Branches (Rel-1.0, Rel-1.1), it will most likely be a cherry-pick. For feature branches A/B, it will be catching up with Trunk (by merging all things in Trunk).

    Please be noted that, merge become harder if your branch deviate from trunk more. Therefore think twice if you really need to merge refactored code to release branches (which is most likely very deviated from the trunk).

    Please also note that, tracking of rename in SVN is not that well implemented. For example, you renamed file F in trunk to FNew, what SVN treat is adding FNew by copying from F, and delete F. If you merge it to the branch, afaik, what SVN does is adding branch/FNew by copying from trunk/F, and delete branch/F. Therefore if you have ever modified branch/F, for newer version of SVN (probably >=1.5) it will generate a tree conflict, while in older version of SVN you will even lost the modification. Though newer version handles a bit better, none of them is handling the merge for renaming “correctly” (which move branch/F to branch/FNew). This will cause you extra effort in merging, and cause merging even more difficult in case two branches deviate a lot.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The project that I am working on (Node.js) implies lots of operations with the
A project I'm working on at the moment involves refactoring a C# Com Object
My project consists of an app that links to two static libraries. Each of
The project currently has a UIviewController called Dashboard that acts as the main view
Project Requirements: I need to build a web service that will receive chunks of
Project I'm working on uses jQuery. I have a series of Ajax calls being
project is written on php. There is timestamp field in mysql it updates automatically.
Project Euler has a paging file problem (though it's disguised in other words). I
Project Euler problem 36 states: The decimal number, 585 = 1001001001 (binary), is palindromic
Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.