You're not currently signed in. Sign in.

New version(2.0) questions

Was very excited to read on the irc channel that 2.0 had been released, but I'm confused by the bestpractical web site.

  • I don't see any release notes for 2.0. Where are they?
  • Clicking on the main download link takes me to a page that has 1.08 as its most recent version.
  • Is 2.0 actually ready for public consumption? Or is this some kind of developers' release?
  • The "About" page link is broken, and I think it was broken the last time I visited. Is SVK being actively maintained?

Checkout from remote depot

Hello,

I checked the documentation (svk help, svkbook and other websites linked on the main page), but I cannot find any hint about the following:

I have an office computer. On this computer I have a mirror of various repositories. Local branches are on the computer as well.

I like working during my commute as well as at home. How can I checkout the local branches to my laptop or home computer?

I hope the problem is clear.

Thanx, Bernard

Installation on Mac

Hi,

How can I install SVK without a DMG on Mac? I downloaded the latest tar I could find on the site and put it into /usr/local with the appropriate sim links, but running svk command throws an error:

Can't locate SVK.pm in @INC (@INC contains: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at /usr/local/svk/bin/svk line 3.

BEGIN failed--compilation aborted at /usr/local/svk/bin/svk line 3.

I want to integrate SVK with the version of Perl I have already installed. Is this possible?

Thanks,

Tony - 9/11/2006

It sounds like you took the SVK source code and tried to "install" it by copying bin/svk into /usr/local/bin. Source distributions don't work that way, they have to be compiled and installed first. In SVK's case it needs its associated Perl libraries. SVK installs like any other Perl module. The instructions for installing are found in the README file which you should read.

I'm not sure what you mean by "integrating" SVK with your version of Perl, but it can use it if that's what you mean. However, SVK has a lot of dependencies, some of which are not trivial to install on your own (the Subversion perl bindings for one). It is much easier to install from the DMG. In fact, the DMG probably uses the Perl which comes with OS X.

Alternatively you can install a packaging system, such as Macports (formerly Darwinports), and let it install SVK and all its dependencies for you.

Schwern, 17.Oct.2006

Revision numbers out by 1 when using svk mirror

Hi,

Is there anyway to disable the first "SVM: initializing mirror for xxxxx" commit message on a mirrored repos? I am using trac with the

mirrored repository and all the revision numbers are off by 1 as a result of this message.

Thanks,

Adam, 14/08/2006

https directory level permission

I getting some throuble to access a subversion repository via https. I just have permission to access from the third level directory.

e.g.:

https://server.com/svn/aaa/bbb/

I can just access the directory bbb. How do I set this in svk?

This is the error

Authorization failed: PROPFIND request failed on '/svn/aaa': PROPFIND of '/svn/aaa': authorization failed (https://server.com)

- Rodrigo, 09/08/2006

Mixed SVN/SVK usage

I work at a programming shop where both SVN and SVK are in use. More and more often we're running up against problems where a checkout

was done with one of the programs, and somebody else tries to use the other one in the same checkout directory. It's not feasible (right

now at least) to do away with either program, so we're writing wrapper scripts around some of the more common commands. If there's an ".svn"

directory present, we invoke svn, otherwise we invoke svk.

Wrapping "diff" is proving to be quite troublesome. SVN understands -x and --diff-cmd, SVK understands the $SVKDIFF environment

variable, but neither one understands the other. Has somebody done this before? I'd prefer to not reinvent the wheel... again.

SSL Client certificate prompt

I have a mirror set up for a subversion repository at https : //foo.bar.baz/svn and the server uses SSL client certificates to authenticate users.

For subversion, I have a $HOME/.subversion/servers file that specifies the name of a PKCS#12 file that contains my client certificate and key.

Whenever I do a "svk sync", I get prompted for the client certificate filename. Is there any way I can get svk to stop prompting me for that? Thanks! --BrettNeumeier

I patched _ssl_client_cert_prompt() from SVN::Mirror::Ra to first check for the content of $ENV{SVN_MIRROR_CERT_FILE} before prompting me, and set the file name in the evn. var SVN_MIRROR_CERT_FILE. Any better solution? --TzafrirCohen

"svk push" rationale

"svk push" seems to begin by merging back to the mirror copy before trying to update the

