You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <ch...@gmail.com> on 2005/08/26 13:37:26 UTC

svn URL PATH wc replacements questions

Hi, Erik and devs!
I'm working on wc-replacements branch. As my next step I try implement
svn URL PATH replacements. And I don't know how implemented this
properly. At this stage I made this in folowing way (check attached
patch):
[[
* subversion/libsvn_client/copy.c:
  (repos_to_wc_copy): Allow replacing deleted files.
* subversion/libsvn_wc/update_editor.c
  (install_file): Update revision field only if new_revision != 0.
* subversion/tests/clients/cmdline/copy_tests.py:
  (repos_to_wc_copy_replacement): New test for repos to wc replacements.
  (repos_to_wc): Modify expected revision after copy.
]]

As you see questionable hack occur in function install_file(). But it
works and passes all tests. Although I don't know when revision field
in entries file should be present.
Also it seems that my patch fixes bug
http://subversion.tigris.org/issues/show_bug.cgi?id=2144

Reverting repos-to-wc replacements didn't implemented yet.

-- 
Ivan Zhakov

Re: svn URL PATH wc replacements questions

Posted by Ivan Zhakov <ch...@gmail.com>.
On 8/27/05, Erik Huelsmann <eh...@gmail.com> wrote:
> Hi Ivan!
> > I'm working on wc-replacements branch. As my next step I try implement
> > svn URL PATH replacements. And I don't know how implemented this
> > properly.
> 
> Neither did I, but your patch is a good start...
> 
> [snip log]
> 
> > As you see questionable hack occur in function install_file(). But it
> > works and passes all tests.
> 
> I noticed that, but, yes it's a horrible hack and actually incorrect ...

 
> > Although I don't know when revision field
> > in entries file should be present.
> 
> ... which I found out after researching what the revision field means
> and when it should be there. This is what I found out (partly by
> reading http://svn.collab.net/repos/svn/trunk/subversion/libsvn_wc/README):
It is what I looking for. But for some reason I have looked it in /notes. 
 
> - The revision field is either present
> - or implied by the parent
> 
> The revision field contains the revision of the text-base associated
> with the file in the .svn area. This means that your patch - changing
> the revision number - can't be correct: it changes the revision of the
> text-base without changing the text-base itself.
> 
> But there's hope: I also figured out it's (with our wc-replacements
> work) no longer valid to require install file have revision == 0 when
> copyfrom_url.
> 
> I have attached my patch to this mail, both for you and other reviewers.
> 
> > Also it seems that my patch fixes bug
> > http://subversion.tigris.org/issues/show_bug.cgi?id=2144
> >
> > Reverting repos-to-wc replacements didn't implemented yet.
> 
> That's correct. And because this bug messes up working copies, I'm now
> helping you implement wc-replacements. As soon as our work is done, so
> is 2144. 
Working copy library really mess. Thank you for investigation and
fixing my patch.

> Log:
> [[[
> Implement repos->wc copy-replacements.
> 
> * subversion/libsvn_wc/update_editor.c (install_file): Remove the requirement
>   of new_revision to be 0 when copyfrom_url != NULL as existing entries
>   (and thus revision != 0) can be replaced.
>   (svn_wc_add_repos_file): Pass revision number of existing entry - if one
>   exists - to install_file.
> 
> * subversion/libsvn_client/copy.c (repos_to_wc_copy): Allow replacement
>   of deleted files.
> 
> * subversion/tests/clients/cmdline/copy_tests.py:
>  (repos_to_wc_copy_replacement): New test for repos to wc replacements.
>  (repos_to_wc): Modify expected revision after copy.
> 
> ]]]
> 
> PS: As you see, I didn't modify the tests.
> 
No, as I see in your patch your modified tests too:

Index: subversion/tests/clients/cmdline/copy_tests.py
===================================================================
--- subversion/tests/clients/cmdline/copy_tests.py	(revision 15904)
+++ subversion/tests/clients/cmdline/copy_tests.py	(working copy)
@@ -905,7 +905,7 @@
 
   expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_output.add({
-    'pi' : Item(status='A ',  wc_rev='0'),
+    'pi' : Item(status='A ',  wc_rev='1'),
     })
   svntest.actions.run_and_verify_status (wc_dir, expected_output)
 
-- 
Ivan Zhakov

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


Re: [PATCH] svn URL PATH wc replacements questions (v2)

Posted by Erik Huelsmann <eh...@gmail.com>.
> Erik,
> It seems patch works very well and nobody comment it. May be you
> commit this patch to wc-replacements branch?

r16069.


bye,


Erik.

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


Re: [PATCH] svn URL PATH wc replacements questions (v2)

Posted by Ivan Zhakov <ch...@gmail.com>.
On 8/27/05, Erik Huelsmann <eh...@gmail.com> wrote:
> With patch attached this time...
> 
> On 8/26/05, Erik Huelsmann <eh...@gmail.com> wrote:
> > Hi Ivan!
> >
> > > I'm working on wc-replacements branch. As my next step I try implement
> > > svn URL PATH replacements. And I don't know how implemented this
> > > properly.
> >
> > Neither did I, but your patch is a good start...
> >
> > [snip log]
> >
> > > As you see questionable hack occur in function install_file(). But it
> > > works and passes all tests.
> >
> > I noticed that, but, yes it's a horrible hack and actually incorrect ...
> >
> > > Although I don't know when revision field
> > > in entries file should be present.
> >
> > ... which I found out after researching what the revision field means
> > and when it should be there. This is what I found out (partly by
> > reading http://svn.collab.net/repos/svn/trunk/subversion/libsvn_wc/README):
> >
> > - The revision field is either present
> > - or implied by the parent
> >
> > The revision field contains the revision of the text-base associated
> > with the file in the .svn area. This means that your patch - changing
> > the revision number - can't be correct: it changes the revision of the
> > text-base without changing the text-base itself.
> >
> > But there's hope: I also figured out it's (with our wc-replacements
> > work) no longer valid to require install file have revision == 0 when
> > copyfrom_url.
> >
> > I have attached my patch to this mail, both for you and other reviewers.
> >
> > > Also it seems that my patch fixes bug
> > > http://subversion.tigris.org/issues/show_bug.cgi?id=2144
> > >
> > > Reverting repos-to-wc replacements didn't implemented yet.
> >
> > That's correct. And because this bug messes up working copies, I'm now
> > helping you implement wc-replacements. As soon as our work is done, so
> > is 2144.
> >
> >
> > bye,
> >
> > Erik.
> >
> > Log:
> > [[[
> > Implement repos->wc copy-replacements.
> >
> > * subversion/libsvn_wc/update_editor.c (install_file): Remove the requirement
> >   of new_revision to be 0 when copyfrom_url != NULL as existing entries
> >   (and thus revision != 0) can be replaced.
> >   (svn_wc_add_repos_file): Pass revision number of existing entry - if one
> >   exists - to install_file.
> >
> > * subversion/libsvn_client/copy.c (repos_to_wc_copy): Allow replacement
> >   of deleted files.
> >
> > * subversion/tests/clients/cmdline/copy_tests.py:
> >  (repos_to_wc_copy_replacement): New test for repos to wc replacements.
> >  (repos_to_wc): Modify expected revision after copy.
> >
> > ]]]
> >
> >
> > PS: As you see, I didn't modify the tests.
> >
Erik,
It seems patch works very well and nobody comment it. May be you
commit this patch to wc-replacements branch?


-- 
Ivan Zhakov

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


[PATCH] svn URL PATH wc replacements questions (v2)

Posted by Erik Huelsmann <eh...@gmail.com>.
With patch attached this time...

On 8/26/05, Erik Huelsmann <eh...@gmail.com> wrote:
> Hi Ivan!
> 
> > I'm working on wc-replacements branch. As my next step I try implement
> > svn URL PATH replacements. And I don't know how implemented this
> > properly.
> 
> Neither did I, but your patch is a good start...
> 
> [snip log]
> 
> > As you see questionable hack occur in function install_file(). But it
> > works and passes all tests.
> 
> I noticed that, but, yes it's a horrible hack and actually incorrect ...
> 
> > Although I don't know when revision field
> > in entries file should be present.
> 
> ... which I found out after researching what the revision field means
> and when it should be there. This is what I found out (partly by
> reading http://svn.collab.net/repos/svn/trunk/subversion/libsvn_wc/README):
> 
> - The revision field is either present
> - or implied by the parent
> 
> The revision field contains the revision of the text-base associated
> with the file in the .svn area. This means that your patch - changing
> the revision number - can't be correct: it changes the revision of the
> text-base without changing the text-base itself.
> 
> But there's hope: I also figured out it's (with our wc-replacements
> work) no longer valid to require install file have revision == 0 when
> copyfrom_url.
> 
> I have attached my patch to this mail, both for you and other reviewers.
> 
> > Also it seems that my patch fixes bug
> > http://subversion.tigris.org/issues/show_bug.cgi?id=2144
> >
> > Reverting repos-to-wc replacements didn't implemented yet.
> 
> That's correct. And because this bug messes up working copies, I'm now
> helping you implement wc-replacements. As soon as our work is done, so
> is 2144.
> 
> 
> bye,
> 
> Erik.
> 
> Log:
> [[[
> Implement repos->wc copy-replacements.
> 
> * subversion/libsvn_wc/update_editor.c (install_file): Remove the requirement
>   of new_revision to be 0 when copyfrom_url != NULL as existing entries
>   (and thus revision != 0) can be replaced.
>   (svn_wc_add_repos_file): Pass revision number of existing entry - if one
>   exists - to install_file.
> 
> * subversion/libsvn_client/copy.c (repos_to_wc_copy): Allow replacement
>   of deleted files.
> 
> * subversion/tests/clients/cmdline/copy_tests.py:
>  (repos_to_wc_copy_replacement): New test for repos to wc replacements.
>  (repos_to_wc): Modify expected revision after copy.
> 
> ]]]
> 
> 
> PS: As you see, I didn't modify the tests.
>

Re: svn URL PATH wc replacements questions

Posted by Erik Huelsmann <eh...@gmail.com>.
Hi Ivan!

> I'm working on wc-replacements branch. As my next step I try implement
> svn URL PATH replacements. And I don't know how implemented this
> properly.

Neither did I, but your patch is a good start...

[snip log]

> As you see questionable hack occur in function install_file(). But it
> works and passes all tests.

I noticed that, but, yes it's a horrible hack and actually incorrect ...

> Although I don't know when revision field
> in entries file should be present.

... which I found out after researching what the revision field means
and when it should be there. This is what I found out (partly by
reading http://svn.collab.net/repos/svn/trunk/subversion/libsvn_wc/README):

- The revision field is either present
- or implied by the parent

The revision field contains the revision of the text-base associated
with the file in the .svn area. This means that your patch - changing
the revision number - can't be correct: it changes the revision of the
text-base without changing the text-base itself.

But there's hope: I also figured out it's (with our wc-replacements
work) no longer valid to require install file have revision == 0 when
copyfrom_url.

I have attached my patch to this mail, both for you and other reviewers.

> Also it seems that my patch fixes bug
> http://subversion.tigris.org/issues/show_bug.cgi?id=2144
> 
> Reverting repos-to-wc replacements didn't implemented yet.

That's correct. And because this bug messes up working copies, I'm now
helping you implement wc-replacements. As soon as our work is done, so
is 2144.


bye,

Erik.

Log:
[[[
Implement repos->wc copy-replacements.

* subversion/libsvn_wc/update_editor.c (install_file): Remove the requirement
  of new_revision to be 0 when copyfrom_url != NULL as existing entries
  (and thus revision != 0) can be replaced.
  (svn_wc_add_repos_file): Pass revision number of existing entry - if one
  exists - to install_file.

* subversion/libsvn_client/copy.c (repos_to_wc_copy): Allow replacement
  of deleted files.

* subversion/tests/clients/cmdline/copy_tests.py:
 (repos_to_wc_copy_replacement): New test for repos to wc replacements.
 (repos_to_wc): Modify expected revision after copy.

]]]


PS: As you see, I didn't modify the tests.

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