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

Re: svn merge revert commit adds files to the repo that are missing in the wc - issue #1962

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 22 Sep 2008 20:51:49 +0100

On Fri, 2008-09-19 at 11:52 +0200, Jojakim Stahl wrote:
> I'm no expert in writing Subversion tests and didn't it ever, but sometime
> is first time, so attached you will find a patch for merge_tests.py.
> Hope this helps,

Thank you, Jojakim. This does help. I wrote the following log message
for it:
[[[
Add a test for a bug in which a schedule-add directory tree created by a
merge is different from that created by a copy, and is broken with
respect
to reverting. See
<http://subversion.tigris.org/issues/show_bug.cgi?id=1962>
and <http://svn.haxx.se/dev/archive-2008-09/0709.shtml>.

Patch by: Jojakim Stahl <joja.lists_at_jojakim.de>

* subversion/tests/cmdline/merge_tests.py
  (dont_add_reverted_file): New test function.
  (test_list): Add the new test, as XFail.
]]]

However, I have not yet committed this.

I examined your test and issue #1962 "merge of non-empty subdir
committed incorrectly"
<http://subversion.tigris.org/issues/show_bug.cgi?id=1962>.

A directory scheduled for add by "svn copy" has the top dir marked as "A
+" and all the rest marked just as " +". Reverting a file within such a
directory reverts the file to how it was in the source of the copy, and
committing works as expected.

A directory scheduled for add by "svn merge" has the top dir marked as
"A+" and all the rest marked as "A+" as well. Reverting a file within
such a directory reverts the file to "unversioned" as shown by "svn
status", but the file is committed by "svn commit". This is very wrong.

Issue #1962 says that "svn merge" is wrong in scheduling all the files
for addition in the first place. It should behave like "svn copy". So,
in your situation, it is the behaviour of "revert" and "status" that is
wrong, not "commit".

When you have time, would you mind modifing your test to check that the
merge and revert and status and commit all behave the same as if the
original merge had been a copy? That is:

  * "svn merge" should output just one line: "A parent_dir".

  * "svn status" should show just one line: "A+ parent_dir".

  * "svn revert" should returns the file to its copy-source state, or do
nothing if it was not modified since the merge.

  * "svn commit" should commit it.

Any or all of these checks would be useful.

Thank you.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-22 21:52:08 CEST

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.