Is it possible to update svn using a windows environmental variable folder?

I have tortoiseSVN installed alongside subversion for windows (not using TortoiseSVN command client tools because of restrictive purposes). I have a batch file that runs an svn update on certain folders which are used as environmental variables in Windows. Is it possible to svn update a folder using just the folder name?

e.g. from this:

cd C:\foo\johnsmith\testing\
svn update

to something like this?

cd testing\
svn update

I should add that environmental variables are new to me... With regards to Alrocs comment, the path C:\foo\johnsmith\testing\ is in the system environmental variable "Path".

Answers


You can't cd to directory, which is part of your $PATH$. But you can use environment variable, which explicitly contain needed path only (after all - variable is just string)

c:\TEMP>echo "%USERPROFILE%"
"C:\Documents and Settings\Badger"

c:\TEMP>cd "%USERPROFILE%"

C:\Documents and Settings\Badger>

Never assume anything about environment variables that you haven't set via your batch file. Just because it's there today/on your computer doesn't necessarily mean it'll be there tomorrow or on another computer.

But you aren't using an environment variable in your script in the first place.

If you need to update a specific path, be explicit and update that path by specifying the whole path. Don't assume that your testing directory will be an immediate child of the directory you're running the batch file in unless you can control everything else - the whole subdirectory structure, where the batch file executes from, and how it executes.


Need Your Help

Can i use LayoutInflater.inflate() to open a new screen

android android-layout screen

I am relatively new to android, i need to open a new screen when a button is clicked.

how to replace characters in hive?

hadoop hive

I have a string column description in a hive table which may contain tab characters '\t', these characters are however messing some views when connecting hive to an external application.

Raise a OnTextChanged event in winforms TextBox

c# winforms

How can I raise an event that will call my OnTextChanged overridden method for my textbox control?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.