You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mike Javorski <mj...@spokesoftware.com> on 2004/02/11 00:45:47 UTC

RE: RE: "not under version control" error - continued

Any news on this issue? There has been another occurrence of this merge bug reported by Adam Lackorzynski in the dev list (http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=56106)

I am starting to get a bit concerned here.. Merge is a core function for any version control system; if the problem stems from something deeper this could be an even bigger issue, and 1.0 is suppposed to be just around the corner.. 

I have several people that want to start using our repository and I can't safely let them do that at the moment if their data is being corrupted (possibly)..

I would really appreciate any help you all can give.. Please let me know if there is any further details that would help to diagnose the problem. 

Thanks,

- Mike


-----Original Message-----
From: Mike Javorski 
Sent: Wednesday, February 04, 2004 3:05 PM
To: users@subversion.tigris.org
Subject: RE: "not under version control" error - continued


Anyone have any ideas? Need more info? 

Anyone.... Anyone.... Bueller..... :-D

- Mike

-----Original Message-----
From: Francois Beausoleil [mailto:fbos@users.sourceforge.net] 
Sent: Monday, February 02, 2004 3:48 PM
To: Mike Javorski; users@subversion.tigris.org
Subject: Re: "not under version control" error - continued



On Mon, 2 Feb 2004 15:12:49 -0800, "Mike Javorski" <mj...@spokesoftware.com> said: [snip]
> Now it looks like this may not be a unique issue.. I say that because
> Francois Beausoleil [fbos@users.sourceforge.net] posted to the user 
> list

The thread in question is here: http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=5435

> today that he was having a similar inconsistency between merges with
> "--dry-run" and without. His seemed to be merging correctly without 
> the "--dry-run"; though I suspect if he commits a few more items 
> (directories esp.) it will become as bad as mine. (as everything new 
> that I add seems to be showing this problem).
> 
[snip]

