svn commit: r1932743 - subversion/trunk/subversion/svnbrowse

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <177514658912.2218787.6163253515141524200@svn03-he-fi>
Author: rinrab
Date: Thu Apr  2 16:16:28 2026
New Revision: 1932743

Log:
svnbrowse: Rename svn_browse__item_t->relpath to name. It's only a name of that
directory, not a path to it. We still have to join those paths.

* subversion/svnbrowse/svnbrowse.c
  (svn_browse__item_t): Rename field.
  (list_cb, view_draw, sub_main): Update references.

Modified:
   subversion/trunk/subversion/svnbrowse/svnbrowse.c

Modified: subversion/trunk/subversion/svnbrowse/svnbrowse.c
==============================================================================
--- subversion/trunk/subversion/svnbrowse/svnbrowse.c	Thu Apr  2 15:51:07 2026	(r1932742)
+++ subversion/trunk/subversion/svnbrowse/svnbrowse.c	Thu Apr  2 16:16:28 2026	(r1932743)
@@ -39,7 +39,7 @@
 #define CTRL(ch) ((ch) - 'a' + 1)
 
 typedef struct svn_browse__item_t {
-  const char *relpath;
+  const char *name;
   const svn_dirent_t *dirent;
 } svn_browse__item_t;
 
@@ -78,7 +78,7 @@ list_cb(const char *relpath,
 {
   svn_browse__state_t *state = baton;
   svn_browse__item_t *item = apr_pcalloc(state->pool, sizeof(*item));
-  item->relpath = svn_dirent_basename(relpath, state->pool);
+  item->name = svn_dirent_basename(relpath, state->pool);
   item->dirent = svn_dirent_dup(dirent, state->pool);
   APR_ARRAY_PUSH(state->list, svn_browse__item_t *) = item;
   return SVN_NO_ERROR;
@@ -204,9 +204,9 @@ view_draw(svn_browse__view_t *view, apr_
       if (i == 0)
         mvprintw(i + 1, 0, "../");
       else if (item->dirent->kind == svn_node_dir)
-        mvprintw(i + 1, 0, "%s/", item->relpath);
+        mvprintw(i + 1, 0, "%s/", item->name);
       else if (item->dirent->kind == svn_node_file)
-        mvprintw(i + 1, 0, "%s", item->relpath);
+        mvprintw(i + 1, 0, "%s", item->name);
       else
         abort();
 
@@ -282,7 +282,7 @@ sub_main(int *code, int argc, char *argv
           case '\r':
             item = APR_ARRAY_IDX(ctx->current->list, ctx->current->selection,
                                  svn_browse__item_t *);
-            new_url = svn_relpath_join(ctx->current->relpath, item->relpath,
+            new_url = svn_relpath_join(ctx->current->relpath, item->name,
                                        iterpool);
             SVN_ERR(enter_path(ctx, new_url, iterpool));
             break;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.