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

svn lock doesn't have svn semantics (lfsMode) #459

Open
DavidGrundberg opened this issue Nov 26, 2021 · 0 comments
Open

svn lock doesn't have svn semantics (lfsMode) #459

DavidGrundberg opened this issue Nov 26, 2021 · 0 comments
Labels

Comments

@DavidGrundberg
Copy link

DavidGrundberg commented Nov 26, 2021

Hello, first of all, thanks for sharing a terrific piece of software! It could really become useful for me

I realize that git-as-svn only mirrors what git-lfs locking does. (Which IMHO is fundamentally broken, but that's beside the point.) What's important to me is that the svn clients expect the file to be up to date when they have a lock, and today that's not the case with git-as-svn, unfortunately.

Running git-as-svn with the gitlab backend.

What I do:

$ svn checkout svn://gitlab.example.com/my/repo/master checkout1
$ cd checkout1
$ echo "test" > myfile.txt # create a file
$ svn add myfile.txt
$ svn commit myfile.txt
$ cd ..
$ svn checkout svn://gitlab.example.com/my/repo/master checkout2
$ cd checkout1
$ echo "test" >> myfile.txt
$ svn commit
$ cd ../checkout2
$ svn lock myfile.txt

What I expect to happen when I run the lock command:

$ svn lock myfile.txt
svn: warning: W160042: Lock failed: newer version of '/myfile.txt' exists
svn: E200009: One or more locks could not be obtained
$ svn status -uv | grep myfile.txt
        *        8        8 john.doe myfile.txt # file is not locked!
$ 

What happens today with git-as-svn:

$ svn lock myfile.txt
'myfile.txt' locked by user 'john.doe'
$ svn status -uv | grep myfile.txt
     K  *       12       12 john.doe myfile.txt # file is locked, despite being out of date
$ 

I've been looking through the code and fixed another issue (with the strings used as names for the locks), with some pointers I might be able to fix this too

@DavidGrundberg DavidGrundberg changed the title svn lock doesn't have svn semantics svn lock doesn't have svn semantics (lfsMode) Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants