git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git svn bug on merging svn branches
@ 2018-10-09 23:38 Артем Семенов
  2018-10-10 18:36 ` Andreas Heiduk
  0 siblings, 1 reply; 2+ messages in thread
From: Артем Семенов @ 2018-10-09 23:38 UTC (permalink / raw)
  To: git

Hello.

Git svn bug on merging svn branches:

Svn repository (branches tag trunk).

1. Add a some file by svn tools.
2. Create a new branch by svn tools (e.g. br1) .
3. Create a new branch by svn tools on branch br1 (e.g. br2).
4. Add some changes to file f1 in branch br1. Commit by svn tools.
5. Clone repository by git svn.
6. Create two local branches – br1_svn (on origin/br1) and br2_svn (on 
origin/br2);
7. Checkout to br2_svn. Add some changes (e.g add file f2). Execute git 
add, git commit.
8. Execute “git merge br1_svn”.
9. Checkout to br1_svn.
10. Execute “git svn info” - URL refers to br1. (URL: 
https://127.0.0.1/svn/branchtest/branches/br1)
11. Execute “git merge br2_svn”.
12. Execute “git svn info” - URL refers to br2. (URL: 
https://127.0.0.1/svn/branchtest/branches/br2)

-- 
With my best regards,
  Artem Semenov               mailto:artem.semenov@jarillolabs.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Git svn bug on merging svn branches
  2018-10-09 23:38 Git svn bug on merging svn branches Артем Семенов
@ 2018-10-10 18:36 ` Andreas Heiduk
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Heiduk @ 2018-10-10 18:36 UTC (permalink / raw)
  To: Артем Семенов,
	git

Hello,

Am 10.10.2018 um 01:38 schrieb Артем Семенов:
> Hello.
> 
> Git svn bug on merging svn branches:
> 
> Svn repository (branches tag trunk).
> 
> 1. Add a some file by svn tools.
> 2. Create a new branch by svn tools (e.g. br1) .
> 3. Create a new branch by svn tools on branch br1 (e.g. br2).
> 4. Add some changes to file f1 in branch br1. Commit by svn tools.
> 5. Clone repository by git svn.
> 6. Create two local branches – br1_svn (on origin/br1) and br2_svn (on
> origin/br2);
> 7. Checkout to br2_svn. Add some changes (e.g add file f2). Execute git
> add, git commit.
> 8. Execute “git merge br1_svn”.
> 9. Checkout to br1_svn.
> 10. Execute “git svn info” - URL refers to br1. (URL:
> https://127.0.0.1/svn/branchtest/branches/br1)
> 11. Execute “git merge br2_svn”.
> 12. Execute “git svn info” - URL refers to br2. (URL:
> https://127.0.0.1/svn/branchtest/branches/br2)

The "CAVEAT" section in the git-svn manual already contains some text about
your case:

       If you do merge, note the following rule: git svn dcommit will attempt
       to commit on top of the SVN commit named in

           git log --grep=^git-svn-id: --first-parent -1

       You must therefore ensure that the most recent commit of the branch you
       want to dcommit to is the first parent of the merge. Chaos will ensue
       otherwise, especially if the first parent is an older commit on the
       same SVN branch.

The paragraphs before these lines give more reasons to avoid a non-linear
history in SVN branches.

Best regards
Andreas Heiduk

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-10 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 23:38 Git svn bug on merging svn branches Артем Семенов
2018-10-10 18:36 ` Andreas Heiduk

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).