phmarek / fsvs

Full System Versioning System
GNU General Public License v3.0
6 stars 3 forks source link

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

Closed sudipm-mukherjee closed 6 months ago

sudipm-mukherjee commented 6 months ago

The commit https://github.com/phmarek/fsvs/commit/f39cc00b3200bcd7874faf4de15479dfa3e6762a 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 commented 6 months ago

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);

sudipm-mukherjee commented 6 months ago

@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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

Please verify that 061b30b40f5072604f96b66e34ece24d0dcb7d7b fixes the commit problem.

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

sudipm-mukherjee commented 6 months ago

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 commented 6 months ago

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

Thanks!