You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jeremy Whitlock <jc...@gmail.com> on 2007/05/25 21:15:51 UTC

Issue 2784 Work In Progress Patch

Hi All,
    While working on issue 2784:

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

I have gotten to the second phase of my unit test only to run into something
weird.  When comparing the tree structures as part of an update, I get the
following:

=============================================================
Expected '__SVN_ROOT_NODE' and actual '__SVN_ROOT_NODE' are different!
=============================================================
EXPECTED NODE TO BE:
=============================================================
 * Node name:   __SVN_ROOT_NODE
    Path:       __SVN_ROOT_NODE
    Contents:   N/A (node is a directory)
    Properties: {}
    Attributes: {}
    Children:   1
=============================================================
ACTUAL NODE FOUND:
=============================================================
 * Node name:   __SVN_ROOT_NODE
    Path:       __SVN_ROOT_NODE
    Contents:   None
    Properties: {}
    Attributes: {}
    Children:   N/A (node is a file)
Unequal Types: one Node is a file, the other is a directory
EXCEPTION: SVNTreeUnequal
FAIL:  basic_tests.py 38: automatic conflict resolution

It doesn't make any sense as to why the root node of the actual tree, which
was just used in a test higher up the chain, is the problematic node.  I
have attached my work in progress patch to see if anyone else could help.
Please remember that this patch is incomplete.

Take care,

Jeremy

Re: Issue 2784 Work In Progress Patch

Posted by Karl Fogel <kf...@red-bean.com>.
"Jeremy Whitlock" <jc...@gmail.com> writes:
>    Will do.  When I attached the patch, it should had sent as an
> attachment.  I even used the .txt extension like David James mentioned
> before.  Next time I email the list, it will be in plain text.
> (Hopefully this one is Plain Text to show it can be done.)  ;)

I got your patch attached as 'text/plain', and had no trouble reading
it, FWIW.

-Karl

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

Re: Issue 2784 Work In Progress Patch

Posted by Jeremy Whitlock <jc...@gmail.com>.
Michael,
    Will do.  When I attached the patch, it should had sent as an
attachment.  I even used the .txt extension like David James mentioned
before.  Next time I email the list, it will be in plain text.
(Hopefully this one is Plain Text to show it can be done.)  ;)

Take care,

Jeremy

On 5/26/07, C. Michael Pilato <cm...@collab.net> wrote:
> Jeremy Whitlock wrote:
> > Hi All,
> >     Thanks for the tips.  Thanks to Paul, we got this resolved and my
> > tests are now working properly.
>
> Here's another tip, on the house:  instruct your mail program to send mails
> aimed at this list in text mode.  Code blocks and program output (which
> desperately want to be rendered in a monospaced font) are painful to read
> when in the bodies of HTML mails.
>
> --
> C. Michael Pilato <cm...@collab.net>
> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
>

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

Re: Issue 2784 Work In Progress Patch

Posted by "C. Michael Pilato" <cm...@collab.net>.
Jeremy Whitlock wrote:
> Hi All,
>     Thanks for the tips.  Thanks to Paul, we got this resolved and my
> tests are now working properly.

Here's another tip, on the house:  instruct your mail program to send mails
aimed at this list in text mode.  Code blocks and program output (which
desperately want to be rendered in a monospaced font) are painful to read
when in the bodies of HTML mails.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

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

Re: Issue 2784 Work In Progress Patch

Posted by Jeremy Whitlock <jc...@gmail.com>.
Hi All,
    Thanks for the tips.  Thanks to Paul, we got this resolved and my tests
are now working properly.

Take care,

Jeremy

