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

Re: [PATCH] wc-replacements branch: Initial implementation of reverting props after replace

From: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2005-09-07 12:30:07 CEST

On 9/7/05, Erik Huelsmann <ehuels@gmail.com> wrote:
> On 9/7/05, Ivan Zhakov <chemodax@gmail.com> wrote:
> > On 9/7/05, Erik Huelsmann <ehuels@gmail.com> wrote:
> > > > I meant that patch fixes only part of replacements. Only repos-repos
> > > > copying. I'll adjust log message.
> > >
> > > You mean wc->wc instead of repos->repos, I think?
> > Yes, of course wc->wc copies. Sorry.
> >
> > > > [[
> > > > Implementation of reverting props after repos to repos replacements.
> > >
> > > [snip]
> > >> * subversion/libsvn_wc/adm_ops.c:
> > >> (remove_revert_thing): New static helper for
> > > Can we call this remove_revertfile ? I think that's more descriptive :-)
> > Ok. I'll fix this.
> >
> > [snip]
> > > There is one bug, a few trailing spaces and 1 indenting problem I see
> > > in the patch. The bug is in remove_revert_thing:
> > >
> > > ======
> > > if (kind == svn_node_file)
> > > {
> > > svn_xml_make_open_tag (logtags, pool, svn_xml_self_closing,
> > > SVN_WC__LOG_RM,
> > > SVN_WC__LOG_ATTR_NAME, revert_file,
> > > NULL);
> > > }
> > > ======
> > >
> > > I think the condition above should be
> > >
> > > if (kind == svn_node_file || is_prop)
> > >
> > > since otherwise, you won't remove directory-property-revert-files.
> > I don't understand why this condition should include is_prop? In this
> > condition I check that revert file exists. It's necessary remove file
> > if it doesn't exists.
>
> Yes, you're right. I read over it. Sorry.
>
> In that case, I think the patch is correct and nicely cleans up
> prop_path_internal().
>
> I'll look into committing tonight.
Ok. I have fixed trailing spaces and indentations that I found. Also I
have renamed function remove_revert_thing to remove_revert_file and
fixed log message.

[[
Implementation of reverting props after wc to wc replacements.

* subversion/libsvn_wc/adm_files.c:
  (prop_path_kind_t): New enum for prop_path_internal().
  (prop_path_internal): Change two boolean parameters to prop_path_kind_t enum.
  Return revert prop filename if path_kind==prop_path_kind_revert.
  (svn_wc__prop_revert_path): New function that returns revert prop filename.
  (svn_wc__wcprop_path, svn_wc__prop_path, svn_wc__prop_base_path): Tweak to use
  new prop_path_internal() signature.

* subversion/libsvn_wc/adm_files.h:
  (svn_wc__prop_revert_path): New function declaration.

* subversion/libsvn_wc/adm_ops.c:
  (remove_revert_file): New static helper for svn_wc_process_committed2() that
  removes revert file after commit.
  (svn_wc_process_committed2): Remove prop revert file after commit.
  (revert_admin_things): Use revert prop file as prop base for reverting.

* subversion/libsvn_wc/copy.c:
  (copy_file_administratively): Move src_wprop, src_bprop, dst_wprop,
  dst_bprop variables to begin of function. Save prop base if we're
replacing file.

* subversion/libsvn_wc/wc.h:
  (SVN_WC__ADM_DIR_PROP_REVERT): New define for dir-prop revert filename.

* subversion/tests/clients/cmdline/revert_tests.py:
  (test_list): Remove XFail mark from
revert_replace_with_history_with_props test.
]]

Waiting for you commiting this and other patch (with new test case) to
be able continue coding. Thanks!

-- 
Ivan Zhakov


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

Received on Wed Sep 7 12:31:02 2005

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.