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

Re: svn commit: r12244 - trunk/subversion/libsvn_repos

From: <kfogel_at_collab.net>
Date: 2004-12-08 20:38:50 CET

lundblad@tigris.org writes:
> Log:
> Part of issue #2154: gracefully handle svn blame for a directory.
>
> * subversion/libsvn_repos/rev_hunt.c (svn_repos_get_file_revs): Return
> error if path doesn't refer to a file.
>
>
> Modified: trunk/subversion/libsvn_repos/rev_hunt.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_repos/rev_hunt.c?view=diff&rev=12244&p1=trunk/subversion/libsvn_repos/rev_hunt.c&r1=12243&p2=trunk/subversion/libsvn_repos/rev_hunt.c&r2=12244
> ==============================================================================
> --- trunk/subversion/libsvn_repos/rev_hunt.c (original)
> +++ trunk/subversion/libsvn_repos/rev_hunt.c Wed Dec 8 13:27:14 2004
> @@ -520,6 +520,7 @@
> svn_fs_root_t *root, *last_root;
> const char *last_path;
> int i;
> + svn_node_kind_t kind;
>
> /* We switch betwwen two pools while looping, since we need information from
> the last iteration to be available. */
> @@ -530,6 +531,12 @@
> /* ### Can we use last_pool for this? How long does the history
> object need the root? */
> SVN_ERR (svn_fs_revision_root (&root, repos->fs, end, pool));
> +
> + /* The path had better be a file in this revision. This avoids calling
> + the callback before reporting an uglier error below. */
> + SVN_ERR (svn_fs_check_path (&kind, root, path, pool));
> + if (kind != svn_node_file)
> + return svn_error_create (SVN_ERR_FS_NOT_FILE, NULL, NULL);

Is there some reason not to report the path in the error?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 8 20:38:28 2004

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.