Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to commit changes to remote HTTP SVN repo #18

Closed
sudipm-mukherjee opened this issue Dec 11, 2023 · 7 comments
Closed

Not able to commit changes to remote HTTP SVN repo #18

sudipm-mukherjee opened this issue Dec 11, 2023 · 7 comments

Comments

@sudipm-mukherjee
Copy link

The commit f39cc00 done for https://bugs.launchpad.net/ubuntu/+source/fsvs/+bug/1875642 has not fixed the issue. I was backporting the commit to fix older Ubuntu versions but then I realised that v1.2.11 still has the same issue. I have updated the Ubuntu bug with details.

I can reproduce the problem and will be happy to debug and provide more logs if needed and if steps are provided.

@phmarek
Copy link
Owner

phmarek commented Dec 12, 2023

Hmmm, adding a quick debug print and running a local test (with file:///, though) shows no missing close-calls.

Would you mind adding the patch below (preferably against a git HEAD checkout), run your test with fsvs commit -mx -d > /tmp/fsvs.log, and send me that file (privately?)? Thanks.

diff --git i/src/commit.c w/src/commit.c
index 4476ca2..a52b4e6 100644
--- i/src/commit.c
+++ w/src/commit.c
@@ -795,7 +795,7 @@ svn_error_t *ci__directory(const svn_delta_editor_t *editor,
current_url->current_rev,
subpool, &baton);

  •   	DEBUGP("opening %s with base %llu", filename, 
    
  •   	DEBUGP("** opening %s with base %llu", filename, 
      			(t_ull)current_url->current_rev);
      	TEST_FOR_OUT_OF_DATE(sts, status_svn,
      			"%s(%s) returns %d",
    

@@ -874,6 +874,7 @@ svn_error_t *ci__directory(const svn_delta_editor_t *editor,
STOPIF_SVNERR( ci__nondir, (editor, sts, baton, subpool) );
STOPIF_SVNERR( editor->close_file, (baton, NULL, subpool) );
}

  •   DEBUGP("** closed %s", sts->name);
    
    
      /* If it's copy base, we need to clean up all flags below; else we 
    

@@ -1037,6 +1038,7 @@ svn_error_t *ci___base_dirs(char *current_missing,
STOPIF_SVNERR( ci___base_dirs,
(delim, editor, root, child_baton));

  •   DEBUGP("** close %s",missing_path_utf8);
      STOPIF_SVNERR( editor->close_directory,
      		(child_baton, current_url->pool));
    
    }

@sudipm-mukherjee
Copy link
Author

sudipm-mukherjee commented Dec 12, 2023

@phmarek I see a weird behaviour when I add -d.

root@autopkgtest:/home/ubuntu# fsvs
N...        10  .bash_history
N...       220  .bash_logout
N...      3771  .bashrc
N...       dir  .cache
N...         0  .cache/motd.legal-displayed
N...       807  .profile
N...       dir  .ssh
N...         0  .ssh/authorized_keys
N...         0  .sudo_as_admin_successful
.mC.       dir  .
root@autopkgtest:/home/ubuntu# fsvs commit -mstart
Authentication realm: <http://localhost:80> SVN reposity
Password for 'root': ****

Committing to http://localhost/svn/test
N...        10  .bash_history
N...       220  .bash_logout
N...      3771  .bashrc
N...       dir  .cache
N...         0  .cache/motd.legal-displayed
N...    196386  fsvs_1.2.11+really~git20230104.5f993f7-1_amd64.deb
N...       807  .profile
N...       dir  .ssh
N...         0  .ssh/authorized_keys
N...         0  .sudo_as_admin_successful


An error occurred: The filesystem editor completion process was not followed (160050)
  in ci__work: editor->close_edit: Closing editor with directories or files open
root@autopkgtest:/home/ubuntu# fsvs commit -mstart -d  > /tmp/fsvs.log


An error occurred at 13:24:11.799: Can't create session (170013)
  in url__open_session [url.c:1107]: svn_ra_open("http://localhost/svn/test"): Unable to connect to a repository at URL 'http://localhost/svn/test'

I pasted from my console, when I run fsvs commit -mstart without -d its able to connect to the server and authenticates and tries to commit where it fails due this issue we are trying to debug. But as soon as I add -d you can see in my paste that it even fails to start a session with the server. I am mailing you the fsvs.log now.

Note: I see this same weird behaviour without your debug patch on current HEAD.

@phmarek
Copy link
Owner

phmarek commented Dec 12, 2023

Would you please try strace -f -tt -s 200 -o /tmp/fsvs.trace fsvs commit -m start -d and show the fsvs.trace file?

What (gcc?) version was used to compile, what subversion version is that machine running?

@sudipm-mukherjee
Copy link
Author

gcc-13 and subversion is v1.14.2.

mailed you the trace file and also fsvs debug log. fsvs commit -m start -d works but fsvs commit -mstart -d > /tmp/fsvs.log does not work. I have even tried to pipe it via tee instead of > but still failed. Anyways, thats a different issue.

@phmarek
Copy link
Owner

phmarek commented Dec 13, 2023

Please verify that 061b30b fixes the commit problem.

(Why the debug output interfered once I don't understand.)

@sudipm-mukherjee
Copy link
Author

Thanks a lot for your help. That has worked.

# fsvs commit -mstart
Authentication realm: <http://localhost:80> SVN reposity
Password for 'root': ****

Committing to http://localhost/svn/test
N...        10  .bash_history
N...       220  .bash_logout
N...      3771  .bashrc
N...       dir  .cache
N...         0  .cache/motd.legal-displayed
N...       807  .profile
N...       dir  .ssh
N...         0  .ssh/authorized_keys
N...         0  .sudo_as_admin_successful
committed revision	1 on 2023-12-13T11:42:12.794933Z as root

can you do a v1.2.12 release please.. I think this fixes a major bug.

@phmarek
Copy link
Owner

phmarek commented Dec 13, 2023

Yeah, will do. I just wanted to get your acknowledge.

Thanks!

@phmarek phmarek closed this as completed Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants