easiest way to copy the SVN URL of a directory, to the system clipboard

922 views
Skip to first unread message

Jason S

unread,
Jul 30, 2015, 2:11:08 PM7/30/15
to us...@tortoisesvn.tigris.org
I often need to copy the SVN URL of a directory into a file for documentation.

Right now, the way I do it is to open the repo browser. This works (URL is at the top, and is selectable), but our repo browser is SLOW to open, and this seems like an unnecessary step.

Is there a way to quickly copy to the clipboard the SVN URL of a directory using TortoiseSVN? If not, is this a feature that could be added somehow to the SVN log to the window that pops up when you select TortoiseSVN -> Show Log? That window pops up quickly.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129444

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Sébastien Morin

unread,
Jul 30, 2015, 2:15:53 PM7/30/15
to us...@tortoisesvn.tigris.org
In the Windows Explorer, if you go in the properties of the file or folder under source control, you have a Subversion tab that is added and the URL is selectable.

Sébastien Morin , Team Leader–Game Development / Chef d’équipe – Développement de jeux

bluberi gaming technologies inc.
Drummondville, Quebec Canada
819.475.5155 (telephone) 819.475.5156 (fax) bluberi.com


------------------------------------------------------------------------------------------
This email and any attachments transmitted with it are personal, privileged and confidential and solely for the use of the individual to whom they are addressed and intended. If you have received this email in error, please notify the sender by return email. If you are not the intended recipient or if you believe that you are not, you are hereby notified that the dissemination, distribution, plagiarism or copying of this email and attachments transmitted with it is strictly prohibited.

Ce courriel et les pièces jointes s'y rattachant sont de nature personnelle, privilégiée et confidentielle et pour l'usage exclusif du destinataire à qui ils sont adressés et destinés. Si vous avez reçu ce courriel par erreur, veuillez s'il vous plaît le renvoyer à l'expéditeur. Si vous n'êtes pas le bon destinataire ou si vous croyez ne pas l'être, nous vous informons immédiatement que la publication, la distribution, la diffusion, la copie ou le plagiat de ce courriel et de ses pièces jointes est strictement interdit.
------------------------------------------------------------------------------------------

-----Message d'origine-----
De : Jason S [mailto:jms...@gmail.com]
Envoyé : 30 juillet 2015 14:11
À : us...@tortoisesvn.tigris.org
Objet : easiest way to copy the SVN URL of a directory, to the system clipboard

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129444

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129445

Geoff Field

unread,
Jul 30, 2015, 10:19:48 PM7/30/15
to us...@tortoisesvn.tigris.org
> De : Jason S [mailto:jms...@gmail.com]
>
> I often need to copy the SVN URL of a directory into a file
> for documentation.
>
> Right now, the way I do it is to open the repo browser. This
> works (URL is at the top, and is selectable), but our repo
> browser is SLOW to open, and this seems like an unnecessary step.
>
> Is there a way to quickly copy to the clipboard the SVN URL
> of a directory using TortoiseSVN? If not, is this a feature
> that could be added somehow to the SVN log to the window that
> pops up when you select TortoiseSVN -> Show Log? That window
> pops up quickly.
>
> ------------------------------------------------------
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129444
>
> To unsubscribe from this discussion, e-mail:
> [users-un...@tortoisesvn.tigris.org].
>
> From: Sébastien Morin
>
> In the Windows Explorer, if you go in the properties of the
> file or folder under source control, you have a Subversion
> tab that is added and the URL is selectable.

Hi Jason,

We have a set of Python scripts that have been implemented using a right-click menu:
1) Show SVN URL
2) Copy Latest SVN URL
3) Copy Specific SVN URL

I suspect these rely on the command-line SVN tools being in the path.

If you like, I can send the installation files to you off-list. I have been able to find the original Python files as well.

Regards,

Geoff

--
Apologies for the auto-generated legal boilerplate added by our IT department:


- The contents of this email, and any attachments, are strictly private
and confidential.
- It may contain legally privileged or sensitive information and is intended
solely for the individual or entity to which it is addressed.
- Only the intended recipient may review, reproduce, retransmit, disclose,
disseminate or otherwise use or take action in reliance upon the information
contained in this email and any attachments, with the permission of
Australian Arrow Pty. Ltd.
- If you have received this communication in error, please reply to the sender
immediately and promptly delete the email and attachments, together with
any copies, from all computers.
- It is your responsibility to scan this communication and any attached files
for computer viruses and other defects and we recommend that it be
subjected to your virus checking procedures prior to use.
- Australian Arrow Pty. Ltd. does not accept liability for any loss or damage
of any nature, howsoever caused, which may result
directly or indirectly from this communication or any attached files.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129511

Geoff Field

unread,
Jul 30, 2015, 11:30:57 PM7/30/15
to us...@tortoisesvn.tigris.org
> From: Geoff Field [mailto:Geoff...@aapl.com.au]
> ------------------------------------------------------
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129511
>
> To unsubscribe from this discussion, e-mail:
> [users-un...@tortoisesvn.tigris.org].

Correction: The ones we actually use are Auto Hot-Key scripts. I don't think we ever got the Python version going reliably.

The scripts aren't big: Neither are the compiled executables.

For example, the active text of the Auto Hot-Key script to copy the head URL is:

; Script Function:
; Output the latest rev url of the file in the clipboard
; Requires the user to select the relevant file/folder, then press the hotkey combination

; copy the filename to the clipboard
clipboard = ; Empty the clipboard

; ensure a long path name is used, as SubWCRev.exe does not support short path names
Loop, %1%, 1
vLongPathName = %A_LoopFileLongPath%

; get svn info from the copied file into the clipboard
vSrcFile = %A_Temp%\svnUrlSrcFile.txt
IfExist, %vSrcFile%
{
FileDelete, %vSrcFile%
}
FileAppend,
(
$WCURL$
$WCREV$
), %vSrcFile%
vDestFile = %A_Temp%\svnUrlDestFile.txt
FileDelete, %vDestFile%
command = SubWCRev.exe "%vLongPathName%" %vSrcFile% %vDestFile% -f
RunWait, %command%,, Hide

IfNotExist, %vDestFile%
{
vMessage = Error: The selected file/folder is not a Subversion working copy!
MsgBox,, Latest Version Subversion URL, %vMessage%
}
Else
{
FileReadLine, vUrl, %vDestFile%, 1
FileReadLine, vRev, %vDestFile%, 2
If vUrl =
{
vMessage = Error: The selected file/folder is not a Subversion working copy!
MsgBox,, Latest Version Subversion URL, %vMessage%
}
Else
{
;modify the url for wsvn
StringReplace, vGeneralUrl, vUrl, Subversion, wsvn
vSpecificUrl := vGeneralUrl . "?rev=" . vRev
;replace spaces with %20 for pasting into mantis and emails
vUrl := RegExReplace(vUrl, " ","%20")
;output url
clipboard := vUrl
}
}

For the specific version, the output to the clipboard uses vSpecificUrl

--
Apologies for the auto-generated legal boilerplate added by our IT department:


- The contents of this email, and any attachments, are strictly private
and confidential.
- It may contain legally privileged or sensitive information and is intended
solely for the individual or entity to which it is addressed.
- Only the intended recipient may review, reproduce, retransmit, disclose,
disseminate or otherwise use or take action in reliance upon the information
contained in this email and any attachments, with the permission of
Australian Arrow Pty. Ltd.
- If you have received this communication in error, please reply to the sender
immediately and promptly delete the email and attachments, together with
any copies, from all computers.
- It is your responsibility to scan this communication and any attached files
for computer viruses and other defects and we recommend that it be
subjected to your virus checking procedures prior to use.
- Australian Arrow Pty. Ltd. does not accept liability for any loss or damage
of any nature, howsoever caused, which may result
directly or indirectly from this communication or any attached files.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129520

Stefan Küng

unread,
Jul 31, 2015, 9:02:16 AM7/31/15
to us...@tortoisesvn.tigris.org
On 31.07.2015 05:30, Geoff Field wrote:

> Correction: The ones we actually use are Auto Hot-Key scripts. I don't think we ever got the Python version going reliably.
>
> The scripts aren't big: Neither are the compiled executables.
>
> For example, the active text of the Auto Hot-Key script to copy the head URL is:
[snip]
>
> For the specific version, the output to the clipboard uses vSpecificUrl
>

Or: shift-right-click on the wc-folder, and then in the TSVN submenu
select "copy url to clipboard".

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129567