On 5/25/07, Paul Burba <pb...@collab.net> wrote:
>
> > -----Original Message-----
> > From: Jeremy Whitlock [mailto:jcscoobyrs@gmail.com]
> > Sent: Friday, May 25, 2007 5:16 PM
> > To: Subversion-Dev
> > Subject: Issue 2784 Work In Progress Patch
> >
> > Hi All,
> >     While working on issue 2784:
> >
> > http://subversion.tigris.org/issues/show_bug.cgi?id=2784
> >
> > I have gotten to the second phase of my unit test only to run
> > into something weird.  When comparing the tree structures as
> > part of an update, I get the following:
> >
> > =============================================================
> > Expected '__SVN_ROOT_NODE' and actual '__SVN_ROOT_NODE' are different!
> > =============================================================
> > EXPECTED NODE TO BE:
> > =============================================================
> >  * Node name:   __SVN_ROOT_NODE
> >     Path:       __SVN_ROOT_NODE
> >     Contents:   N/A (node is a directory)
> >     Properties: {}
> >     Attributes: {}
> >     Children:   1
> > =============================================================
> > ACTUAL NODE FOUND:
> > =============================================================
> >  * Node name:   __SVN_ROOT_NODE
> >     Path:       __SVN_ROOT_NODE
> >     Contents:   None
> >     Properties: {}
> >     Attributes: {}
> >     Children:   N/A (node is a file)
> > Unequal Types: one Node is a file, the other is a directory
> > EXCEPTION: SVNTreeUnequal
> > FAIL:  basic_tests.py 38: automatic conflict resolution
> >
> > It doesn't make any sense as to why the root node of the
> > actual tree, which was just used in a test higher up the
> > chain, is the problematic node.  I have attached my work in
> > progress patch to see if anyone else could help.  Please
> > remember that this patch is incomplete.
> >
> > Take care,
> >
> > Jeremy
>
> Jeremy and I went over this on IRC, comments in-line below:
>
> > Index: subversion/tests/cmdline/basic_tests.py
> > ===================================================================
> > --- subversion/tests/cmdline/basic_tests.py   (revision 25134)
> > +++ subversion/tests/cmdline/basic_tests.py   (working copy)
> > @@ -1935,8 +1935,164 @@
> >                                          expected_output,
> >                                          expected_disk,
> >                                          expected_status)
> > +
> > +#------------------------------------------------------------
> > ----------
> >
> > +def automatic_conflict_resolution(sbox):
> > +  "automatic conflict resolution"
> >
> > +  sbox.build()
> > +  wc_dir = sbox.wc_dir
> > +
> > +  # Make a backup copy of the working copy  wc_backup =
> > + sbox.add_wc_path('backup')  svntest.actions.duplicate_dir(wc_dir,
> > + wc_backup)
> > +
> > +  # Make a couple of local mods to files which will be committed
> > + mu_path = os.path.join(wc_dir, 'A', 'mu')  lambda_path =
> > + os.path.join(wc_dir, 'A', 'B', 'lambda')  rho_path =
> > + os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
> > + svntest.main.file_append(mu_path, 'Original appended text
> > for mu\n')
> > + svntest.main.file_append(lambda_path, 'Original appended text for
> > + lambda\n')  svntest.main.file_append(rho_path, 'Original
> > appended text
> > + for rho\n')
> > +
> > +  # Make a couple of local mods to files which will be conflicted
> > + mu_path_backup = os.path.join(wc_backup, 'A', 'mu')
> > + lambda_path_backup = os.path.join(wc_backup, 'A', 'B', 'lambda')
> > + rho_path_backup = os.path.join(wc_backup, 'A', 'D', 'G', 'rho')
> > + svntest.main.file_append(mu_path_backup,
> > +                             'Conflicting appended text for mu\n')
> > + svntest.main.file_append(lambda_path_backup,
> > +                             'Conflicting appended text for
> > lambda\n')
> > + svntest.main.file_append(rho_path_backup,
> > +                             'Conflicting appended text for rho\n')
> > +
> > +  # Created expected output tree for 'svn ci'
> > +  expected_output = wc.State(wc_dir, {
> > +    'A/mu' : Item(verb='Sending'),
> > +    'A/B/lambda' : Item(verb='Sending'),
> > +    'A/D/G/rho' : Item(verb='Sending'),
> > +    })
> > +
> > +  # Create expected status tree; all local revisions should
> > be at 1,  #
> > + but lambda, mu and rho should be at revision 2.
> > +  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
> > + expected_status.tweak('A/mu', 'A/B/lambda', 'A/D/G/rho', wc_rev=2)
> > +
> > +  # Commit.
> > +  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
> > +                                        expected_status, None,
> > +                                        None, None, None,
> > None, wc_dir)
> > +
> > +  # Create expected output tree for an update of the wc_backup.
> > +  expected_output = wc.State(wc_backup, {
> > +    'A/mu' : Item(status='C '),
> > +    'A/B/lambda' : Item(status='C '),
> > +    'A/D/G/rho' : Item(status='C '),
> > +    })
>
> You assign a value to expected_output here...
>
> > +  # Create expected disk tree for the update.
> > +  expected_disk = svntest.main.greek_state.copy()
> > +  expected_disk.tweak('A/mu', contents="""This is the file 'mu'.
> > +<<<<<<< .mine
> > +Conflicting appended text for mu
> > +=======
> > +Original appended text for mu
> > +>>>>>>> .r2
> > +""")
> > +  expected_disk.tweak('A/B/lambda', contents="""This is the
> > file 'lambda'.
> > +<<<<<<< .mine
> > +Conflicting appended text for lambda
> > +=======
> > +Original appended text for lambda
> > +>>>>>>> .r2
> > +""")
> > +  expected_disk.tweak('A/D/G/rho', contents="""This is the
> > file 'rho'.
> > +<<<<<<< .mine
> > +Conflicting appended text for rho
> > +=======
> > +Original appended text for rho
> > +>>>>>>> .r2
> > +""")
> > +
> > +  # Create expected status tree for the update.
> > +  expected_status =
> > svntest.actions.get_virginal_state(wc_backup, '2')
> > + expected_status.tweak('A/mu', 'A/B/lambda', 'A/D/G/rho',
> > status='C ')
> > +
> > +  # "Extra" files that we expect to result from the conflicts.
> > +  # These are expressed as list of regexps.  What a cool
> > system!  :-)
> > + extra_files = ['mu.*\.r1', 'mu.*\.r2', 'mu.*\.mine',
> > +                 'lambda.*\.r1', 'lambda.*\.r2', 'lambda.*\.mine',
> > +                 'rho.*\.r1', 'rho.*\.r2', 'rho.*\.mine',]
> > +
> > +  # Do the update and check the results in three ways.
> > +  # All "extra" files are passed to detect_conflict_files().
> > +  svntest.actions.run_and_verify_update(wc_backup,
> > +                                        expected_output,
> > +                                        expected_disk,
> > +                                        expected_status,
> > +                                        None,
>
> ...use it here, looks good...
>
> > svntest.tree.detect_conflict_files,
> > +                                        extra_files)
> > +
> > +  # verify that the extra_files list is now empty.
> > +  if len(extra_files) != 0:
> > +    # Because we want to be a well-behaved test, we silently raise if
> > +    # the test fails.  However, these two print statements would
> > +    # probably reveal the cause for the failure, if they were
> > +    # uncommented:
> > +    #
> > +    # print "Not all extra reject files have been accounted for:"
> > +    # print extra_files
> > +    ### we should raise a less generic error here. which?
> > +    raise svntest.Failure
> > +
> > +  # So now lambda, mu and rho are all in a "conflicted" state.  Run
> > + 'svn  # resolved' with the respective
> > "--accept[mine|orig|repo]" flag.
> > +
> > +  # Run 'svn resolved --accept=orig.  Using lambda for the test.
> > +  svntest.actions.run_and_verify_svn("Resolved command", None, [],
> > +                                     'resolved',
> > +                                     '--accept=orig',
> > +                                     lambda_path_backup)
> > +
> > +  # Run 'svn resolved --accept=mine.  Using mu for the test.
> > +  svntest.actions.run_and_verify_svn("Resolved command", None, [],
> > +                                     'resolved',
> > +                                     '--accept=mine',
> > +                                     mu_path_backup)
> > +
> > +  # Run 'svn resolved --accept=repo.  Using rho for the test.
> > +  svntest.actions.run_and_verify_svn("Resolved command", None, [],
> > +                                     'resolved',
> > +                                     '--accept=repo',
> > +                                     rho_path_backup)
> > +
> > +  # Set the expected disk contents for the test  expected_disk =
> > + svntest.main.greek_state.copy()
> > +
> > +  expected_disk.tweak('A/B/lambda', contents="This is the file
> > + 'lambda'.\n")  expected_disk.tweak('A/mu', contents="This
> > is the file 'mu'.\n"
> > +                      "Conflicting appended text for mu\n")
> > + expected_disk.tweak('A/D/G/rho', contents="This is the file
> > 'rho'.\n"
> > +                      "Original appended text for rho\n")
> > +
> > +  # Set the expected status for the test  expected_status =
> > + svntest.actions.get_virginal_state(wc_backup, '2')
> > +
> > +  expected_status.tweak('A/mu', status='M ')
> > + expected_status.tweak('A/B/lambda', status='M ')
> > + expected_status.tweak('A/D/G/rho', status='  ')
> > +
> > +  # Do the update and check the results in three ways.
> > +  svntest.actions.run_and_verify_update(wc_backup,
> > +                                        expected_output,
> > +                                        expected_disk,
> > +                                        expected_status)
>
> ...then use it here again.  But you don't expect any output since you
> already updated.  As you already know you can't pass "None" to
> run_and_verify_update().  Instead, redefine expected_out to expect
> nothing:
>
> expected_output = wc.State(wc_backup, {})
>
> The odd error you were getting is due to tree.build_tree_from_checkout()
> in actions.run_and_verify_update().  It tries to build a tree out of the
> non-existant output from the update and compare it to the
> expected_output tree you passed in.  Yes, the error message is less than
> worthless, but nobody has gotten around to fixing it yet.
>
> Paul B.
>

RE: Issue 2784 Work In Progress Patch

Posted by Paul Burba <pb...@collab.net>.
> -----Original Message-----
> From: Jeremy Whitlock [mailto:jcscoobyrs@gmail.com] 
> Sent: Friday, May 25, 2007 5:16 PM
> To: Subversion-Dev
> Subject: Issue 2784 Work In Progress Patch
> 
> Hi All,
>     While working on issue 2784:
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=2784
> 
> I have gotten to the second phase of my unit test only to run 
> into something weird.  When comparing the tree structures as 
> part of an update, I get the following: 
> 
> =============================================================
> Expected '__SVN_ROOT_NODE' and actual '__SVN_ROOT_NODE' are different!
> =============================================================
> EXPECTED NODE TO BE:
> =============================================================
>  * Node name:   __SVN_ROOT_NODE
>     Path:       __SVN_ROOT_NODE
>     Contents:   N/A (node is a directory)
>     Properties: {} 
>     Attributes: {}
>     Children:   1
> =============================================================
> ACTUAL NODE FOUND:
> =============================================================
>  * Node name:   __SVN_ROOT_NODE 
>     Path:       __SVN_ROOT_NODE
>     Contents:   None
>     Properties: {}
>     Attributes: {}
>     Children:   N/A (node is a file)
> Unequal Types: one Node is a file, the other is a directory
> EXCEPTION: SVNTreeUnequal
> FAIL:  basic_tests.py 38: automatic conflict resolution
> 
> It doesn't make any sense as to why the root node of the 
> actual tree, which was just used in a test higher up the 
> chain, is the problematic node.  I have attached my work in 
> progress patch to see if anyone else could help.  Please 
> remember that this patch is incomplete. 
> 
> Take care,
> 
> Jeremy

Jeremy and I went over this on IRC, comments in-line below:

> Index: subversion/tests/cmdline/basic_tests.py
> ===================================================================
> --- subversion/tests/cmdline/basic_tests.py	(revision 25134)
> +++ subversion/tests/cmdline/basic_tests.py	(working copy)
> @@ -1935,8 +1935,164 @@
>                                          expected_output,
>                                          expected_disk,
>                                          expected_status)
> +  
> +#------------------------------------------------------------
> ----------
>  
> +def automatic_conflict_resolution(sbox):
> +  "automatic conflict resolution"
>  
> +  sbox.build()
> +  wc_dir = sbox.wc_dir
> +
> +  # Make a backup copy of the working copy  wc_backup = 
> + sbox.add_wc_path('backup')  svntest.actions.duplicate_dir(wc_dir, 
> + wc_backup)
> +
> +  # Make a couple of local mods to files which will be committed  
> + mu_path = os.path.join(wc_dir, 'A', 'mu')  lambda_path = 
> + os.path.join(wc_dir, 'A', 'B', 'lambda')  rho_path = 
> + os.path.join(wc_dir, 'A', 'D', 'G', 'rho')  
> + svntest.main.file_append(mu_path, 'Original appended text 
> for mu\n')  
> + svntest.main.file_append(lambda_path, 'Original appended text for 
> + lambda\n')  svntest.main.file_append(rho_path, 'Original 
> appended text 
> + for rho\n')
> +
> +  # Make a couple of local mods to files which will be conflicted  
> + mu_path_backup = os.path.join(wc_backup, 'A', 'mu')  
> + lambda_path_backup = os.path.join(wc_backup, 'A', 'B', 'lambda')  
> + rho_path_backup = os.path.join(wc_backup, 'A', 'D', 'G', 'rho')  
> + svntest.main.file_append(mu_path_backup,
> +                             'Conflicting appended text for mu\n')  
> + svntest.main.file_append(lambda_path_backup,
> +                             'Conflicting appended text for 
> lambda\n')  
> + svntest.main.file_append(rho_path_backup,
> +                             'Conflicting appended text for rho\n')
> +
> +  # Created expected output tree for 'svn ci'
> +  expected_output = wc.State(wc_dir, {
> +    'A/mu' : Item(verb='Sending'),
> +    'A/B/lambda' : Item(verb='Sending'),
> +    'A/D/G/rho' : Item(verb='Sending'),
> +    })
> +
> +  # Create expected status tree; all local revisions should 
> be at 1,  # 
> + but lambda, mu and rho should be at revision 2.
> +  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)  
> + expected_status.tweak('A/mu', 'A/B/lambda', 'A/D/G/rho', wc_rev=2)
> +
> +  # Commit.
> +  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
> +                                        expected_status, None,
> +                                        None, None, None, 
> None, wc_dir)
> +
> +  # Create expected output tree for an update of the wc_backup.
> +  expected_output = wc.State(wc_backup, {
> +    'A/mu' : Item(status='C '),
> +    'A/B/lambda' : Item(status='C '),
> +    'A/D/G/rho' : Item(status='C '),
> +    })

You assign a value to expected_output here...

> +  # Create expected disk tree for the update.
> +  expected_disk = svntest.main.greek_state.copy()
> +  expected_disk.tweak('A/mu', contents="""This is the file 'mu'.
> +<<<<<<< .mine
> +Conflicting appended text for mu
> +=======
> +Original appended text for mu
> +>>>>>>> .r2
> +""")
> +  expected_disk.tweak('A/B/lambda', contents="""This is the 
> file 'lambda'.
> +<<<<<<< .mine
> +Conflicting appended text for lambda
> +=======
> +Original appended text for lambda
> +>>>>>>> .r2
> +""")
> +  expected_disk.tweak('A/D/G/rho', contents="""This is the 
> file 'rho'.
> +<<<<<<< .mine
> +Conflicting appended text for rho
> +=======
> +Original appended text for rho
> +>>>>>>> .r2
> +""")
> +
> +  # Create expected status tree for the update.
> +  expected_status = 
> svntest.actions.get_virginal_state(wc_backup, '2')  
> + expected_status.tweak('A/mu', 'A/B/lambda', 'A/D/G/rho', 
> status='C ')
> +
> +  # "Extra" files that we expect to result from the conflicts.
> +  # These are expressed as list of regexps.  What a cool 
> system!  :-)  
> + extra_files = ['mu.*\.r1', 'mu.*\.r2', 'mu.*\.mine',
> +                 'lambda.*\.r1', 'lambda.*\.r2', 'lambda.*\.mine',
> +                 'rho.*\.r1', 'rho.*\.r2', 'rho.*\.mine',]
> +  
> +  # Do the update and check the results in three ways.
> +  # All "extra" files are passed to detect_conflict_files().
> +  svntest.actions.run_and_verify_update(wc_backup,
> +                                        expected_output,
> +                                        expected_disk,
> +                                        expected_status,
> +                                        None,

...use it here, looks good...
                                      
> svntest.tree.detect_conflict_files,
> +                                        extra_files)
> +  
> +  # verify that the extra_files list is now empty.
> +  if len(extra_files) != 0:
> +    # Because we want to be a well-behaved test, we silently raise if
> +    # the test fails.  However, these two print statements would
> +    # probably reveal the cause for the failure, if they were
> +    # uncommented:
> +    #
> +    # print "Not all extra reject files have been accounted for:"
> +    # print extra_files
> +    ### we should raise a less generic error here. which?
> +    raise svntest.Failure
> +
> +  # So now lambda, mu and rho are all in a "conflicted" state.  Run 
> + 'svn  # resolved' with the respective 
> "--accept[mine|orig|repo]" flag.
> +
> +  # Run 'svn resolved --accept=orig.  Using lambda for the test.
> +  svntest.actions.run_and_verify_svn("Resolved command", None, [],
> +                                     'resolved',
> +                                     '--accept=orig',
> +                                     lambda_path_backup)
> +
> +  # Run 'svn resolved --accept=mine.  Using mu for the test.
> +  svntest.actions.run_and_verify_svn("Resolved command", None, [],
> +                                     'resolved',
> +                                     '--accept=mine',
> +                                     mu_path_backup)
> +
> +  # Run 'svn resolved --accept=repo.  Using rho for the test.
> +  svntest.actions.run_and_verify_svn("Resolved command", None, [],
> +                                     'resolved',
> +                                     '--accept=repo',
> +                                     rho_path_backup)
> +  
> +  # Set the expected disk contents for the test  expected_disk = 
> + svntest.main.greek_state.copy()
> +  
> +  expected_disk.tweak('A/B/lambda', contents="This is the file 
> + 'lambda'.\n")  expected_disk.tweak('A/mu', contents="This 
> is the file 'mu'.\n"
> +                      "Conflicting appended text for mu\n")  
> + expected_disk.tweak('A/D/G/rho', contents="This is the file 
> 'rho'.\n"
> +                      "Original appended text for rho\n")
> +
> +  # Set the expected status for the test  expected_status = 
> + svntest.actions.get_virginal_state(wc_backup, '2')
> +  
> +  expected_status.tweak('A/mu', status='M ')  
> + expected_status.tweak('A/B/lambda', status='M ')  
> + expected_status.tweak('A/D/G/rho', status='  ')
> +
> +  # Do the update and check the results in three ways.
> +  svntest.actions.run_and_verify_update(wc_backup,
> +                                        expected_output,
> +                                        expected_disk,
> +                                        expected_status)

