You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kannan <ka...@collab.net> on 2009/10/15 12:47:37 UTC

[PATCH] Restrict interactive callback for prop conflicts in `svn merge --dry-run'

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Log:
When in `--dry-run' mode of `svn merge' command, property conflicts make
an interactive callback to the user to resolve the conflicts, unlike the
text conflicts. The following patch restricts the interactive callback
in `--dry-run' mode.

* subversion/libsvn_wc/props.c
 (svn_wc__merge_props) : Pass `dry_run' parameter to the required
  methods.
 (apply_single_prop_add, apply_single_prop_delete,
  apply_single_prop_change, apply_single_generic_prop_change,
  apply_single_mergeinfo_prop_change) : Check for the `--dry-run' mode
  and set the boolean `got_conflict', instead of invoking the
  interactive callback.

Patch by : Kannan R <ka...@collab.net>


- --
Regards,
Kannan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBStcZ6XlTqcY7ytmIAQIF+ggAoI4hRMpzU6/SFOXLlt2GvfB41MCi17Zf
xRXBYvCWi9mEB/ojEmt0zX6vVl2jbC3stylzMf6JtTUneSebtZwaPcE+lgXjsni0
QtTXOQwHEqdTameaa2F9ShuNc1RVdtgLX5B3pj+/u9cHeZtLjjmbVBrpFiQiq1Fw
RJ5ua/nWo1aaT+Cp4kXA4MX340qOPQwRFfBM2UMcthUv2jzi3rYbZU7ek7+XV85E
PEIoHCrBVoSnfiIWOYq5O/R6LY1T4wXUKu03XdjBgz7ymCljyHBfsMkmgHUZiL8I
YuS/B0AEclW15nTZWk+Hfk7gxj+EKDdByIckfJwvtO7STYkG/zo/gA==
=Ssom
-----END PGP SIGNATURE-----

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407878

Re: [PATCH] [Modified]Restrict interactive callback for prop conflicts in `svn merge --dry-run'

Posted by Julian Foad <ju...@btopenworld.com>.
Kannan wrote:
> Julian Foad wrote:
> > Can I recommend passing the 'dry_run' flag through to
> > maybe_generate_propconflict(), and doing the "if (dry_run) then it's a
> > conflict" there in just one place. That will make it easier to extend
> > when we want to make it possible for the "accept=theirs" options to act
> > properly in dry-run mode.
> > 
> > - Julian
> 
> Log:
> When in `--dry-run' mode of `svn merge' command, property conflicts
> make an interactive callback to the user to resolve the conflicts,
> unlike the text conflicts. The following patch restricts the interactive
> callback in `--dry-run' mode.

s/restricts/suppresses/

+1 to this version of the patch. I'll commit it.

> * subversion/libsvn_wc/props.c
>   (svn_wc__merge_props) : Pass `dry_run' parameter to the required
>   methods.
>   (apply_single_prop_add, apply_single_prop_delete,
>   apply_single_prop_change, apply_single_generic_prop_change,
>   apply_single_mergeinfo_prop_change) : Pass `dry_run' to
>   `maybe_generate_propconflict'
>   (maybe_generate_propconflict) : Check for `--dry-run' mode and set the
>   boolean `conflict_remains', instead of invoking the interactive
>   callback.
> 
> Patch by : Kannan R <ka...@collab.net>
> 
> Suggested by : julianf

I only suggested a slightly different way of implementing it, not the
whole idea!

Committed in r40072.

Thanks!
- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408182

Re: [PATCH] [Modified]Restrict interactive callback for prop conflicts in `svn merge --dry-run'

Posted by Kannan <ka...@collab.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Julian Foad wrote:
> Can I recommend passing the 'dry_run' flag through to
> maybe_generate_propconflict(), and doing the "if (dry_run) then it's a
> conflict" there in just one place. That will make it easier to extend
> when we want to make it possible for the "accept=theirs" options to act
> properly in dry-run mode.
> 
> - Julian

Log:
When in `--dry-run' mode of `svn merge' command, property conflicts
make an interactive callback to the user to resolve the conflicts,
unlike the text conflicts. The following patch restricts the interactive
callback in `--dry-run' mode.


* subversion/libsvn_wc/props.c
  (svn_wc__merge_props) : Pass `dry_run' parameter to the required
  methods.
  (apply_single_prop_add, apply_single_prop_delete,
  apply_single_prop_change, apply_single_generic_prop_change,
  apply_single_mergeinfo_prop_change) : Pass `dry_run' to
  `maybe_generate_propconflict'
  (maybe_generate_propconflict) : Check for `--dry-run' mode and set the
  boolean `conflict_remains', instead of invoking the interactive
  callback.

