Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I alias commands in svn?

I want to add some aliases for svn command in macOS system. For example:

svn ci "Some message" // equal to svn commit -m "Some message"
svn addall // equal to svn add --force * --auto-props --parents --depth infinity -q

What have I do to achieve this?

I am newb in svn, previously I use git and all aliases were created in .gitconfig file. Is this possible in the same way in svn?

UPDATE

Regarding this answer note, after adding the following lines in ~/.subversion/config file :

alias ciam = "commit -m" 

[alias]
ciam = commit -m

the command:

svn ciam 

still not working.

Is it another way possible to define svn aliases?

like image 980
kamwysoc Avatar asked Nov 14 '16 08:11

kamwysoc


Video Answer


1 Answers

You would need to define bash aliases (and not svn configs), as the ones proposed in xentek's gist

# add everything that needs to be added based on results of svn status
alias svnadd="svn st | grep \? | awk '''{print \"svn add \"$2 }''' | bash" 

In this answer, for instance:

added an alias to ~/.bashrc:

alias svn-add-unversioned="svn st | grep '^\?' | sed 's/^\? *//' | xargs -I% svn add %" 

Now I just type svn-a and hit tab, enter!

In your case, you can define alias svnaddall to your command (mentioned in "How do I SVN add all unversioned files to SVN?").


Note: that are subversion config file (~/.subversion/config or /etc/subversion/config), but it won't include alias definition.

like image 185
VonC Avatar answered Sep 21 '22 18:09

VonC