...then use it here again.  But you don't expect any output since you
already updated.  As you already know you can't pass "None" to
run_and_verify_update().  Instead, redefine expected_out to expect
nothing:

expected_output = wc.State(wc_backup, {})

The odd error you were getting is due to tree.build_tree_from_checkout()
in actions.run_and_verify_update().  It tries to build a tree out of the
non-existant output from the update and compare it to the
expected_output tree you passed in.  Yes, the error message is less than
worthless, but nobody has gotten around to fixing it yet.

Paul B.

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


Re: Issue 2784 Work In Progress Patch

Posted by Jeremy Whitlock <jc...@gmail.com>.
Dave,
    Thanks for tackling this.  I've updated my current patch test to reflect.

Take care,

Jeremy

On 5/28/07, David Glasser <gl...@mit.edu> wrote:
> On 5/28/07, Karl Fogel <kf...@red-bean.com> wrote:
> > Karl Fogel <kf...@red-bean.com> writes:
> > > "David Glasser" <gl...@mit.edu> writes:
> > >> On 5/25/07, Jeremy Whitlock <jc...@gmail.com> wrote:
> > >>> +  # Create expected disk tree for the update.
> > >>> +  expected_disk = svntest.main.greek_state.copy()
> > >>> +  expected_disk.tweak('A/mu', contents="""This is the file 'mu'.
> > >>> +<<<<<<< .mine
> > >>> +Conflicting appended text for mu
> > >>> +=======
> > >>> +Original appended text for mu
> > >>> +>>>>>>> .r2
> > >>> +""")
> > >>
> > >> Hmm, you might want to avoid putting literal conflict markers into the
> > >> test; it could get confusing!
> > >>
> > >> Perhaps just use a series of "double-quoted"+"added together" strings
> > >> with proper indentation instead of triple-quoted strings?
> > >
> > > Really?  I have to admit, I find the one-big-string approach easier
> > > for blocks of text like that...
> > >
> > >    http://pink.bikeshed.com/
> >
> > Change of mind -- David clarified to me in IRC what he meant:
> >
> >   <glasser> kfogel: it's not triple-quoting in general that's confusing
> >   <glasser> it's tripple-quoting conflict markers in the first column!
> >
> >   <kfogel>  glasser: Oh, I see.
> >   <kfogel>  yes, I agree with you then, didn't think of that
> >   <kfogel>  I have an idea.
> >   <kfogel>  Let's you and me both go edit those files right now,
> >             simultaneously, and come up with slightly different
> >             solutions for how to rearrange the text, and then both
> >             commit around the same time, and see what happens.
> >
> >   <glasser> +1
>
> I changed all instances of conflict markers in column 0 in the tests
> to a more indented style in r25174.
>
> --dave
>
> --
> David Glasser | glasser@mit.edu | http://www.davidglasser.net/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

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

