8

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?

Community
  • 1
  • 1
kamwysoc
  • 6,187
  • 1
  • 31
  • 45

1 Answers1

4

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.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • Your answer is really helpful but it's a kind of a workaround I think. If there is no such a thing like `.svnconfig` I will accept your answer – kamwysoc Nov 14 '16 at 09:24