remote repository. Why? Wouldn't it be simpler to always have the mirror reflect

a (present or past) state of the remote repository?

My naive understanding of svk had been:

your local branch copy should be impacted by two things: (1) your own local commits

and (2) upstream commits. The point of having the mirror is to give a place

to give the upstream commits a place to rest after a network sync, since they might not merge into your

local branch successfully right away. Polluting the mirror with

local commits that might not get committed to the upstream server,

seems confusing and likely to induce subtle synchronization

and locking bugs.

svk log messages produced by "svk push"

I would like to customize the log messages produced in my central SVN repository when I run "svk push". In particular, I want the "rX user@host | 00:00:00" stuff to be at the end, rather than the beginning, of the log message. (This is for the sake of first-line summaries in mailer.py and trac, for example ) I've dug around in Svk::Commands::Log and elsewhere, but can't figure out where in the source this happens. Can anyone point me to the right place?

- mithras

--Danny :

Log.pm is the right file. In the _show_log sub, move the line:

$output->print ($indent.$print_rev->($rev).":  $author | $date\n") unless $verbatim;

to after the line:

$output->print ($message);

Huge memory use for svk sync

I have an existing SVK depot with around 30,000 commits. I am mirroring a new project into it that has 20,000 revisions, and am about 8,000 revisions into that process. "svk sync" is using a ridiculous amount of memory - 1GB. Why is it doing that? Is there any way to reduce the memory use? I left it running over the weekend and it only progressed by 2000 revisions.

(For the record, drow on IRC informed me this was fixed in svk 2 -- Rachel)

More information: The repository being mirrored was originally created with cvs2svn, and has dozens of branches and over 800 tags. When SVN::Mirror encounters one of the tags created by cvs2svn it ends up copying each individual file in the tag from different branches of the repository. A file that has not been modified since the initial import will be copied from the vendor branch (not the trunk). A file that has been modified since the initial import but not on the branch that the tag was created on will be copied from the trunk. A file that has been modified on the branch the tag was created on will be copied from that branch. When the number of files tagged is large, the list of modifications in $editor and $href is large because it includes each individual file.

Also, for some reason the tag is not detected as "copies only", and $reporter->finish_report takes a long time to complete and uses a lot of memory.

Using the following script instead of just "{{svk sync //project}}" results in much faster results, because svk exits right after it has performed the operation that uses excessive memory, thus allowing the following operations to be performed with reasonable memory loads. Call the script with two arguments - the SVK path and the Subversion URL.

#!/bin/sh
LASTREV=`svk log -rHEAD $1 |
sed -e 1d -e '3,$d' -e 's/.*orig r//' -e 's/).*//'`
while :
do
NEXTREV=`expr $LASTREV + 1`
LASTREV=`svn log -r$NEXTREV:HEAD $2 |
sed -e '/manufactured by cvs2svn to create tag/,$d' |
sed -e '$d' |
sed -e '$!d' -e 's/^r//' -e 's/ .*//'`
echo "Syncing to next cvs2svn tag at $LASTREV"
svk sync -t $LASTREV $1
done

I can confirm this problem. The Subversion 1.3.0 release candidates help, but not much. I've been trying to import the GCC Subversion repository, which like the original poster's repo was created by cvs2svn, but contains more than 100,000 revisions, hundreds of branches and thousands of tags. On my home PC with 512MB of RAM, here's how long it takes to sync just one tag revision:

$ time svk sync -t 81408 //gcc/upstream
Syncing file:///home/zack/src/gcc-mirror/gccrepo
Retrieving log information from 81408 to 81408
Committed revision 81409 from revision 81408.
real    9m35.688s
user    1m3.295s
sys     0m55.656s

... and almost all of that, as you can see, is paging wait (real - (user+sys)). The overall process has been going for the better part of a week and I expect it to take at least another three days to finish.

I improved the step-by-step-sync script a bit: my version doesn't need to be told the Subversion URL, only scans the logs once, and doesn't leave locks hanging around if you control-C it.

