Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Normalize svn:ignore pattern matching

    5 answers - 1139 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Currently, knowledge that svn:ignore only supports glob patterns is
    duplicated in four functions: send_unversioned_item, add_dir_recursive,
    import_dir, and import. This is bad for modularity, as you would need to
    modify all four places if you e.g. added support for reg-exps in
    svn:ignore patterns.
    The attached patch modifies the four functions to use a new function,
    svn_cstring_match_ignore_list, that currently only forwards to
    svn_cstring_match_glob_list, but can in the future be modified to do more.
    I'm not sure if svn_string.c is the correct place for the new function;
    feel free to suggest a better place.
    [[[
    Make all svn:ignore pattern matching go through a single function to make
    future enhancements easier.
    *
    (svn_cstring_match_ignore_list): New function declaration.
    *
    (svn_cstring_match_ignore_list): New function.
    * subversion/libsvn_wc/status.c (send_unversioned_item)
    subversion/libsvn_client/add.c (add_dir_recursive)
    (import_dir, import):
    Use svn_cstring_match_ignore_list instead of svn_cstring_match_blob_list.
    ]]]
  • No.1 | | 846 bytes | |

    6/16/06, Salerma <osku (AT) iki (DOT) fiwrote:
    Currently, knowledge that svn:ignore only supports glob patterns is
    duplicated in four functions: send_unversioned_item, add_dir_recursive,
    import_dir, and import. This is bad for modularity, as you would need to
    modify all four places if you e.g. added support for reg-exps in
    svn:ignore patterns.

    The attached patch modifies the four functions to use a new function,
    svn_cstring_match_ignore_list, that currently only forwards to
    svn_cstring_match_glob_list, but can in the future be modified to do more.

    I'm not sure if svn_string.c is the correct place for the new function;
    feel free to suggest a better place.
    svn_ctring.c is wrong place for this functions. It should be private
    libsvn_wc function with name like svn_wc__match_ignore_list()
  • No.2 | | 1077 bytes | |

    Sat, 17 Jun 2006, Ivan Zhakov wrote:

    6/16/06, Salerma <osku (AT) iki (DOT) fiwrote:
    Currently, knowledge that svn:ignore only supports glob patterns is
    duplicated in four functions: send_unversioned_item, add_dir_recursive,
    import_dir, and import. This is bad for modularity, as you would need to
    modify all four places if you e.g. added support for reg-exps in
    svn:ignore patterns.

    The attached patch modifies the four functions to use a new function,
    svn_cstring_match_ignore_list, that currently only forwards to
    svn_cstring_match_glob_list, but can in the future be modified to do more.

    I'm not sure if svn_string.c is the correct place for the new function;
    feel free to suggest a better place.

    svn_ctring.c is wrong place for this functions. It should be private
    libsvn_wc function with name like svn_wc__match_ignore_list()

    It is called from libsvn_client as well (add.c, commit.c), so it can't be
    private to libsvn_wc, unless I'm misunderstanding what private means in
    this context.
  • No.3 | | 1315 bytes | |

    6/17/06, Salerma <osku (AT) iki (DOT) fiwrote:
    Sat, 17 Jun 2006, Ivan Zhakov wrote:

    6/16/06, Salerma <osku (AT) iki (DOT) fiwrote:
    Currently, knowledge that svn:ignore only supports glob patterns is
    duplicated in four functions: send_unversioned_item, add_dir_recursive,
    import_dir, and import. This is bad for modularity, as you would need to
    modify all four places if you e.g. added support for reg-exps in
    svn:ignore patterns.

    The attached patch modifies the four functions to use a new function,
    svn_cstring_match_ignore_list, that currently only forwards to
    svn_cstring_match_glob_list, but can in the future be modified to do more.

    I'm not sure if svn_string.c is the correct place for the new function;
    feel free to suggest a better place.

    svn_ctring.c is wrong place for this functions. It should be private
    libsvn_wc function with name like svn_wc__match_ignore_list()

    It is called from libsvn_client as well (add.c, commit.c), so it can't be
    private to libsvn_wc, unless I'm misunderstanding what private means in
    this context.

    Sorry, I missed reference from libsvn_client.
    So in this case it should be public function svn_wc_match_ignore_list.
    But anyway I consider it should be libsvn_wc function.
  • No.4 | | 1123 bytes | |

    Sat, 17 Jun 2006, Ivan Zhakov wrote:

    6/17/06, Salerma <osku (AT) iki (DOT) fiwrote:
    It is called from libsvn_client as well (add.c, commit.c), so it can't be
    private to libsvn_wc, unless I'm misunderstanding what private means in
    this context.

    Sorry, I missed reference from libsvn_client.
    So in this case it should be public function svn_wc_match_ignore_list.
    But anyway I consider it should be libsvn_wc function.

    The attached new patch moves it to libsvn_wc/util.c and adds a pool
    parameter since future users in all probability will need it.

    [[[
    Make all svn:ignore pattern matching go through a single function to make
    future enhancements easier.

    * subversion/include/svn_wc.h
    (svn_wc_match_ignore_list): New function declaration.

    * subversion/libsvn_wc/util.c
    (svn_wc_match_ignore_list): New function.

    * subversion/libsvn_wc/status.c (send_unversioned_item)
    subversion/libsvn_client/add.c (add_dir_recursive)
    (import_dir, import):

    Use svn_wc_match_ignore_list instead of svn_cstring_match_blob_list.
    ]]]
  • No.5 | | 1206 bytes | |

    6/17/06, Salerma <osku (AT) iki (DOT) fiwrote:
    Sat, 17 Jun 2006, Ivan Zhakov wrote:

    6/17/06, Salerma <osku (AT) iki (DOT) fiwrote:
    It is called from libsvn_client as well (add.c, commit.c), so it can't be
    private to libsvn_wc, unless I'm misunderstanding what private means in
    this context.

    Sorry, I missed reference from libsvn_client.
    So in this case it should be public function svn_wc_match_ignore_list.
    But anyway I consider it should be libsvn_wc function.

    The attached new patch moves it to libsvn_wc/util.c and adds a pool
    parameter since future users in all probability will need it.

    [[[
    Make all svn:ignore pattern matching go through a single function to make
    future enhancements easier.

    * subversion/include/svn_wc.h
    (svn_wc_match_ignore_list): New function declaration.

    * subversion/libsvn_wc/util.c
    (svn_wc_match_ignore_list): New function.

    * subversion/libsvn_wc/status.c (send_unversioned_item)
    subversion/libsvn_client/add.c (add_dir_recursive)
    (import_dir, import):

    Use svn_wc_match_ignore_list instead of svn_cstring_match_blob_list.
    ]]]

    Commited in r20155. Thanks!

Re: Normalize svn:ignore pattern matching


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 1 =
QUESTION ON "Development"

EMSDN.COM