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

[PATCH] issue #3641: svnsync fails to mirror certain dir replaces

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 22 Jun 2010 20:50:33 +0300 (Jerusalem Daylight Time)

http://subversion.tigris.org/issues/show_bug.cgi?id=3641

Briefly, the issue is that when svnsync encounters the following history:
    ------------------------------------------------------------------------
    r5 | pm | 2010-05-18 17:53:46 +0100 (Tue, 18 May 2010)
    Changed paths:
       A /H (from /A:4)
       R /H/B (from /X:4)
    ------------------------------------------------------------------------
    r3 | pm | 2010-05-18 17:53:46 +0100 (Tue, 18 May 2010)
    Changed paths:
       A /A/B/C
    ------------------------------------------------------------------------
it looks for /H/B/C in the sync source when trying to replay r5.

I've attached a patch (with log msg) that seems to have some positive
effects: it causes the sync to pass (and properly add children of /X as
children of /H/B).

I'm asking for review for two reasons:

* authz. The whole function is authz-sensitive --- its goal is to
  represent a copy as an add. I think the patch is okay from this
  angle, but a second pair of eyes wouldn't hurt.

* assertions. The patch asserts that svn_fs_path_change2_t->copyfrom_known
  is TRUE. However, the FS API used --- svn_fs_paths_changed2() ---
  does not guarantee that copyfrom_known will in fact be TRUE, and
  I haven't found a different API that does promise to provide the
  copyfrom information. (I think the patch only needs this information
  for directory replaces.)

Testing, analysis, reviews are welcome.

Daniel

Received on 2010-06-22 19:50:23 CEST

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