git-as-svn / git-as-svn Goto Github PK
View Code? Open in Web Editor NEWSubversion frontend server for Git repositories
Home Page: https://git-as-svn.github.io/git-as-svn/htmlsingle/git-as-svn.html
License: GNU General Public License v2.0
Subversion frontend server for Git repositories
Home Page: https://git-as-svn.github.io/git-as-svn/htmlsingle/git-as-svn.html
License: GNU General Public License v2.0
$ svn co -r0 svn://localhost/
svn: E235000: In file 'subversion/libsvn_wc/wc_db.c' line 1721: assertion failed (SVN_IS_VALID_REVNUM(changed_rev))
Subj. We currently require a branch with at least one commit.
$ svn mv -m "move" svn://localhost/README.md svn://localhost/foo.md
svn: E150003: svn: E150003: File revision is not defined: /README.md
java.io.IOException: Unexpected token: String{"svn://localhost/README.md"} (expected: svnserver.parser.token.NumberToken)
at svnserver.parser.SvnServerParser.readItem(SvnServerParser.java:84)
at svnserver.parser.MessageParser.parseInts(MessageParser.java:140)
at svnserver.parser.MessageParser$$Lambda$7/2109934540.parse(Unknown Source)
at svnserver.parser.MessageParser.parse(MessageParser.java:50)
at svnserver.parser.MessageParser.parseObject(MessageParser.java:68)
at svnserver.parser.MessageParser.parse(MessageParser.java:52)
at svnserver.server.command.CommitCmd$EditorPipeline.editorCommand(CommitCmd.java:402)
at svnserver.server.command.CommitCmd$EditorPipeline$$Lambda$39/1400552140.process(Unknown Source)
at svnserver.server.SvnServer.serveClient(SvnServer.java:114)
at svnserver.server.SvnServer.lambda$start$0(SvnServer.java:83)
at svnserver.server.SvnServer$$Lambda$2/1233705144.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)
When I try to use git-as-svn to check out a repository commit more than 20000, git-as-svn very slow response, far less than the response speed of git operations warehouse.
Original svn:
( success ( ( ) 0: ) )
( failure ( ( 160040 32:No lock on path '/README.md' 0: 0 ) ) )
done
( success ( ) )
Git as svn:
( success ( ( ) 0: ) )
done
( failure ( ( 160040 28:svn: E160040: /README.md 0: 0 ) ) )
This should be silently handled, without writing exception to log:
[pool-1-thread-47] ERROR svnserver.server.SvnServer - Command execution error
org.tmatesoft.svn.core.SVNException: svn: E204900: Unknown error
at svnserver.server.command.DeltaCmd$ReportPipeline$1.textDeltaChunk(DeltaCmd.java:379)
at org.tmatesoft.svn.core.io.diff.SVNDeltaGenerator.sendDelta(SVNDeltaGenerator.java:273)
at org.tmatesoft.svn.core.io.diff.SVNDeltaGenerator.sendDelta(SVNDeltaGenerator.java:187)
at svnserver.server.command.DeltaCmd$ReportPipeline.updateFile(DeltaCmd.java:357)
at svnserver.server.command.DeltaCmd$ReportPipeline.updateEntry(DeltaCmd.java:460)
at svnserver.server.command.DeltaCmd$ReportPipeline.updateDir(DeltaCmd.java:301)
at svnserver.server.command.DeltaCmd$ReportPipeline.updateEntry(DeltaCmd.java:458)
at svnserver.server.command.DeltaCmd$ReportPipeline.sendResponse(DeltaCmd.java:215)
at svnserver.server.command.DeltaCmd$ReportPipeline.complete(DeltaCmd.java:183)
at svnserver.server.command.DeltaCmd$ReportPipeline$$Lambda$30/652706217.process(Unknown Source)
at svnserver.server.step.CheckPermissionStep.process(CheckPermissionStep.java:39)
at svnserver.server.SvnServer.serveClient(SvnServer.java:150)
at svnserver.server.SvnServer.lambda$run$0(SvnServer.java:120)
at svnserver.server.SvnServer$$Lambda$8/319518541.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:121)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
at svnserver.parser.token.StringToken.write(StringToken.java:49)
at svnserver.parser.SvnServerWriter.binary(SvnServerWriter.java:68)
at svnserver.parser.SvnServerWriter.binary(SvnServerWriter.java:63)
at svnserver.server.command.DeltaCmd$ReportPipeline$1.textDeltaChunk(DeltaCmd.java:374)
... 16 more
You need regenerated cache, if linked repository adds to configuration after commit
Currently is it possible to complete commit even if some of EditorPipeline commands failed.
Artem, please check boolean logic in GitLogEntry#isPropertyModified, i think it is wrong.
Need test for fix: 9fe3260
bozaro@landfill:/tmp/test/git-as-svn$ echo > test.txt
bozaro@landfill:/tmp/test/git-as-svn$ svn add test.txt
A test.txt
bozaro@landfill:/tmp/test/git-as-svn$ svn commit -m "Add new file"
Добавляю test.txt
Передаю данные .
Committed revision 58.
bozaro@landfill:/tmp/test/git-as-svn$ svn up -r 57
Updating '.':
В редакции 57.
bozaro@landfill:/tmp/test/git-as-svn$ ls -l test.txt
-rw-rw-r-- 1 bozaro bozaro 1 авг. 15 00:50 test.txt
bozaro@landfill:/tmp/test/git-as-svn$
Subj. Dangerous, can lead to incorrect commits.
error in tree 87a9a8720c945cf2771e6b1730175651a46a082a: not properly sorted
Need to:
$ svn blame svn://localhost/nonexistent
svn: E235000: In file 'subversion/libsvn_client/blame.c' line 731: assertion failed (frb.last_filename != NULL)
$
[pool-1-thread-8] WARN svnserver.server.command.DeltaCmd - Found error in cmd close-edit: svn: E165001: Can't commit entry: /46245 1786331720.png
Invalid svn properties found.
Expected:
Actual:
svn:mime-type = "application/octet-stream"
[pool-1-thread-8] ERROR svnserver.server.SvnServer - Command execution error
org.tmatesoft.svn.core.SVNException: svn: E165001: Can't commit entry: /46245 1786331720.png
Invalid svn properties found.
Expected:
Actual:
svn:mime-type = "application/octet-stream"
at svnserver.repository.git.GitRepository$GitPropertyValidator.checkProperties(GitRepository.java:521)
at svnserver.repository.git.GitRepository$GitCommitBuilder.lambda$saveFile$4(GitRepository.java:630)
at svnserver.repository.git.GitRepository$GitCommitBuilder$$Lambda$51/1254091218.accept(Unknown Source)
at svnserver.repository.git.GitRepository$GitCommitBuilder.validateProperties(GitRepository.java:689)
at svnserver.repository.git.GitRepository$GitCommitBuilder.commit(GitRepository.java:670)
at svnserver.repository.git.GitRepository$GitCommitBuilder.commit(GitRepository.java:530)
at svnserver.server.command.CommitCmd$EditorPipeline.closeEdit(CommitCmd.java:498)
at svnserver.server.command.CommitCmd$EditorPipeline$$Lambda$47/1344807088.processCommand(Unknown Source)
at svnserver.server.command.LambdaCmd.process(LambdaCmd.java:39)
at svnserver.server.command.CommitCmd$EditorPipeline.editorCommand(CommitCmd.java:541)
at svnserver.server.command.CommitCmd$EditorPipeline$$Lambda$49/1774732771.process(Unknown Source)
at svnserver.server.SvnServer.serveClient(SvnServer.java:150)
at svnserver.server.SvnServer.lambda$run$5(SvnServer.java:120)
at svnserver.server.SvnServer$$Lambda$11/2061175267.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Revision 225e2cb from master
SessionContext.getRepositoryPath accepts both relative path and URL. Passing it an absolute URL effectively avoid permission checks performed in CheckPermissionStep.
Some cache files may change format between version.
We need tool/mode for validate and recache.
get-locations would make 'svn log --diff' perform much better
Broken by 5497955
$ svn log svn://localhost
------------------------------------------------------------------------
$
Performance thoughts: branches with common history should share runtime data in order to avoid O(commits * branches) memory usage.
It usefull for troubleshooting.
We currently forget about copying after commit is made. org.eclipse.jgit.diff.RenameDetector contains detection algorithm. Warning: this feature is very likely to require an on-disk cache (otherwise, performance issues are expected).
Besides internal storage, the following features have to be supported:
Hooks:
I see two solutions:
bash git push . revision:branch
)Real svn:
$ svn log svn://localhost/qwe
svn: E160013: File not found: revision 477903, path '/qwe'
$
git-as-svn:
$ svn log svn://localhost/nonexistent
------------------------------------------------------------------------
$
Subj. Beware that worker threads are likely to be blocked waiting for I/O and so can't check 'stopped' flag.
Suggestion:
When DeltaCmd supports 'url' parameter, 'switch' command is implemented trivially (see SwitchParams)
Subj
Subj, low priority
We can't handle big repositories because we store trees for all commits in memory. They should be offloaded to disk.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.