Greg Ward avatar Greg Ward committed e49a4a9

svn: fix coding style; improve error messages.

Comments (0)

Files changed (1)

-
 /*
  * Copyright (C) 2009-2013, Gregory P. Ward and contributors.
  *
 
     int retval;
     sqlite3 *conn;
-    sqlite3_stmt    *res;
-    const char      *tail;
+    sqlite3_stmt *res;
+    const char *tail;
 
     if (!read_first_line(".svn/entries", buf, 1024)) {
         debug("failed to read from .svn/entries: not an svn working copy");
     }
     char line[1024];
 
-    if( access( ".svn/wc.db", F_OK ) == 0 ) {
+    if (access(".svn/wc.db", F_OK) == 0) {
         // Custom file format (working copy created by svn >= 1.7)
 
         retval = sqlite3_open(".svn/wc.db", &conn);
-        if(retval) {
-            debug("Can not open database");
+        if (retval) {
+            debug("error opening database in .svn/wc.db");
             goto err;
         }
         retval = sqlite3_prepare_v2(conn, "select max(revision) from NODES", 1000, &res, &tail);
-        if(retval) {
-            debug("Can not run the query");
+        if (retval) {
+            debug("error running query");
             goto err_sqlite;
         }
         else {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.