You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kari Granö <ka...@gmail.com> on 2009/03/18 20:10:10 UTC
Merging into sparse working copy fails
Hi,
I get surprising results when trying to perform merge on a sparse working
copy: the text merge is not performed at all. I'll demonstrate this with an
example against the TortoiseSVN repository:
- First, let's do a sparse checkout (using 1.6.0 RC3):
D:\Projects\test>svn --version
svn, version 1.6.0 (dev build)
compiled Mar 15 2009, 00:13:52
[...rest omitted for brevity]
D:\Projects\test>svn checkout -r15723 --depth immediates
http://tortoisesvn.tigris.org/svn/tortoisesvn/branches/1.6.x wc
A wc\versioninfo.build
A wc\test
A wc\ext
A wc\contrib
A wc\default.build
A wc\www
A wc\doc
A wc\Languages
A wc\Release_procedure.txt
A wc\src
A wc\version.build.in
A wc\default.build.user.tmpl
A wc\build.txt
U wc
Checked out revision 15723.
D:\Projects\test>cd wc
- Next, check out an infinite subtree "Languages":
D:\Projects\test\wc>svn checkout -r15723 --depth infinity
http://tortoisesvn.tigris.org/svn/tortoisesvn/branches/1.6.x/Languages
Languages
A Languages\Tortoise_ca_ES.po
A Languages\Tortoise_pl.po
A Languages\Tortoise_it.po
A Languages\Tortoise_sl.po
A Languages\Tortoise_da.po
[... rest omitted for brevity]
Checked out revision 15723.
- Now perform a merge from /trunk:
D:\Projects\test\wc>svn merge -c15724
http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk
- This sparse merge only results in subtree mergeinfo from /trunk:
D:\Projects\test\wc>svn stat
M .
M test
M ext
M contrib
M www
M doc
M Languages
M src
- As an example, see changes in 'ext':
D:\Projects\test\wc>svn diff ext
Property changes on: ext
___________________________________________________________________
Added: svn:mergeinfo
Merged
/branches/LogCacheEnhancement/ext:r9629-9630,9653,9691-9692,9860,9864,9867,9
869-9872,9876-9880,10561-10564,10601-10706,10821-10866,10871-10887,11153,111
55,11234-11241,11243,11246,11248-11252
Merged /trunk/ext:r15696,15704,15719,15721-15722,15724*
Merged /branches/1.4.x/ext:r9134
- Now retry merge on the depth-infinite subtree "Languages":
D:\Projects\test\wc>svn revert -R .
Reverted '.'
Reverted 'test'
Reverted 'ext'
Reverted 'contrib'
Reverted 'www'
Reverted 'doc'
Reverted 'Languages'
Reverted 'src'
D:\Projects\test\wc>svn update -r15723
At revision 15723.
D:\Projects\test\wc>svn merge -c15724
http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/Languages Languages
--- Merging r15724 into 'Languages':
U Languages\Tortoise_da.po
- Now we get correct merge + subtree mergeinfo!
D:\Projects\test\wc>svn stat
M Languages
M Languages\Tortoise_da.po
I have two questions on this:
(1) Is the inability of merge to descend to the populated subtrees of a
sparse working copy a bug, or am I misunderstanding something?
(2) It seems that merging into a sparse working copy always creates subtree
mergeinfo, which is not a good thing for reintegrate merges, and makes
reasoning about performed merges hard. What is the recommended practice
with merging and sparse checkouts? Should the merging only be done on fully
infinite working copies?
Thanks for reading,
Kari
I'm attaching a (Windows) script to reproduce the problem.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1350524
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Merging into sparse working copy fails
Posted by Mark Eichin <ei...@gmail.com>.
You want to pass --depth=infinite to the merge itself, if it's like the case
I've seen before. Couldn't say if that's actually reasonable, but it
works...
On Mar 18, 2009 4:15 PM, "Kari Granö" <ka...@gmail.com> wrote:
Hi,
I get surprising results when trying to perform merge on a sparse working
copy: the text merge is not performed at all. I'll demonstrate this with an
example against the TortoiseSVN repository:
- First, let's do a sparse checkout (using 1.6.0 RC3):
D:\Projects\test>svn --version
svn, version 1.6.0 (dev build)
compiled Mar 15 2009, 00:13:52
[...rest omitted for brevity]
D:\Projects\test>svn checkout -r15723 --depth immediates
http://tortoisesvn.tigris.org/svn/tortoisesvn/branches/1.6.x wc
A wc\versioninfo.build
A wc\test
A wc\ext
A wc\contrib
A wc\default.build
A wc\www
A wc\doc
A wc\Languages
A wc\Release_procedure.txt
A wc\src
A wc\version.build.in
A wc\default.build.user.tmpl
A wc\build.txt
U wc
Checked out revision 15723.
D:\Projects\test>cd wc
- Next, check out an infinite subtree "Languages":
D:\Projects\test\wc>svn checkout -r15723 --depth infinity
http://tortoisesvn.tigris.org/svn/tortoisesvn/branches/1.6.x/Languages
Languages
A Languages\Tortoise_ca_ES.po
A Languages\Tortoise_pl.po
A Languages\Tortoise_it.po
A Languages\Tortoise_sl.po
A Languages\Tortoise_da.po
[... rest omitted for brevity]
Checked out revision 15723.
- Now perform a merge from /trunk:
D:\Projects\test\wc>svn merge -c15724
http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk
- This sparse merge only results in subtree mergeinfo from /trunk:
D:\Projects\test\wc>svn stat
M .
M test
M ext
M contrib
M www
M doc
M Languages
M src
- As an example, see changes in 'ext':
D:\Projects\test\wc>svn diff ext
Property changes on: ext
___________________________________________________________________
Added: svn:mergeinfo
Merged
/branches/LogCacheEnhancement/ext:r9629-9630,9653,9691-9692,9860,9864,9867,9
869-9872,9876-9880,10561-10564,10601-10706,10821-10866,10871-10887,11153,111
55,11234-11241,11243,11246,11248-11252
Merged /trunk/ext:r15696,15704,15719,15721-15722,15724*
Merged /branches/1.4.x/ext:r9134
- Now retry merge on the depth-infinite subtree "Languages":
D:\Projects\test\wc>svn revert -R .
Reverted '.'
Reverted 'test'
Reverted 'ext'
Reverted 'contrib'
Reverted 'www'
Reverted 'doc'
Reverted 'Languages'
Reverted 'src'
D:\Projects\test\wc>svn update -r15723
At revision 15723.
D:\Projects\test\wc>svn merge -c15724
http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/Languages Languages
--- Merging r15724 into 'Languages':
U Languages\Tortoise_da.po
- Now we get correct merge + subtree mergeinfo!
D:\Projects\test\wc>svn stat
M Languages
M Languages\Tortoise_da.po
I have two questions on this:
(1) Is the inability of merge to descend to the populated subtrees of a
sparse working copy a bug, or am I misunderstanding something?
(2) It seems that merging into a sparse working copy always creates subtree
mergeinfo, which is not a good thing for reintegrate merges, and makes
reasoning about performed merges hard. What is the recommended practice
with merging and sparse checkouts? Should the merging only be done on fully
infinite working copies?
Thanks for reading,
Kari
I'm attaching a (Windows) script to reproduce the problem.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1350524
To unsubscribe from this discussion, e-mail: [
users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1350952
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Merging into sparse working copy fails
Posted by Mark Eichin <ei...@gmail.com>.
I personally do most of my cherry-picking merges with a tool that uses
a sparse copy, because I'm on 32-bit machines and a non-sparse merge
in the directory I care about (1455 files in 47 directories, 850 of
which are at top level) needs more than 3G of RAM. But I'm not sure
anyone else has that problem :-)
As for reasoning about subtree mergeinfo - I generally don't care
about a revision that didn't actually touch a file, so it doesn't make
a difference to me (or to the helper tools I write to do larger
merges.)
On Thu, Mar 19, 2009 at 4:27 PM, Kari Granö <ka...@gmail.com> wrote:
> Mark Eichin wrote:
>> You want to pass --depth=infinite to the merge itself, if it's like the
> case
>> I've seen before. Couldn't say if that's actually reasonable, but it
>> works...
>
> Thanks for the reply. You appear to be right, adding "--depth=infinity"
> makes the merge work. However, this looks like a surprising default to me.
> Contrast this with e.g. "svn update" behavior: there the working copy depth
> is respected in a deep manner. Not so with "svn merge": there the working
> copy depth appears to be shallow, taken from the target directory.
>
> Is there any reason for this asymmetry?
>
>>> (2) It seems that merging into a sparse working copy always creates
> subtree
>>> mergeinfo, which is not a good thing for reintegrate merges, and makes
>>> reasoning about performed merges hard. What is the recommended practice
>>> with merging and sparse checkouts? Should the merging only be done on
> fully
>>> infinite working copies?
>
> Do you have an opinion on this? If one wants to avoid subtree mergeinfo,
> the use of sparse checkouts seems impossible to me.
>
> Best regards,
> Kari.
>
>
--
_Mark_ <ei...@thok.org> <ei...@gmail.com>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1366037
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Merging into sparse working copy fails
Posted by Kari Granö <ka...@gmail.com>.
Mark Eichin wrote:
> You want to pass --depth=infinite to the merge itself, if it's like the
case
> I've seen before. Couldn't say if that's actually reasonable, but it
> works...
Thanks for the reply. You appear to be right, adding "--depth=infinity"
makes the merge work. However, this looks like a surprising default to me.
Contrast this with e.g. "svn update" behavior: there the working copy depth
is respected in a deep manner. Not so with "svn merge": there the working
copy depth appears to be shallow, taken from the target directory.
Is there any reason for this asymmetry?
>> (2) It seems that merging into a sparse working copy always creates
subtree
>> mergeinfo, which is not a good thing for reintegrate merges, and makes
>> reasoning about performed merges hard. What is the recommended practice
>> with merging and sparse checkouts? Should the merging only be done on
fully
>> infinite working copies?
Do you have an opinion on this? If one wants to avoid subtree mergeinfo,
the use of sparse checkouts seems impossible to me.
Best regards,
Kari.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1357596
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].