Geoff Field

unread,
Aug 2, 2015, 7:26:50 PM8/2/15
to us...@tortoisesvn.tigris.org
> From: Stefan Küng
>
> On 31.07.2015 05:30, Geoff Field wrote:
>
> > Correction: The ones we actually use are Auto Hot-Key
> scripts. I don't think we ever got the Python version going reliably.
> >
> > The scripts aren't big: Neither are the compiled executables.
> >
> > For example, the active text of the Auto Hot-Key script to
> copy the head URL is:
> [snip]
> >
> > For the specific version, the output to the clipboard uses
> > vSpecificUrl
> >
>
> Or: shift-right-click on the wc-folder, and then in the TSVN
> submenu select "copy url to clipboard".

Sorry Stefan, but I don't see that option from Windows Explorer in my Windows 7 system running TSVN 1.8.11.

In the Repo Browser, just a normal right-click will give you that option.

Regards,

Geoff

--
Apologies for the auto-generated legal boilerplate added by our IT department:


- The contents of this email, and any attachments, are strictly private
and confidential.
- It may contain legally privileged or sensitive information and is intended
solely for the individual or entity to which it is addressed.
- Only the intended recipient may review, reproduce, retransmit, disclose,
disseminate or otherwise use or take action in reliance upon the information
contained in this email and any attachments, with the permission of
Australian Arrow Pty. Ltd.
- If you have received this communication in error, please reply to the sender
immediately and promptly delete the email and attachments, together with
any copies, from all computers.
- It is your responsibility to scan this communication and any attached files
for computer viruses and other defects and we recommend that it be
subjected to your virus checking procedures prior to use.
- Australian Arrow Pty. Ltd. does not accept liability for any loss or damage
of any nature, howsoever caused, which may result
directly or indirectly from this communication or any attached files.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129905
TSVN_ShiftRightClickScreenShot.png

Daniel Stiefelmaier

unread,
Aug 3, 2015, 6:58:58 AM8/3/15
to us...@tortoisesvn.tigris.org
> >
> > > Correction: The ones we actually use are Auto Hot-Key
> > scripts. I don't think we ever got the Python version going reliably.
> > >
> > > The scripts aren't big: Neither are the compiled executables.
> > >
> > > For example, the active text of the Auto Hot-Key script to
> > copy the head URL is:
> > [snip]
> > >
> > > For the specific version, the output to the clipboard uses
> > > vSpecificUrl
> > >
> >
> > Or: shift-right-click on the wc-folder, and then in the TSVN submenu
> > select "copy url to clipboard".
>
> Sorry Stefan, but I don't see that option from Windows Explorer in my
> Windows 7 system running TSVN 1.8.11.
>
> In the Repo Browser, just a normal right-click will give you that option.
>
> Regards,
>
> Geoff

I don't see that menu entry either.

I usually do this:
Open the commit dialog, copy the URL displayed at the top.
(Yes, it actually is selectable!)

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3129946

Stefan Küng

unread,
Aug 3, 2015, 12:33:53 PM8/3/15
to us...@tortoisesvn.tigris.org
On 03.08.2015 09:58, Daniel Stiefelmaier wrote:
>>>
>>>> Correction: The ones we actually use are Auto Hot-Key
>>> scripts. I don't think we ever got the Python version going reliably.
>>>>
>>>> The scripts aren't big: Neither are the compiled executables.
>>>>
>>>> For example, the active text of the Auto Hot-Key script to
>>> copy the head URL is:
>>> [snip]
>>>>
>>>> For the specific version, the output to the clipboard uses
>>>> vSpecificUrl
>>>>
>>>
>>> Or: shift-right-click on the wc-folder, and then in the TSVN submenu
>>> select "copy url to clipboard".
>>
>> Sorry Stefan, but I don't see that option from Windows Explorer in my
>> Windows 7 system running TSVN 1.8.11.
>>
>> In the Repo Browser, just a normal right-click will give you that option.
>>
>> Regards,
>>
>> Geoff
>
> I don't see that menu entry either.
>
> I usually do this:
> Open the commit dialog, copy the URL displayed at the top.
> (Yes, it actually is selectable!)

The option is available in the upcoming 1.9 release.

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3130006
Reply all
Reply to author
Forward
0 new messages