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

[patch] new part 1 for log command

From: Ben Collins <bcollins_at_debian.org>
Date: 2002-02-26 17:26:49 CET

Well, after a lot of discussion on IRC, this is the new patch. It's a
lot faster, but it only address some of the issues with the logging
command, but it's the most important ones for now.

This patch allows you to get only log info for files that you pass on
the command line. There's cavaets to this:

        The file must exist in the local working copy's revision.
        There is an instance where this doesn't hold.

        If you pass a file that is in the local wc and one that isn't,
        you are ok as long as the files exist in the newer rev that you
        are looking for. For example:

        (in rev 10) svn add foo.c bar.c
        (in rev 20) svn delete foo.c

        (current wc rev is 40)

        svn log bar.c (works, obviously)

        svn log foo.c (wont work)

        svn log bar.c foo.c (wont work, since foo.c doesn't exist in rev 40)

        svn log -r 15 bar.c foo.c (this will work)

        svn log -r 15 foo.c (this wont)

So, here's the patch:

        * libsvn_fs/tree.c(svn_fs_revisions_changed): Change to take an
        array of stringbuf's for paths instead of one path. It will then
        iterate to get a list of all revs for all paths (reduces amount
        of trails for getting info on multiple paths).

        * include/svn_fs.h: Updated decleration and comments for
        svn_fs_revisions_changed.

        * svnadmin/main.c(main): Updated use of svn_fs_revisions_changed
        for lscr.
        * tests/libsvn_fs/fs-test.c(revisions_changed): Likewise.
        
        * libsvn_subr/sorts.c(svn_sort_compare_revisions): New function
        for sorting an array of revisions.
        * include/svn_sorts.h: Delcare it.
        
        * libsvn_repos/log.c(svn_repos_get_logs): Make use of newly
        modified svn_fs_revisions_changed. We pass it the paths passed
        to us (if any). The returned array of revs is then used to trim
        down the logs to just those that the caller is intersted in.

-- 
 .----------=======-=-======-=========-----------=====------------=-=-----.
/       Ben Collins    --    Debian GNU/Linux    --    WatchGuard.com      \
`          bcollins@debian.org   --   Ben.Collins@watchguard.com           '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'


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

Received on Sat Oct 21 14:37:10 2006

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.