[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Has merge/diff *always* worked this way? (Was svn commit: r34047 - in branches/ignore-mergeinfo)

From: Paul Burba <ptburba_at_gmail.com>
Date: Fri, 7 Nov 2008 13:49:29 -0500

On Tue, Nov 4, 2008 at 12:31 PM, <hwright_at_tigris.org> wrote:
> Author: hwright
> Date: Tue Nov 4 09:31:56 2008
> New Revision: 34047
>
> Log:
> On the ignore-mergeinfo branch:
> Bring up-to-date with trunk at r33900.
>
> Due to some funniness with tree conflicts and merge, I had to manually remove
> subversion/libsvn_fs/base/metadata-table.[ch], which wasn't removed as part of
> the merge.

In IRC earlier this week:

<hwright> pburba: got a fun merge bug for you.
<pburba> hwright: what's that
<hwright> I'm bringing a the ignore-mergeinfo branch up-to-date with
r33900, and one of the revisions had a copy.
<hwright> the merge picked up the added-with-history bits, but not the delete.
<pburba> hwright: Where would the delete be in a copy?
<pburba> move?
<hwright> sorry, move.
<pburba> You using trunk or 1.5.something?
<hwright> trunk
<hwright> r33668 is the offending revision, it appears.
<pburba> I wonder if this is some side effect of the recent
tree-conflicts work. You working on that branch today or were you
just being proactive in synching?
<hwright> Just being proactive. I probably won't actually work on the
branch until 1.6 stuff is done.
<hwright> so there isn't any rush.
<pburba> hwright: Ok, I'll be able to look at it this week

So I'm looking and it looks like there is a potential problem with the
diff editor, or maybe it's *supposed* to work this way and we are
simply driving it incorrectly.

In r34047 Hyrum tried to merge all available revisions from 'trunk' to
'branch/ignore-mergeinfo', which at the time implied a revision range
of -r0:33900. In the following analysis I merge 'trunk/subversion' to
'branch/ignore-mergeinfo/subversion' which replicates the problem with
a bit less noise.

>svn co http://svn.collab.net/repos/svn/branches/ignore-mergeinfo@34046 -q

>merge http://svn.collab.net/repos/svn/trunk/subversion subversion -r0:33900 --accept postpone

# Right before merge.c:do_directory_merge calls
drive_merge_report_editor() here is the children_with_mergeinfo array
showing the ranges which must be merged to each subtree in
'branch/ignore-mergeinfo/subversion':

===== CHILDREN_WITH_MERGEINFO DUMP ==================
Ready to call drive_merge_report_editor():
-----------------------------------------------------
PATH : 'subversion'
REMAINING_RANGES : 33493-33900
-----------------------------------------------------
PATH : 'subversion/include'
REMAINING_RANGES : 33493-33900
-----------------------------------------------------
PATH : 'subversion/include/private/svn_auth_private.h'
REMAINING_RANGES : 33023-33900
-----------------------------------------------------
PATH : 'subversion/libsvn_auth_kwallet/kwallet.cpp'
REMAINING_RANGES : 33023-33900
-----------------------------------------------------
PATH : 'subversion/libsvn_subr'
REMAINING_RANGES : 33493-33900
-----------------------------------------------------
PATH : 'subversion/tests/libsvn_subr'
REMAINING_RANGES : 33493-33900
=====================================================

# 'branch/ignore-mergeinfo/subversion' requires r33492:33900, which
makes sense as the last synch-with-trunk merge on this branch (r33493)
brought it up to date with trunk_at_33492. But notice that two subtrees,
'subversion/include/private/svn_auth_private.h' and
'subversion/libsvn_auth_kwallet/kwallet.cpp' claim to need revisions
r33022:33900. This is because their mergeinfo at the start of the
merge:

>svn pg svn:mergeinfo -v subversion/include/private/svn_auth_private.h
Properties on 'subversion\include\private\svn_auth_private.h':
  svn:mergeinfo
    /branches/1.5.x-r30215/subversion/libsvn_subr/simple_providers.h:30238
    /branches/bdb-reverse-deltas/subversion/include/private/svn_auth_private.h:31976-32455
    /branches/diff-callbacks3/subversion/libsvn_subr/simple_providers.h:29985-30687
    /branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/simple_providers.h:30654-31044
    /branches/file-externals/subversion/include/private/svn_auth_private.h:31705-33228
    /branches/issue-3220-dev/subversion/include/private/svn_auth_private.h:32136-32152
    /branches/log-g-performance/subversion/libsvn_subr/simple_providers.h:30867-30958
    /branches/svn-mergeinfo-enhancements/subversion/libsvn_subr/simple_providers.h:30045-30214
    /branches/svnpatch-diff/subversion/include/private/svn_auth_private.h:31831,31912
    /branches/svnserve-logging/subversion/libsvn_subr/simple_providers.h:29754-30819
    /branches/tree-conflicts/subversion/include/private/svn_auth_private.h:28217-33080
    /trunk/subversion/include/private/svn_auth_private.h:2-28216
    /trunk/subversion/libsvn_subr/simple_providers.h:30711-31067

>svn pg svn:mergeinfo -v subversion/libsvn_auth_kwallet/kwallet.cpp
Properties on 'subversion\libsvn_auth_kwallet\kwallet.cpp':
  svn:mergeinfo
    /branches/1.5.x-r30215/subversion/libsvn_subr/simple_providers_cpp.cpp:30238
    /branches/bdb-reverse-deltas/subversion/libsvn_auth_kwallet/kwallet.cpp:31976-32455
    /branches/diff-callbacks3/subversion/libsvn_subr/simple_providers_cpp.cpp:29985-30687
    /branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/simple_providers_cpp.cpp:30654-31044
    /branches/file-externals/subversion/libsvn_auth_kwallet/kwallet.cpp:31705-33228
    /branches/issue-3000/subversion/libsvn_auth_kwallet/kwallet.cpp:31639,31642-31645,31647-31652,31654,31660
    /branches/issue-3220-dev/subversion/libsvn_auth_kwallet/kwallet.cpp:32136-32152
    /branches/log-g-performance/subversion/libsvn_subr/simple_providers_cpp.cpp:30867-30958
    /branches/svn-mergeinfo-enhancements/subversion/libsvn_subr/simple_providers_cpp.cpp:30045-30214
    /branches/svnpatch-diff/subversion/libsvn_auth_kwallet/kwallet.cpp:31831,31912
    /branches/svnserve-logging/subversion/libsvn_subr/simple_providers_cpp.cpp:29754-30819
    /branches/tree-conflicts/subversion/libsvn_auth_kwallet/kwallet.cpp:28217-33080
    /trunk/subversion/libsvn_auth_kwallet/kwallet.cpp:2-28216
    /trunk/subversion/libsvn_subr/simple_providers_cpp.cpp:30711-31067

# The mergeinfo on 'subversion\include\private\svn_auth_private.h':
  /trunk/subversion/include/private/svn_auth_private.h:2-28216
and on 'subversion\libsvn_auth_kwallet\kwallet.cpp':
  /trunk/subversion/libsvn_auth_kwallet/kwallet.cpp:2-28216
are both dubious. They are both self-referential and both are missing
-r33022:33493 which they should have had from Hyrum's earlier synch of
the branch to trunk in r33493. I'm going to put aside what went wrong
in that commit for now, there seems to be a problem for sure, but the
problem with the r34047 merge is an independent issue -- If a subtree
merge to 'subversion/include/private/svn_auth_private.h' had reversed
merged part of an earlier synch we could easily be in the same
situation.

In r34081 I added a simple new test, merge_tests.py 125 'merge prior
to rename src existence still dels src' which replicates the problem
Hyrum encountered.

Ok, let's return to the editor drive. The merge logic sees that
r33023 is the oldest revision among all the children and so tries to
merge http://svn.collab.net/repos/svn/trunk/subversion@33022 through
http://svn.collab.net/repos/svn/trunk/subversion@33900 into
'subversion', specifically:

merge.c:drive_merge_report_editor() calls
svn_client__get_diff_editor() to get the editor/baton for
http://svn.collab.net/repos/svn/trunk/subversion@33022 with the WC
path 'subversion' as the target.

Then svn_ra_do_diff3() is called to diff the 'subversion' WC against
http://svn.collab.net/repos/svn/trunk/subversion@33900.

Then reporter->set_path() is called on ""@33492, since as we saw
above, the merge target doesn't need r33022:33492.

Two more set_path calls are made,
include/private/svn_auth_private.h_at_33022 and
libsvn_auth_kwallet/kwallet.cpp_at_33022, since both *do* need
-r33022:33492.

Then the merge:

--- Merging r33023 through r33900 into
'subversion\include\private\svn_auth_private.h':
 G subversion\include\private\svn_auth_private.h
--- Merging r33493 through r33900 into 'subversion\include':
A subversion\include\private\svn_cache.h
U subversion\include\private\svn_dep_compat.h
U subversion\include\svn_dirent_uri.h
U subversion\include\svn_error_codes.h
U subversion\include\svn_fs.h
U subversion\include\svn_delta.h
U subversion\include\svn_path.h
U subversion\include\svn_io.h
U subversion\include\svn_wc.h
U subversion\include\svn_client.h
U subversion\include\svn_error.h
U subversion\include\svn_time.h
U subversion\include\svn_utf.h
U subversion\include\svn_auth.h
D subversion\include\svn_cache.h
 G subversion\include
--- Merging r33023 through r33900 into
'subversion\libsvn_auth_kwallet\kwallet.cpp':
UG subversion\libsvn_auth_kwallet\kwallet.cpp
--- Merging r33493 through r33900 into 'subversion':
U subversion\libsvn_ra\ra_loader.c
--- Merging r33493 through r33900 into 'subversion\libsvn_subr':
U subversion\libsvn_subr\subst.c
U subversion\libsvn_subr\sqlite.c
U subversion\libsvn_subr\cache-inprocess.c
U subversion\libsvn_subr\ssl_client_cert_pw_providers.c
U subversion\libsvn_subr\utf.c
U subversion\libsvn_subr\time.c
U subversion\libsvn_subr\auth.c
U subversion\libsvn_subr\cache-memcache.c
U subversion\libsvn_subr\dirent_uri.c
U subversion\libsvn_subr\simple_providers.c
U subversion\libsvn_subr\io.c
U subversion\libsvn_subr\stream.c
U subversion\libsvn_subr\cache.c
U subversion\libsvn_subr\cache.h
U subversion\libsvn_subr\genctype.py
U subversion\libsvn_subr\dso.c
U subversion\libsvn_subr\path.c
 G subversion\libsvn_subr
--- Merging r33493 through r33900 into 'subversion':
U subversion\libsvn_ra_local\ra_plugin.c
U subversion\bindings\javahl\native\ConflictResolverCallback.cpp
U subversion\bindings\javahl\native\StatusCallback.cpp
U subversion\bindings\javahl\native\org_tigris_subversion_javahl_SVNClient.cpp
U subversion\bindings\javahl\native\ConflictResolverCallback.h
U subversion\bindings\javahl\native\SVNClient.h
U subversion\bindings\javahl\native\StatusCallback.h
U subversion\bindings\javahl\native\SVNClient.cpp
U subversion\bindings\javahl\native\InfoCallback.cpp
U subversion\bindings\javahl\src\org\tigris\subversion\javahl\SVNClient.java
U subversion\bindings\javahl\src\org\tigris\subversion\javahl\SVNClientSynchronized.java
U subversion\bindings\javahl\src\org\tigris\subversion\javahl\Info2.java
U subversion\bindings\javahl\src\org\tigris\subversion\javahl\SVNClientInterface.java
U subversion\bindings\javahl\src\org\tigris\subversion\javahl\Status.java
U subversion\bindings\ctypes-python\TODO
U subversion\bindings\ctypes-python\setup.py
U subversion\bindings\ctypes-python\csvn\repos.py
U subversion\bindings\ctypes-python\csvn\ext\listmixin.py
U subversion\bindings\ctypes-python\csvn\wc.py
U subversion\bindings\ctypes-python\csvn\types.py
U subversion\bindings\ctypes-python\examples\example.py
U subversion\bindings\ctypes-python\examples\log.py
U subversion\bindings\ctypes-python\examples\mucc.py
U subversion\bindings\swig\core.i
U subversion\bindings\swig\python\tests\auth.py
U subversion\bindings\swig\python\svn\core.py
U subversion\bindings\swig\ruby\test\test_client.rb
U subversion\bindings\swig\ruby\svn\commit-mailer.rb
U subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c
U subversion\bindings\swig\include\svn_global.swg
U subversion\bindings\swig\svn_client.i
U subversion\tests\libsvn_wc\tree-conflict-data-test.c
--- Merging r33493 through r33900 into 'subversion\tests\libsvn_subr':
U subversion\tests\libsvn_subr\cache-test.c
U subversion\tests\libsvn_subr\dirent_uri-test.c
 G subversion\tests\libsvn_subr
--- Merging r33493 through r33900 into 'subversion':
U subversion\tests\libsvn_repos\repos-test.c
A subversion\tests\libsvn_delta\window-test.c
 U subversion\tests\libsvn_delta
U subversion\tests\cmdline\import_tests.py
U subversion\tests\cmdline\svnadmin_tests.py
U subversion\tests\cmdline\tree_conflict_tests.py
U subversion\tests\cmdline\log_tests.py
U subversion\tests\cmdline\changelist_tests.py
U subversion\tests\cmdline\switch_tests.py
 U subversion\tests\cmdline\tree_conflict_tests.txt
C subversion\tests\cmdline\diff_tests.py
U subversion\tests\cmdline\copy_tests.py
U subversion\tests\cmdline\stat_tests.py
U subversion\tests\cmdline\special_tests.py
U subversion\tests\cmdline\update_tests.py
A subversion\tests\cmdline\log_tests_data\merge_history_repo.png
U subversion\tests\cmdline\info_tests.py
U subversion\tests\cmdline\svntest\wc.py
U subversion\tests\cmdline\svntest\tree.py
U subversion\tests\cmdline\svntest\actions.py
U subversion\tests\cmdline\svntest\main.py
U subversion\tests\cmdline\svntest\verify.py
U subversion\tests\cmdline\merge_tests.py
U subversion\tests\cmdline\getopt_tests.py
U subversion\tests\cmdline\checkout_tests.py
U subversion\svn_private_config.hw
U subversion\libsvn_ra_svn\cyrus_auth.c
U subversion\libsvn_ra_svn\internal_auth.c
U subversion\libsvn_ra_svn\ra_svn.h
U subversion\svn\cl.h
U subversion\svn\move-cmd.c
U subversion\svn\mkdir-cmd.c
U subversion\svn\diff-cmd.c
U subversion\svn\copy-cmd.c
U subversion\svn\util.c
U subversion\svn\status.c
U subversion\svn\commit-cmd.c
U subversion\svn\delete-cmd.c
U subversion\svn\notify.c
U subversion\svn\import-cmd.c
U subversion\svn\schema\status.rnc
U subversion\svn\schema\info.rnc
U subversion\svn\tree-conflicts.c
U subversion\svn\main.c
U subversion\svn\propedit-cmd.c
U subversion\svn\info-cmd.c
U subversion\po\fr.po
U subversion\po\de.po
U subversion\po\pl.po
U subversion\libsvn_fs_base\tree.c
U subversion\libsvn_fs_base\reps-strings.c
U subversion\libsvn_fs_base\dag.h
U subversion\libsvn_fs_base\tree.h
U subversion\libsvn_fs_base\key-gen.h
U subversion\libsvn_fs_base\bdb\dbt.c
U subversion\libsvn_fs_base\bdb\dbt.h
A subversion\libsvn_fs_base\bdb\miscellaneous-table.c
A subversion\libsvn_fs_base\bdb\miscellaneous-table.h
A subversion\libsvn_fs_base\bdb\checksum-reps-table.c
A subversion\libsvn_fs_base\bdb\checksum-reps-table.h
D subversion\libsvn_fs_base\bdb\metadata-table.h
D subversion\libsvn_fs_base\bdb\metadata-table.c
U subversion\libsvn_fs_base\notes\structure
U subversion\libsvn_fs_base\fs.c
U subversion\libsvn_fs_base\fs.h
A subversion\libsvn_fs_base\fsguid.c
A subversion\libsvn_fs_base\fsguid.h
U subversion\libsvn_fs_base\err.c
U subversion\libsvn_fs_base\dag.c
U subversion\libsvn_fs_base\util\fs_skels.c
U subversion\libsvn_fs_base\err.h
U subversion\libsvn_wc\revision_status.c
U subversion\libsvn_wc\props.c
U subversion\libsvn_wc\props.h
U subversion\libsvn_wc\util.c
U subversion\libsvn_wc\adm_ops.c
U subversion\libsvn_wc\status.c
U subversion\libsvn_wc\adm_files.c
U subversion\libsvn_wc\wc-metadata.sql3
U subversion\libsvn_wc\update_editor.c
U subversion\libsvn_wc\adm_files.h
U subversion\libsvn_wc\lock.c
U subversion\libsvn_wc\questions.c
U subversion\libsvn_wc\lock.h
U subversion\libsvn_wc\translate.c
U subversion\libsvn_wc\merge.c
U subversion\libsvn_wc\tree_conflicts.c
U subversion\libsvn_wc\tree_conflicts.h
U subversion\libsvn_wc\entries.c
U subversion\libsvn_wc\copy.c
U subversion\libsvn_wc\adm_crawler.c
U subversion\libsvn_wc\log.c
U subversion\libsvn_wc\log.h
U subversion\libsvn_client\relocate.c
U subversion\libsvn_client\switch.c
U subversion\libsvn_client\delete.c
U subversion\libsvn_client\externals.c
U subversion\libsvn_client\util.c
U subversion\libsvn_client\revisions.c
U subversion\libsvn_client\export.c
U subversion\libsvn_client\status.c
U subversion\libsvn_client\info.c
U subversion\libsvn_client\merge.c
U subversion\libsvn_client\prop_commands.c
U subversion\libsvn_client\url.c
U subversion\libsvn_client\ra.c
U subversion\libsvn_client\checkout.c
U subversion\libsvn_client\cat.c
U subversion\libsvn_client\locking_commands.c
U subversion\libsvn_client\revert.c
U subversion\libsvn_client\diff.c
U subversion\libsvn_client\copy.c
U subversion\libsvn_client\mergeinfo.c
U subversion\libsvn_client\changelist.c
U subversion\libsvn_client\log.c
U subversion\libsvn_client\update.c
U subversion\libsvn_client\resolved.c
U subversion\libsvn_client\commit_util.c
U subversion\libsvn_client\cleanup.c
U subversion\libsvn_client\add.c
U subversion\libsvn_client\commit.c
U subversion\svnlook\main.c
U subversion\libsvn_ra_serf\merge.c
U subversion\libsvn_ra_serf\xml.c
U subversion\libsvn_ra_serf\getlocks.c
U subversion\libsvn_ra_serf\locks.c
U subversion\libsvn_ra_serf\mergeinfo.c
U subversion\libsvn_ra_serf\util.c
U subversion\libsvn_ra_serf\getdate.c
U subversion\libsvn_ra_serf\getlocationsegments.c
U subversion\libsvn_ra_serf\blame.c
U subversion\libsvn_ra_serf\log.c
U subversion\libsvn_ra_serf\update.c
U subversion\libsvn_ra_serf\ra_serf.h
U subversion\libsvn_ra_serf\commit.c
U subversion\libsvn_ra_serf\options.c
U subversion\libsvn_ra_serf\getlocations.c
U subversion\libsvn_ra_serf\replay.c
U subversion\libsvn_repos\log.c
U subversion\libsvn_repos\dump.c
U subversion\libsvn_delta\text_delta.c
U subversion\svnserve\main.c
U subversion\libsvn_fs_fs\tree.c
U subversion\libsvn_fs_fs\dag.h
U subversion\libsvn_fs_fs\fs_fs.c
U subversion\libsvn_fs_fs\fs_fs.h
U subversion\libsvn_fs_fs\fs.h
A subversion\libsvn_fs_fs\rep-cache.c
U subversion\libsvn_fs_fs\caching.c
A subversion\libsvn_fs_fs\rep-cache.h

Summary of conflicts:
  Text conflicts: 1

Notice these deletions above:

  --- Merging r33493 through r33900 into 'subversion':
  D subversion\libsvn_fs_base\bdb\metadata-table.h
  D subversion\libsvn_fs_base\bdb\metadata-table.c

But when we look at the working copy these paths are still present!

>svn st -v subversion\libsvn_fs_base\bdb\metadata-table.*
               34046 33493 hwright
subversion\libsvn_fs_base\bdb\metadata-table.c
               34046 33493 hwright
subversion\libsvn_fs_base\bdb\metadata-table.h

Sidebar: It's probably relevant that
'subversion\libsvn_fs_base\bdb\metadata-table.h' and
'subversion\libsvn_fs_basebdb\metadata-table.c' both came into
existence in r33274, after the start of the editor drive at r33022 (?)

This problem can be fixed naively by performing multiple editor
drives, in the previous example we'd need to merge:

merge http://svn.collab.net/repos/svn/trunk/subversion@33022 through
http://svn.collab.net/repos/svn/trunk/subversion@33492

and then

merge http://svn.collab.net/repos/svn/trunk/subversion@33492 through
http://svn.collab.net/repos/svn/trunk/subversion@33900

But that just avoids what looks like a bug in the editor...Anyhow, I'm
trying to figure out what is wrong on the editor side, but in the
meantime can anyone confirm that this *should* work or is this a known
limitation of the editor?

Slowly going insane,

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-07 19:49:45 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.