.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SVNPATH 1" .TH SVNPATH 1 "2019-08-04" "Debian Utilities" " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" svnpath \- output svn url with support for tags and branches .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBsvnpath\fR .PP \&\fBsvnpath tags\fR .PP \&\fBsvnpath branches\fR .PP \&\fBsvnpath trunk\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBsvnpath\fR is intended to be run in a Subversion working copy. .PP In its simplest usage, \fBsvnpath\fR with no parameters outputs the svn url for the repository associated with the working copy. .PP If a parameter is given, \fBsvnpath\fR attempts to instead output the url that would be used for the tags, branches, or trunk. This will only work if it's run in the top-level directory that is subject to tagging or branching. .PP For example, if you want to tag what's checked into Subversion as version 1.0, you could use a command like this: .PP .Vb 1 \& svn cp $(svnpath) $(svnpath tags)/1.0 .Ve .PP That's much easier than using svn info to look up the repository url and manually modifying it to derive the url to use for the tag, and typing in something like this: .PP .Vb 1 \& svn cp svn+ssh://my.server.example/svn/project/trunk svn+ssh://my.server.example/svn/project/tags/1.0 .Ve .PP svnpath uses a simple heuristic to convert between the trunk, tags, and branches paths. It replaces the first occurrence of \fBtrunk\fR, \fBtags\fR, or \&\fBbranches\fR with the name of what you're looking for. This will work ok for most typical Subversion repository layouts. .PP If you have an atypical layout and it does not work, you can add a \&\fI~/.svnpath\fR file. This file is perl code, which can modify the path in \f(CW$url\fR. For example, the author uses this file: .PP .Vb 2 \& #!/usr/bin/perl \& # svnpath personal override file \& \& # For d\-i I sometimes work from a full d\-i tree branch. Remove that from \& # the path to get regular tags or branches directories. \& $url=~s!d\-i/(rc|beta)[0\-9]+/!!; \& $url=~s!d\-i/sarge/!!; \& 1 .Ve .SH "LICENSE" .IX Header "LICENSE" \&\s-1GPL\s0 version 2 or later .SH "AUTHOR" .IX Header "AUTHOR" Joey Hess