0

Most of my experience is with Perforce and my last svn experiences were ages ago, so I'm not yet that comfortable with (Tortoise) svn (again).

I want to move changes over from a working copy to a freshly checked out working copy in another related branch.

To be preceise, consider:

    trunk_revx
        |     \
        |      Branch_A
    trunk_revy   \
        |\       WC_A (containing my changes)
        | \
        |  Branch_B
        |    \
        |    WC_B (fresh, where I want to merge my changes to)

Which would be the correct command to get me a three-way-merge between WC_A, trunk_revx and WC_B without committing anything? Merge (call in which WC folder?) or Switch (again, call where?)?

All the terms are different, So I'm a little lost ;)

Yeti
  • 1,108
  • 19
  • 28
Johann Studanski
  • 1,023
  • 12
  • 19

1 Answers1

1

I suggest you the following actions:

  1. From WC_A: save your local changes by creating a patch file with TortoiseSVN (in case the next actions would fail and lose your changes)
  2. From WC_A: perform TortoiseSVN ==> switch... and switch to Branch_B:
    • the Branch_B is merged into WC_A (locally)
    • and your local modifications are kept
    • and now your WC_A points to Branch B

You just have to deal with the fact that your WC_A becomes your WC_B !

Alternatively, if you don't want to commit into Branch_A, but can commit anyway, you could also commit local changes to a new small branch (a branch of branch_A) and perform a merge from this new branch to Branch_B.

Laurent H.
  • 6,316
  • 1
  • 18
  • 40
  • Thanks! In fact, that's what I ended up doing, too, before I even read your comment, and I'm now folder-diff-merging my changed files over to the other workspace folder (that has some client-side generated stuff not present in the switch-ed workspace). I wish there was a more comfortable way like in Perforce though--for all we cursed about it in the company where we used it, it (or rather, its tool suite; I think it wouldn't be too hard to implement for SVN as well) does have its conveniences... – Johann Studanski Apr 26 '18 at 14:04
  • @JohannStudanski SVN does not really deal with merge between local working copies. You should not hesitate to create new branch (that you could remove later) and commit. Note that you could also use a patch as described in https://stackoverflow.com/questions/3564487/svn-merge-local-changes-into-other-working-copy. – Laurent H. Apr 26 '18 at 15:38
  • I'm working on an external SVN repo with quite strict rules and processes and few rights. Unfortunately. So I'm not allowed to simply create a branch for myself (I'd have to request one and wait two weeks or so until someone approved it). =/ – Johann Studanski Apr 27 '18 at 15:35