[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-06 19:19:50 CEST

On 9/6/05, Erik Huelsmann <e.huelsmann@gmx.net> wrote:
> > Hi, Erik and other devs!
> > Check attachement for my initial implementation of reverting props
> > after replace. For the time being it works only for repos-repos
> > copying. I dislike big patches, therefore I post it.
> > Also, I take liberties to improve some code to avoid duplications.
> > I have ugly modifed prop_path_internal, but didn't able invent anything
> > better.
>
> I needed to study the code to figure out what you patch was doing, so I
> didn't finish review today. I like what I saw though. I assume you ran
> tests and noticed not all of them passing? (At least they didn't on my
> system...)
It was a bug. Sorry.
 
> > [[
> > Initial implementation of reverting props after replace.
>
> If I am to commit this as a step towards prop-reverting with replacement,
> maybe you can state that it is partial, what it breaks and what you intend
> to do about it? Just so that if others see the branch, they can find out
> about its state from the logs.
I meant that patch fixes only part of replacements. Only repos-repos
copying. I'll adjust log message.
 
> > * subversion/libsvn_wc/adm_files.c:
> > (prop_path_internal): Add parameter revert. Return revert prop
> > filename if revert==TRUE.
>
> base, revert and wcprop have been assigned overlapping meanings, right: it's
> either base, revert or wcprop that can be TRUE, not all of them at once. If
> that's correct, then wouldn't an enum type make more sense?
Fixed. Thanks for ideas. Check attachment for fixed patch.

[[
Implementation of reverting props after repos to repos 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_thing): 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.
]]

> The following is the output from merge_tests.py (on the branch):
>
> FAIL: merge_tests.py 1: performing a merge, with mixed results
> FAIL: merge_tests.py 4: some simple property merges
> FAIL: merge_tests.py 11: merge one file (issue #1150)
> FAIL: merge_tests.py 22: property merges don't overwrite existing prop-mods
> FAIL: merge_tests.py 23: property merge conflict even without local mods
>
> Is that expected?
No, it was a bug. Now all tests should be passed.

-- 
Ivan Zhakov


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

Received on Tue Sep 6 19:20:50 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.