Re: Issue 2784 Work In Progress Patch

Posted by David Glasser <gl...@mit.edu>.
On 5/28/07, Karl Fogel <kf...@red-bean.com> wrote:
> Karl Fogel <kf...@red-bean.com> writes:
> > "David Glasser" <gl...@mit.edu> writes:
> >> On 5/25/07, Jeremy Whitlock <jc...@gmail.com> wrote:
> >>> +  # Create expected disk tree for the update.
> >>> +  expected_disk = svntest.main.greek_state.copy()
> >>> +  expected_disk.tweak('A/mu', contents="""This is the file 'mu'.
> >>> +<<<<<<< .mine
> >>> +Conflicting appended text for mu
> >>> +=======
> >>> +Original appended text for mu
> >>> +>>>>>>> .r2
> >>> +""")
> >>
> >> Hmm, you might want to avoid putting literal conflict markers into the
> >> test; it could get confusing!
> >>
> >> Perhaps just use a series of "double-quoted"+"added together" strings
> >> with proper indentation instead of triple-quoted strings?
> >
> > Really?  I have to admit, I find the one-big-string approach easier
> > for blocks of text like that...
> >
> >    http://pink.bikeshed.com/
>
> Change of mind -- David clarified to me in IRC what he meant:
>
>   <glasser> kfogel: it's not triple-quoting in general that's confusing
>   <glasser> it's tripple-quoting conflict markers in the first column!
>
>   <kfogel>  glasser: Oh, I see.
>   <kfogel>  yes, I agree with you then, didn't think of that
>   <kfogel>  I have an idea.
>   <kfogel>  Let's you and me both go edit those files right now,
>             simultaneously, and come up with slightly different
>             solutions for how to rearrange the text, and then both
>             commit around the same time, and see what happens.
>
>   <glasser> +1

