Vote #75662
未完了Issues with svn:mergeinfo property values and r13443 rails-4.1 rebase.
0%
説明
After some Redmine core SCM log reviewing I noticed several issues:
related to svn:mergeinfo properties:¶
[rails-4.1 branch] r13443 rebase of rails-4.1 branch included rails-4.1 backport commits to trunk[1] (in svn:mergeinfo only obviously): need to reverse-merge them for svn:mergeinfo¶
[rails-4.1 branch] contains four commits merged from trunk[2]: this is not reflected in the respective svn:mergeinfo property¶
[trunk] three commits were backported from rails-4.1 branch to trunk[3]: this is not reflected in the respective svn:mergeinfo property¶
[2.6-stable branch] contains one commit merged from trunk (r13439): this is not reflected in the respective svn:mergeinfo property¶
related to the r13443 rails-4.1 rebase:¶
[rails-4.1 branch] r13443 rebase is missing commits from trunk4: still needs to be merged¶
So I checked out Redmine svn source and started fixing them one after another.
The first four are changes to the svn:mergeinfo values only (@svn merge ... --record-only@) and the last is a complete merge (thus with svn:mergeinfo property update) of fourteen commits where two files[5] had some simple conflicts to be solved manually:
- 1. reverse-merge-backport-commits-on-trunk_against_rails-4.1_at_r13451.patch: view details...
- 2. merge-merged-in-41-from-trunk_to_rails-4.1_at_r13451.patch: view details...
- 3. merge-backported-in-trunk-from-41_to_trunk_at_r13451.patch: view details...
- 4. merge-merged-in-2.6-stable-from-trunk_to_2.6-stable_at_r13451.patch: view details...
- 5. merge-missing-in-41-from-trunk_to_rails-4.1_at_r13451.patch: view details...
If these changes are applied then:
- rails-4.1 branch contains all commits on trunk between the creation of the branch upto r13439 (fully rebased)
- svn:merginfo property was already introduced around 2.4-stable and custom_fields branch
- svn:merginfo property is started being reliably used with 2.6-stable (last 2.x?)
- svn:merginfo property is having full history of rails-4.1 and current trunk
- svn:merginfo property is having full history of and is reliably used with new major 3.0-stable and up
All the patches are taken against a checkout of the respective branches at r13451. If more information is need, please let me know. I have a bunch of notes taken during the inspection, which I could attach if needed as well.
I hope this is of any use...
Regards,
Mischa.
fn1. r13407 and r13408
fn2. r13302, r13306, r13311 and r13332
fn3. r13296, r13313 and r13315
fn4. r13284, r13285, r13287, r13299, r13303, r13322, r13323, r13324, r13325, r13326, r13327, r13329, r13330 and r13331
fn5. config/locales/de.yml and Gemfile
journals
Sorry. Because I use hgsubversion and "hg graft" or Mercurial Queues to *commit* to Subversion, it lose svn property.
I don't know how to apply attached patches.
Could you tell me?
--------------------------------------------------------------------------------
Not a problem. svn:mergeinfo properties can only be changed using svn 1.5.x+ (preferably 1.7.x) clients as far as I know. Neither shouldn't they be changed manually too (unless...), instead @svn merge --record-only@ (or the reverse-merge option) should be used.
I am aware of the fact you're using hg for committing to Redmine. I don't mind to keep track of these changes because hg cannot maintain this merge tracking info though and provide patches for it once in a while...
Most info about svn merging in general (thus not about hg -> svn) is at http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.mergeinfo.
Regards,
Mischa.
--------------------------------------------------------------------------------
Thank you for your reply.
I use CentOS6 and it's svn version 1.6.11.
<pre>
$ LANG=C svn --version
svn, version 1.6.11 (r934486)
compiled Mar 6 2014, 10:49:10
</pre>
I tried applying attached patches.
<pre>
$ LANG=C svn info
Path: .
URL: https://svn.redmine.org/redmine/trunk
Repository Root: https://svn.redmine.org/redmine
Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81
Revision: 13458
Node Kind: directory
Schedule: normal
Last Changed Author: marutosijp
Last Changed Rev: 13458
Last Changed Date: 2014-10-20 13:15:11 +0900 (Mon, 20 Oct 2014)
</pre>
<pre>
$ patch -p0 < ~/Desktop/1.\ reverse-merge-backport-commits-on-trunk_against_rails-4.1_at_r13451.patch
patch: **** Only garbage was found in the patch input.
$ svn status
$
</pre>
How to change svn:mergeinfo properties by svn client?
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> I tried applying attached patches.
That won't work. The patches (except attachment:"5. merge-missing-in-41-from-trunk_to_rails-4.1_at_r13451.patch" which contains actual file changes [now integrated via r13504 for #18174]) contain the output of @svn diff@ where no files in the repo are touched, only the values of the svn property svn:mergeinfo are changed (svn repo metadata). Using @svn diff@ these svn property changes are included in the output diff, but patch doesn't understand this svn metadata as it works on files.
> How to change svn:mergeinfo properties by svn client?
In a normal situation where @svn merge@ is used for (reverse-)merges these svn:mergeinfo values are updated automatically.
For this case, where we afterwards need to modify the svn:mergeinfo values only (watch for @--record-only@), I'll give some examples below.
What's important to note is that (generally) all these changes are made on a local checkout. As such they need to be committed to remote. This brings me to the drawback of changing these values afterwards in the here mentioned ways: it will create one or more _blank_ commits changing only these properties. I don't know if it's worth the fuzz if the merge tracking features of svn are not actually used.
I think this should be discussed and decided among the lead and other committers first before these property changes get actually committed (also note that the patches I provided here are outdated already).
The examples:
* This can be used to fix point 1.1 in this issues description.
** record-only reverse-merge commits r13407 and r13408 (and r13406 and r13405 since they are not existing on trunk) from remote (local might work too?) trunk to local checkout of rails-4.1 branch
<pre>
$ svn co https://svn.redmine.org/redmine/sandbox/rails-4.1 redmine-rails-4.1
$ cd redmine-rails-4.1
$ svn merge -r 13408:13404 https://svn.redmine.org/redmine/trunk . --record-only
$ svn status
$ svn diff
</pre>
* This can be used to fix point 1.3 in this issues description.
** record-only merge commit r13296 from remote (local could work too ?) rails-4.1 branch to local checkout of trunk
<pre>
$ svn co https://svn.redmine.org/redmine/trunk redmine-trunk
$ cd redmine-trunk
$ svn merge https://svn.redmine.org/redmine/sandbox/rails-4.1 -c 13296 . --record-only
$ svn status
$ svn diff
</pre>
* This can be used to fix point 1.3 in this issues description in a *manual* way using @svn propedit@ (with an identical result as the previous example).
** manually change svn:mergeinfo property values using svn propedit command on local checkout of rails-4.1 branch
<pre>
$ svn co https://svn.redmine.org/redmine/sandbox/rails-4.1 redmine-rails-4.1
$ cd redmine-rails-4.1
$ svn propedit svn:mergeinfo .
{
# default editor comes up...
# manually change trunk line:
- from: /trunk:13333-13439
- to : /trunk:13333-13404,13409-13439
# exit editor
}
$ svn status
$ svn diff
</pre>
* additional command examples
** more (read-only) commands useful when working with svn:mergeinfo properties, on local checkout of rails-4.1 branch
<pre>
$ svn co https://svn.redmine.org/redmine/sandbox/rails-4.1 redmine-rails-4.1
$ cd redmine-rails-4.1
# retrieve svn:mergeinfo values using propget
$ svn propget svn:mergeinfo .
>>
/sandbox/custom_fields:12320-12324,12326-12399
/trunk:13333-13439
<<
# retrieve list of commits merged from trunk
$ svn mergeinfo --show-revs merged ^/trunk .
>>
> list of revisions merged from trunk:
r13334
r13335
r13336
...
see below
...
<<
# retrieve list of commits eligible for merging from trunk
$ svn mergeinfo --show-revs eligible ^/trunk .
>>
> list of revisions eligible for merging from trunk:
r13284
r13285
r13287
...
see below
...
<<
</pre>
I'll add the full and _annotated_ output of the last two commands collapsed due to the length. It's informative because it shows the actual problems with the merge tracking metadata of the rails-4.1 branch.
{{collapse(svn mergeinfo --show-revs merged ^/trunk .)
<pre>
>>
r13334
r13335
r13336
r13337
r13338
r13339
r13340
r13343
r13344
r13345
r13346
r13350
r13351
r13352
r13353
r13354
r13357
r13358
r13359
r13360
r13361
r13362
r13363
r13364
r13365
r13367
r13368
r13369
r13374
r13375
r13378
r13379
r13381
r13383
r13385
r13386
r13390
r13391
r13392
r13393
r13394
r13395
r13396
r13398
r13399
r13400
r13401
r13402
r13403
r13404
-- rails-4.1 backport commits, reported in #18134 1.1
r13407
r13408
--
r13409
r13410
r13411
r13412
r13413
r13415
r13416
r13417
r13418
r13419
r13420
r13421
r13422
r13423
r13424
r13425
r13426
r13427
r13428
r13429
r13430
r13432
r13436
r13439
<<
</pre>
}}
{{collapse(svn mergeinfo --show-revs eligible ^/trunk .)
<pre>
>>
-- reported in #18134 2.1 & #18174
r13284
r13285
r13287
r13299
-- backport of r13296 from rails-4.1, reported in #18134 1.3
r13301
-- merged into rails-4.1 in r13304, reported in #18134 1.2
r13302
-- reported in #18134 2.1 & #18174
r13303
-- merged into rails-4.1 in r13307, reported in #18134 1.2
r13306
r13311
-- reported in #18134 2.1 & #18174
r13322
r13323
r13324
r13325
r13326
r13327
r13329
r13330
r13331
-- merged into rails-4.1 in r13333, reported in #18134 1.2
r13332
-- trunk commits between rebase at r13439 and r13482 which were not in rails-4.1 branch when it got re-integrated with r13482 (after #18134 creation)
-- TODO: these are still possibly corrupted by rails-4.1 branch merge -->> DONE: commits checked, they are not affected by the r13482 merge.
r13449
r13450
r13451
r13457
r13458
r13461
r13464
r13466
r13467
r13468
r13471
r13477
r13478
r13479
-- merge and post-merge of rails-4.1 re-integration
-- not a problem; rails-4.1 can now be considered stale
r13482
r13483
r13484
r13485
r13486
r13487
r13488
r13489
r13490
r13491
r13492
r13493
r13495
r13496
r13497
r13498
r13499
r13500
r13501
r13502
r13503
r13504
r13505
r13506
r13508
r13509
r13510
<<
</pre>
}}
There's one main reference to all the commands I used here: "Version Control with Subversion":http://svnbook.red-bean.com/ (AKA the SVN book)
That's it. I think this explains the things pretty well.
If you have more questions, please feel free to ask.
Kind regards,
Mischa.
--------------------------------------------------------------------------------
related_issues
relates,Closed,18174,Rails-4.1 branch merge into trunk (r13482) reverts trunk commits