Exemple #1
0
def client_log(url, start_rev, end_rev, log_limit, include_changes,
               cross_copies, cb_func, ctx):
    include_changes = include_changes and 1 or 0
    cross_copies = cross_copies and 1 or 0
    client.svn_client_log4([url], start_rev, start_rev, end_rev, log_limit,
                           include_changes, not cross_copies, 0, None, cb_func,
                           ctx)
Exemple #2
0
def client_log(url, start_rev, end_rev, log_limit, include_changes,
               cross_copies, cb_func, ctx):
    include_changes = include_changes and 1 or 0
    cross_copies = cross_copies and 1 or 0
    try:
        client.svn_client_log4([url], start_rev, start_rev, end_rev, log_limit,
                               include_changes, not cross_copies, 0, None,
                               cb_func, ctx)
    except AttributeError:
        # Wrap old svn_log_message_receiver_t interface with a
        # svn_log_entry_t one.
        def cb_convert(paths, revision, author, date, message, pool):
            class svn_log_entry_t:
                pass

            log_entry = svn_log_entry_t()
            log_entry.changed_paths = paths
            log_entry.revision = revision
            log_entry.revprops = {
                core.SVN_PROP_REVISION_LOG: message,
                core.SVN_PROP_REVISION_AUTHOR: author,
                core.SVN_PROP_REVISION_DATE: date,
            }
            cb_func(log_entry, pool)

        client.svn_client_log2([url], start_rev, end_rev, log_limit,
                               include_changes, not cross_copies, cb_convert,
                               ctx)
Exemple #3
0
def client_log(url, start_rev, end_rev, log_limit, include_changes, cross_copies, cb_func, ctx):
    include_changes = include_changes and 1 or 0
    cross_copies = cross_copies and 1 or 0
    try:
        client.svn_client_log4(
            [url], start_rev, start_rev, end_rev, log_limit, include_changes, not cross_copies, 0, None, cb_func, ctx
        )
    except AttributeError:
        # Wrap old svn_log_message_receiver_t interface with a
        # svn_log_entry_t one.
        def cb_convert(paths, revision, author, date, message, pool):
            class svn_log_entry_t:
                pass

            log_entry = svn_log_entry_t()
            log_entry.changed_paths = paths
            log_entry.revision = revision
            log_entry.revprops = {
                core.SVN_PROP_REVISION_LOG: message,
                core.SVN_PROP_REVISION_AUTHOR: author,
                core.SVN_PROP_REVISION_DATE: date,
            }
            cb_func(log_entry, pool)

        client.svn_client_log2([url], start_rev, end_rev, log_limit, include_changes, not cross_copies, cb_convert, ctx)