I changed all instances of conflict markers in column 0 in the tests
to a more indented style in r25174.

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

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

Re: Issue 2784 Work In Progress Patch

Posted by Karl Fogel <kf...@red-bean.com>.
Karl Fogel <kf...@red-bean.com> writes:
> "David Glasser" <gl...@mit.edu> writes:
>> On 5/25/07, Jeremy Whitlock <jc...@gmail.com> wrote:
>>> +  # Create expected disk tree for the update.
>>> +  expected_disk = svntest.main.greek_state.copy()
>>> +  expected_disk.tweak('A/mu', contents="""This is the file 'mu'.
>>> +<<<<<<< .mine
>>> +Conflicting appended text for mu
>>> +=======
>>> +Original appended text for mu
>>> +>>>>>>> .r2
>>> +""")
>>
>> Hmm, you might want to avoid putting literal conflict markers into the
>> test; it could get confusing!
>>
>> Perhaps just use a series of "double-quoted"+"added together" strings
>> with proper indentation instead of triple-quoted strings?
>
> Really?  I have to admit, I find the one-big-string approach easier
> for blocks of text like that...
>
>    http://pink.bikeshed.com/

Change of mind -- David clarified to me in IRC what he meant:

  <glasser> kfogel: it's not triple-quoting in general that's confusing
  <glasser> it's tripple-quoting conflict markers in the first column!
  
  <kfogel>  glasser: Oh, I see.
  <kfogel>  yes, I agree with you then, didn't think of that
  <kfogel>  I have an idea.
  <kfogel>  Let's you and me both go edit those files right now,
            simultaneously, and come up with slightly different
            solutions for how to rearrange the text, and then both
            commit around the same time, and see what happens.
  
  <glasser> +1

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