I do have a reproduction recipe, so it seems this bug is not related to content.  Although it seems to be triggered by binary items (non text/* svn:mime-type).

I also reported another issue with --dry-run a long time ago: http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=294631

That thread basically said that --dry-run reported an error message that an added file did not exist, instead of simply saying "A  file".

Bye !
François
Developer of Java Gui Builder
http://jgb.sourceforge.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: "not under version control" error - continued

Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:

> Ah, sure, that was my first instinct.  It fixes the problem and passes
> all regression tests.   But the access-baton isn't being examined at all
> anymore...does this change somehow undo some other logic that was going
> on here?

I think it's stuff I wrote, but I can't remember why I chose to use
access_baton rather than b->added, using added looks sensible.

Incidentally, your new regression test doesn't need to call
run_and_verify_merge twice, just set the dry_run argument (the one
after the check_props argument) and the one call to
run_and_verify_merge will do both merges.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "not under version control" error - continued

Posted by Ben Collins-Sussman <su...@collab.net>.
On Wed, 2004-02-11 at 14:42, Philip Martin wrote:

> How about
> 
>   if (b->propchanges->nelts > 0 && (! (eb->dry_run && b->added)))
> 

Ah, sure, that was my first instinct.  It fixes the problem and passes
all regression tests.   But the access-baton isn't being examined at all
anymore...does this change somehow undo some other logic that was going
on here?  The comment confused me.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "not under version control" error - continued

Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:

>   /* Don't do the props_changed stuff if this is a dry_run and we don't
>      have an access baton, since in that case the file will already have
>      been recognised as added, in which case they cannot conflict. A

The problem case is "dry run and added", and in this case the
props_changed stuff should be avoided.

>      similar argument applies to directories in close_directory. */
>   if (b->propchanges->nelts > 0 && (! eb->dry_run || adm_access))
>     {
>       SVN_ERR (eb->diff_callbacks->props_changed
>                (adm_access, &prop_state,
>                 b->wcpath,
>                 b->propchanges, b->pristine_props,
>                 b->edit_baton->diff_cmd_baton));
>     }
>
> I made a tiny patch to this condition:
>
> -  if (b->propchanges->nelts > 0 && (! eb->dry_run || adm_access))
> +  if (b->propchanges->nelts > 0 && (! eb->dry_run) && adm_access)
>
> ...and it fixes the problem, but causes merge_test #4 to fail.  What's
> the correct logic here?  Philip?  Anyone?

How about

  if (b->propchanges->nelts > 0 && (! (eb->dry_run && b->added)))


-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "not under version control" error - continued

Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:

>   /* Don't do the props_changed stuff if this is a dry_run and we don't
>      have an access baton, since in that case the file will already have
>      been recognised as added, in which case they cannot conflict. A

The problem case is "dry run and added", and in this case the
props_changed stuff should be avoided.

>      similar argument applies to directories in close_directory. */
>   if (b->propchanges->nelts > 0 && (! eb->dry_run || adm_access))
>     {
>       SVN_ERR (eb->diff_callbacks->props_changed
>                (adm_access, &prop_state,
>                 b->wcpath,
>                 b->propchanges, b->pristine_props,
>                 b->edit_baton->diff_cmd_baton));
>     }
>
> I made a tiny patch to this condition:
>
> -  if (b->propchanges->nelts > 0 && (! eb->dry_run || adm_access))
> +  if (b->propchanges->nelts > 0 && (! eb->dry_run) && adm_access)
>
> ...and it fixes the problem, but causes merge_test #4 to fail.  What's
> the correct logic here?  Philip?  Anyone?

How about

  if (b->propchanges->nelts > 0 && (! (eb->dry_run && b->added)))


-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "not under version control" error - continued

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-02-10 at 19:08, Philip Martin wrote:

> It's still a bug.  The dry-run merge doesn't handle properties on
> added files.  Is there an issue in the issue tracker?  If not, you
> should raise one.

I filed this bug as issue 1738 and committed an XFail regression test.  

In gdb, the immediate problem is obvious:  repos_diff.c calls the
props_changed callback, which is diff.c:merge_props_changed(), which
then calls svn_wc_merge_prop_diffs().  That last function tries to grab
an entry for (A)dded file, which doesn't exist, and throws the error.

I think the key to solving this problem is just not to invoke the
props_changed callback at all... that is, don't ever invoke it on a file
that is schedule-add when 'dry run' is active.

I think the code at repos_diff.c:811 is *trying* to avoid this
situation, but I don't quite understand the comment:


  /* Don't do the props_changed stuff if this is a dry_run and we don't
     have an access baton, since in that case the file will already have
     been recognised as added, in which case they cannot conflict. A
     similar argument applies to directories in close_directory. */
  if (b->propchanges->nelts > 0 && (! eb->dry_run || adm_access))
    {
      SVN_ERR (eb->diff_callbacks->props_changed
               (adm_access, &prop_state,
                b->wcpath,
                b->propchanges, b->pristine_props,
                b->edit_baton->diff_cmd_baton));
    }

I made a tiny patch to this condition:

-  if (b->propchanges->nelts > 0 && (! eb->dry_run || adm_access))
+  if (b->propchanges->nelts > 0 && (! eb->dry_run) && adm_access)

...and it fixes the problem, but causes merge_test #4 to fail.  What's
the correct logic here?  Philip?  Anyone?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "not under version control" error - continued

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-02-10 at 19:08, Philip Martin wrote:

> It's still a bug.  The dry-run merge doesn't handle properties on
> added files.  Is there an issue in the issue tracker?  If not, you
> should raise one.

I filed this bug as issue 1738 and committed an XFail regression test.  

In gdb, the immediate problem is obvious:  repos_diff.c calls the
props_changed callback, which is diff.c:merge_props_changed(), which
then calls svn_wc_merge_prop_diffs().  That last function tries to grab
an entry for (A)dded file, which doesn't exist, and throws the error.

I think the key to solving this problem is just not to invoke the
props_changed callback at all... that is, don't ever invoke it on a file
that is schedule-add when 'dry run' is active.

I think the code at repos_diff.c:811 is *trying* to avoid this
situation, but I don't quite understand the comment:


  /* Don't do the props_changed stuff if this is a dry_run and we don't
     have an access baton, since in that case the file will already have
     been recognised as added, in which case they cannot conflict. A
     similar argument applies to directories in close_directory. */
  if (b->propchanges->nelts > 0 && (! eb->dry_run || adm_access))
    {
      SVN_ERR (eb->diff_callbacks->props_changed
               (adm_access, &prop_state,
                b->wcpath,
                b->propchanges, b->pristine_props,
                b->edit_baton->diff_cmd_baton));
    }

I made a tiny patch to this condition:

-  if (b->propchanges->nelts > 0 && (! eb->dry_run || adm_access))
+  if (b->propchanges->nelts > 0 && (! eb->dry_run) && adm_access)

...and it fixes the problem, but causes merge_test #4 to fail.  What's
the correct logic here?  Philip?  Anyone?



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "not under version control" error - continued

Posted by Philip Martin <ph...@codematters.co.uk>.
"Mike Javorski" <mj...@spokesoftware.com> writes:

> Any news on this issue? There has been another occurrence of this
> merge bug reported by Adam Lackorzynski in the dev list
> (http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=56106)

It's still a bug.  The dry-run merge doesn't handle properties on
added files.  Is there an issue in the issue tracker?  If not, you
should raise one.

$ svnadmin create repo
$ svn co file://`pwd`/repo wc
$ svn mkdir wc/foo wc/bar
$ svn ci -m "" wc
$ touch wc/foo/zig
$ svn add wc/foo/zig
$ svn ps x x wc/foo/zig
$ svn ci -m "" wc
$ svn merge --dry-run -r1:head file://`pwd`/repo/foo wc/bar
../svn/subversion/clients/cmdline/delete-cmd.c:47: (apr_err=200005)
svn: Use --force to override this restriction
../svn/subversion/libsvn_wc/props.c:279: (apr_err=200005)
svn: 'wc/bar/zig' is not under version control
$ svn merge -r1:head file://`pwd`/repo/foo wc/bar
A  wc/bar/zig

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "not under version control" error - continued

Posted by Philip Martin <ph...@codematters.co.uk>.
"Mike Javorski" <mj...@spokesoftware.com> writes:

> Any news on this issue? There has been another occurrence of this
> merge bug reported by Adam Lackorzynski in the dev list
> (http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=56106)

It's still a bug.  The dry-run merge doesn't handle properties on
added files.  Is there an issue in the issue tracker?  If not, you
should raise one.

$ svnadmin create repo
$ svn co file://`pwd`/repo wc
$ svn mkdir wc/foo wc/bar
$ svn ci -m "" wc
$ touch wc/foo/zig
$ svn add wc/foo/zig
$ svn ps x x wc/foo/zig
$ svn ci -m "" wc
$ svn merge --dry-run -r1:head file://`pwd`/repo/foo wc/bar
../svn/subversion/clients/cmdline/delete-cmd.c:47: (apr_err=200005)
svn: Use --force to override this restriction
../svn/subversion/libsvn_wc/props.c:279: (apr_err=200005)
svn: 'wc/bar/zig' is not under version control
$ svn merge -r1:head file://`pwd`/repo/foo wc/bar
A  wc/bar/zig

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org