Patch by : Kannan R <ka...@collab.net>

Suggested by : julianf

- --
Regards,
Kannan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBStgwI3lTqcY7ytmIAQKpbwgAqcHoCYpWFKOjWDW0M+miVRmHLYcSmFyD
P0oPrfSEvrU5hvF8VP7nOoi7xNhxcfenSc5JlOuBE9b9IqNj7QurdkL6UFHT+Nnw
s2c7NyOaTV8fAU1QMFRo3RHs8Fron9XBoPH5vRKV5chsIFjaLhvNfa8eBusDBcTy
T9VLaVUzC+0u02CAjhtGfwFT+6u0+pTYlbpxWSxRtMRdWmIfEVnHev9rtChtAZPo
zCcyWjVYTysBur/I7ZJ/MirZK2KqS2hkY/CbodQvCDunZYWdSfSlE66GHT6+S6Uk
Ree0+/s0HbxG0ypD91mf2dQ0xAdq08Pu8e/3V6uWAVDwHDKO/YXCiQ==
=qLU6
-----END PGP SIGNATURE-----

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408158

Re: [PATCH] Restrict interactive callback for prop conflicts in `svn merge --dry-run'

Posted by Julian Foad <ju...@btopenworld.com>.
Kannan wrote:
> > When in `--dry-run' mode of `svn merge' command, property conflicts make
> > an interactive callback to the user to resolve the conflicts, unlike the
> > text conflicts. The following patch restricts the interactive callback
> > in `--dry-run' mode.
> > 
> > * subversion/libsvn_wc/props.c
> >  (svn_wc__merge_props) : Pass `dry_run' parameter to the required
> >   methods.
> >  (apply_single_prop_add, apply_single_prop_delete,
> >   apply_single_prop_change, apply_single_generic_prop_change,
> >   apply_single_mergeinfo_prop_change) : Check for the `--dry-run' mode
> >   and set the boolean `got_conflict', instead of invoking the
> >   interactive callback.

Can I recommend passing the 'dry_run' flag through to
maybe_generate_propconflict(), and doing the "if (dry_run) then it's a
conflict" there in just one place. That will make it easier to extend
when we want to make it possible for the "accept=theirs" options to act
properly in dry-run mode.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407884

Re: [PATCH] Restrict interactive callback for prop conflicts in `svn merge --dry-run'

Posted by Kannan <ka...@collab.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kannan wrote:
> 
> Log:
> When in `--dry-run' mode of `svn merge' command, property conflicts make
> an interactive callback to the user to resolve the conflicts, unlike the
> text conflicts. The following patch restricts the interactive callback
> in `--dry-run' mode.
> 
> * subversion/libsvn_wc/props.c
>  (svn_wc__merge_props) : Pass `dry_run' parameter to the required
>   methods.
>  (apply_single_prop_add, apply_single_prop_delete,
>   apply_single_prop_change, apply_single_generic_prop_change,
>   apply_single_mergeinfo_prop_change) : Check for the `--dry-run' mode
>   and set the boolean `got_conflict', instead of invoking the
>   interactive callback.
> 
> Patch by : Kannan R <ka...@collab.net>
> 
> 

Corrected a typo in the patch.
s/got_conflicts/got_conflict/

- --
Regards,
Kannan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBStcey3lTqcY7ytmIAQKPBwf8CWq/yhfR5+LibK5NojGwknFtgtpnBxss
rBD5Ucw0THmn4iVOr1werExztpWrYi/bfiP8UGPPQUwJrvmBUM7T44VKvPnomCe9
IAQSvVQv/xSVkaP8sNDgH3eWaBcHecE7sDnMtW4k2CZi5/zJSzPstQejKvImncE8
UuabPSGrr+2+29uxhOKNvpCzJ5MkiAL9PU/lCInhNtToffYQIND9CGFkhBGYhvZy
PJHoyGiaCIlhu6Fv4hfuvpr/Ys23/v3SzD6wZ4o+/Ny0pviy5tbE8sWVgrlwppjH
25Q/YsMHBoAw3zFgMZ8GKQgJK/y34QHpxso6ZsCKU+VGZmOtZVJcgA==
=jGmF
-----END PGP SIGNATURE-----

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407882