Re: Issue 2784 Work In Progress Patch

Posted by Karl Fogel <kf...@red-bean.com>.
"David Glasser" <gl...@mit.edu> writes:
> On 5/25/07, Jeremy Whitlock <jc...@gmail.com> wrote:
>> +  # Create expected disk tree for the update.
>> +  expected_disk = svntest.main.greek_state.copy()
>> +  expected_disk.tweak('A/mu', contents="""This is the file 'mu'.
>> +<<<<<<< .mine
>> +Conflicting appended text for mu
>> +=======
>> +Original appended text for mu
>> +>>>>>>> .r2
>> +""")
>
> Hmm, you might want to avoid putting literal conflict markers into the
> test; it could get confusing!
>
> Perhaps just use a series of "double-quoted"+"added together" strings
> with proper indentation instead of triple-quoted strings?

Really?  I have to admit, I find the one-big-string approach easier
for blocks of text like that...

   http://pink.bikeshed.com/

:-)

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

Re: Issue 2784 Work In Progress Patch

Posted by David Glasser <gl...@mit.edu>.
On 5/25/07, Jeremy Whitlock <jc...@gmail.com> wrote:
> +  # Create expected disk tree for the update.
> +  expected_disk = svntest.main.greek_state.copy()
> +  expected_disk.tweak('A/mu', contents="""This is the file 'mu'.
> +<<<<<<< .mine
> +Conflicting appended text for mu
> +=======
> +Original appended text for mu
> +>>>>>>> .r2
> +""")

