Score:1

VisualSVN - svn status Error W155007

gb flag

I'm trying to write a post-commit hook that will zip all the changed files saving the directory tree. When I try to do a svn status on a repository directory (with conf, db, hooks directories etc.), it outputs the W155007 error saying this directory is not a working copy. I cannot afford to clone the repo locally just for zipping because repository size can exceed 1TB.

What am I doing wrong and is there an example for such a hook that can be run on Windows Server machine?

bahrep avatar
tw flag
You don't need to archive every single revision in a post-commit hook. I don't know what's your idea or what's the problem you are trying to solve, but the proposed solution is wrong.
GettingPleasure avatar
gb flag
@bahrep The problem I'm solving is storing all the commits (new/deleted/modified files) in zips (to ease the download process) and then using my software to compare the local/online versions to download all the commit zips that are newer than a local revision. This needs to be done strictly using VisualSVN as a host (without spending half a year writing a similar program to already existing)
bahrep avatar
tw flag
the server has a web interface that supports downloading files and folders. Click the Download button when needed and you will download file or directory as it was in a certain revision (you can open any earlier revision). The directory will be downloaded as a ZIP file. I think that you don't even need zips - you can script the svn.exe client to compare the versions. SVN is a version control system after all. It's all about storing and comparing versions of data. Right now it just looks like you are trying to reinvent the wheel.
GettingPleasure avatar
gb flag
@bahrep I cannot use the front-end web interface from C# code. Everything I need to do is to get any revision from a specific repo as one file. Speaking of svn.exe - I cannot afford to include it in every client installation
Score:1
it flag

What am I doing wrong

A lot of:

  1. You try (as you saw) to use command(s), designed to work with WC, for manipulating repository as files
  2. You miss one details additionally - even in (clean after commit) WC svn st return nothing, because WC is clean
  3. If you want to sync some non-versioned tree with the state of HEAD and have functional state of export, you must take into account and process the status of not only "changed" files, but at least "new" too and ideally also "deleted"

In any case, you have to learn svnlook subcommands and build (before using) reliable workflow

  • which revision from repo to use
  • how to get this rev-id
  • consider building file-list in pre-commit hook and only use it in post-commit

and toolchain around it. Read about svnlook changed for getting files, maybe svnlook youngest for getting revision for changed subcommand, if you'll work in post-commit only and will want always get files from last commit (beware of commits to WIP-branches)

GettingPleasure avatar
gb flag
So, I can use the svnlook changed command to view the differences in a specific revision, then export all this changes myself and zip them? (considering every repo has strictly one branch, no rollbacks are ever done and a list of deleted files will be stored in a different text file that will be parsed on the client-side)
it flag
@GettingPleasure - well, "yes" in common
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.