#!/bin/sh
set -e
KPATH="$1"
NPATH=$(svk propget svm:source "$KPATH" | sed 's/!$//')
LASTREV=$(svk log -rHEAD -q "$KPATH" | sed -ne '2s/^.*orig r\([0-9]*\).*$/\1/p')
NEXTREV=$(($LASTREV + 1))
# Determine the list of revisions manufactured by cvs2svn.
# They have log entries of the form
#
# ------------------------------------------------------------------------
# r20100 | (no author) | 1998-05-27 14:04:33 -0700 (Wed, 27 May 1998) | 1 line
#
# This commit was manufactured by cvs2svn ...
#
# When the sed script finds an all-dashes line, it grabs the next line,
# extracts the revision number, and saves it in the hold space.  When
# it sees the telltale "This commit was manufactured by cvs2svn", it
# retrieves the revision number from the hold space and prints it.
echo -n "Retrieving tag list..."
TAGREVS=$(svn log -r$NEXTREV:HEAD "$NPATH" | sed -ne '
/^--*$/{
n
s/^r\([0-9][0-9]*\) |.*$/\1/
h     
}
/^This commit was manufactured by cvs2svn/{
g
p
}')
HEADREV=$(svn log -q -rHEAD "$NPATH" | sed -ne '2s/^r\([0-9]*\) .*$/\1/p')
TAGCOUNT=$(echo $TAGREVS | wc -w)
REVCOUNT=$(($HEADREV - $LASTREV))
echo "$TAGCOUNT steps, $REVCOUNT revisions."
trap "svk mirror --unlock $KPATH" 1 2 3 15
for NEXTREV in $TAGREVS
do
echo "Syncing to next cvs2svn tag at $NEXTREV"
svk sync -t $NEXTREV "$KPATH"
done
# Finish up.
svk sync "$KPATH"

-- Zack, 6 Nov 2005

Svk and SVNADMIN on Windows Binary builds...

Hi! Am using SVK as provided by the Windows installer.

The problem is, most "svk admin" commands don't work as the system complains:

>svk admin help
'svnadmin' is not recognized as an internal or external command, operable program or batch file.

I don't have Subversion installed, nor did I believe it was necessary to work with SVK

Is there anything I might be missing? Thanks a lot.

there is SVK depot path in one system. how do i check out from the local copy of that machine to other machine? how do i check out from a remote repository? without creating local copy of it in the local machine.

smerge and empty changes

I am trying to smerge all the changes from one repository to another:

svk smerge -I -l -B DEPOTPATH1 DEPOTPATH2

The repository in DEPOTPATH1 contains an empty file 'ChangeSet'. There are some revisions that contain a fake change on that file (it is always empty and nothing really changes). I am interested in being able to smerge those revisions from one repository to another to retain the log message. Is there some way to force smerge to not ignore empty changes, something like --merge-empty switch?

Background: I exported repository from BitKeeper. The export process creates empty changes on an empy file called 'ChangeSet' to retain BitKeeper comments for changesets. For example I get something like that:

r3218 (orig r667): xxxxx | 2005-05-08 19:19:58 +0200

Changed paths:

M  /personal-mirror/trunk/ChangeSet

Work in progress.

BKrev: 427e4a3eI7PqYvkVs84gluIrYI59Aw

There were no real changes to the file but the comment for BitKeeper changeset is there. When svk is merging this is what I get:

===> Auto-merging (3217, 3218) /personal-mirror to /personal-local (base /personal-mirror:3217).

Empty merge.

I'd appreciate any help.


What does SVK actually stand for???

my guess would be: SubVersionKeeper :P

Gerard Braad (g_braad)

/See SVKMeaning./


How do I not lose the change history when moving a file?

[jbeasley@data bar]$ svk log foo.txt


r21: jbeasley | 2005-07-08 14:35:45 -0700

 

added a line


r20: jbeasley | 2005-07-08 14:35:29 -0700

 

added foo.txt


[jbeasley@data bar]$ svk move foo.txt bar.txt

D foo.txt

A bar.txt

[jbeasley@data bar]$ svk commit

[jbeasley@data bar]$ svk log bar.txt


r22: jbeasley | 2005-07-08 14:53:55 -0700

 

renamed foo to bar


Why isn't the log history for foo in bar?

- Julien

Try svk log -x or --cross. It's not actually lost. It can be slow to retrieve the entire log after a copy, so SVK doesn't do it by default./

How do I merge the difference between two mirrored releases into my local copy?

I want to be able to merge the difference between two tags into a local branch: Say I have //mirror/tags/release_1, and //mirror/tags/release_2. At some point I've done svk smerge //mirror/tags/release_1 //local/trunk. Now, svk smerge //mirror/tags/release_2 //local/trunk doesn't do the right thing /at all/. It tries to re-merge changes from before release 1.

Hm. Looking at it further, it seems in subversion this would perhaps be done with the three-argument version of merge. The lack of this in SVK basically means that you cannot freely use tags in place of revision numbers. That's bad, since that's what tags are for.

Another option is to use patches, I guess, but that seems rather convoluted.

-- MatijsVanZuijlen

Automate SVK

I've been looking everywhere and can't find any information on how to make SVK do automatic syncs with the main server say every n hours. Specifically, is there a way to run SVK as a service or does this need to be a scheduled batch script? How would one deal with supplying authentication information to subversion?

http://chrison.net/MirrorMirrorOnTheWall.aspx says I can use svnserve -d -r c:\svkroot to create a scheduled task but when I run that command the command prompt kind of hangs

--whiskers

I want '.cvsignore' equivalent for SVK. How can I?

I've been used CVS for my $HOME and it worked very well.

And now I'm trying to switch SVK.

In my $HOME, there are many 'not-to-be managed' files

(ie. Large log files, photos, musics and Excel files).

Since these filenames doesn't fit to predefined 'ignore' pattern,

I need 'one-by-one' way to ignore these files. In CVS,

'.cvsignore' for each directory dit it.

Does SVK have this kind of feature?

I've just read SVK::XD::_delta_dir, but I can't find an easy way

to achieve this.

--hkoba

Use 'svk propedit svn:ignore .' to manipulate the svn:ignore property. Add filenames to ignore, one per line. * is a wildcard. Put a * on a line by itself to ignore everything in this directory.

Why PROPFIND is root?

  • https://example.org/svn/aaa/trunk
    • Permission allowed.(trunk/*)
  • https://example.org/svn/aaa
    • Permission denied.

% svk mirror https://example.org/svn/aaa/trunk

>Authorization failed: PROPFIND request failed on '/svn/aaa': PROPFIND of '/svn/aaa': authorization failed (example.org)

"svn co" no problem.

Why?

Clarification of "pull" vs "sync", "mirror" vs "copy", "commit" vs "push"

My question may be its own answer. I just need to know if I'm right, and if not, how.

  • setup
    • mirror -- relates a path in a depot to a remote repository of some sort.
    • copy -- relates a source and destination path within an SVK depot.
    • checkout -- relates any depot path to a working directory
  • download
    • sync -- updates a local "mirror" path with changes from the remote repository it "mirrors"
    • update -- pulls changes into a working directory
    • pull -- sync+update: pulls changes through the entire chain of relation to the destination path
  • upload
    • commit -- pushes changes from a working directory to its depot path
    • push -- propagates changes from a depot path through all its "parents"

So...

#            from                        to
svk mirror   http://upstream.com/project //mirror/project # upstream  -> mirror
svk copy     //mirror/project            //copies/project # mirror    -> repo copy
svk checkout //copies/project                   ~/project # depot copy -> working copy
# upstream made changes... ("->" means "changes applied to")
svk sync //mirror/project    # upstream -> mirror
svk pull //copies/project    # upstream -> mirror -> depot copy (or copies)
svk pull        ~/project    # upstream -> mirror -> depot copy -> working copy
svk up          ~/project    #                       depot copy -> working copy
svk up -m       ~/project    #             mirror -> depot copy -> working copy
svk up -s       ~/project    # upstream -> mirror -> depot copy -> working copy
# I made changes...
svk commit ~/project         # working copy -> repo copy
svk push   ~/project         #                 repo copy -> mirror -> upstream
svk push   //mirror/project  #                              mirror -> upstream

I think that's everything. In any case, I'd love to see an accurate version of this in the manual or something.

RobertDeForest - robert 'at' defore 'dot' st.

Recovering lost state after clearing a lock

Occasionally you may be informed that you might have to remove a lock:

svk mirror --unlock //mirror/foo

There is a bug that following this with an "svk sync --all" might result in svk dying with the message:

no headrev at /usr/share/perl5/SVN/Mirror/Ra.pm line 159.

If you get this message, try the following, and if it works, do the sync again.

svk mirror --recover //mirror/foo