Hmm, you might want to avoid putting literal conflict markers into the
test; it could get confusing!

Perhaps just use a series of "double-quoted"+"added together" strings
with proper indentation instead of triple-quoted strings?

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

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

Re: Issue 2784 Work In Progress Patch

Posted by Karl Fogel <kf...@red-bean.com>.
"Jeremy Whitlock" <jc...@gmail.com> writes:
>     While working on issue 2784:
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=2784
>
> I have gotten to the second phase of my unit test only to run into something
> weird.  When comparing the tree structures as part of an update, I get the
> following:

Some of the error messages in the test suite, especially the ones
about tree differences, are notoriously opaque.  I'm not sure why it
has to be this way; no doubt improvement is possible, if only one of
us would Get Around To It.

In the meantime, don't spend a lot of time trying to interpret that
error message.  Instead, use manual investigation techniques to find
out if your test is doing what you expect.  (If it is, and you're
still getting this error message, then send a mail here detailing what
you expected and what you actually saw, and we'll figure it out.  By
"what you expected", I don't mean the output from the Python test, but
rather the behavior of the test on disk -- what it's actually doing.)

Given the incomplete state of the patch, probably the test should be
marked XFAIL right now, since it's still expected to fail.

Also, when you the "automatic_conflict_resolution" test to test_list
in the Python file, put a comma at the end, so the next person to add
a test after it doesn't make a syntax error :-).  In Python, the last
element in a list can have a comma after it, unlike in C.

Good luck,
-Karl

> =============================================================
> Expected '__SVN_ROOT_NODE' and actual '__SVN_ROOT_NODE' are different!
> =============================================================
> EXPECTED NODE TO BE:
> =============================================================
>  * Node name:   __SVN_ROOT_NODE
>     Path:       __SVN_ROOT_NODE
>     Contents:   N/A (node is a directory)
>     Properties: {}
>     Attributes: {}
>     Children:   1
> =============================================================
> ACTUAL NODE FOUND:
> =============================================================
>  * Node name:   __SVN_ROOT_NODE
>     Path:       __SVN_ROOT_NODE
>     Contents:   None
>     Properties: {}
>     Attributes: {}
>     Children:   N/A (node is a file)
> Unequal Types: one Node is a file, the other is a directory
> EXCEPTION: SVNTreeUnequal
> FAIL:  basic_tests.py 38: automatic conflict resolution
>
> It doesn't make any sense as to why the root node of the actual tree, which was
> just used in a test higher up the chain, is the problematic node.  I have
> attached my work in progress patch to see if anyone else could help.  Please
> remember that this patch is incomplete.
>
> Take care,
>
> Jeremy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

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