Announcement

Collapse
No announcement yet.

Merge files in different file structures (from branch to new project)

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

  • Merge files in different file structures (from branch to new project)

    Hey guys, I'm in need of some help.
    I have read many articles on the internet and done some tests, but I can't figure out a way to solve my problem.

    Here's a brief of what's happening:
    - there's a branch called system_v01
    - there's a new project called system_v02 (it is system_v01 refactored to a new architecure)
    - all files from system_v01 were copied into system_v02 (using SVN COPY command to keep it's history)

    ==> system_v01 file structure
    Code:
    - branches
      - src
        - hot
          - package
            - file1.java
            - file2.java
            - file3.java
            - file4.java
    ==> system_v02 file structure (this is a new project)
    Code:
    - trunk
      - jar
        - src
          - main
            - java
              - package
                - file1.java
                - file2.java
                - file3.java
                - file4.java
    Now, when there're corrections in system_v01, I want to replicate them to system_v02.
    Aware that the files are the same, but in a different file structure I ask. Is there a way to "merge" them?

    So far I'm afraid the option will be to replicate the code from system_v01 to system_02 manually, what would be a nightmare.

    Anyone has a clue?

    Thanks in advance!

    Evertons

  • #2
    You could try a sub-tree merge like this :
    svn co your_trunk ;
    cd trunk/jar/..../package
    svn merge http://url/svn/brances/src/hot/package . --ignore-ancestry

    If the filenames aren't changed, this should give you what you want, but if it's many directories , then you'd have to do this several times over for each directory since the dir structure won't match.
    You might want to use the --dry-run flag as well , though merges are local you can revert the changes.

    Comment


    • #3
      Rahul,

      thank you very much for your answer!
      It really worked for most files and I am now doing more tests to see the results.

      This issue can be considered resolved.

      Thanks a lot!

      Evertons

      Comment

      Working...
      X