Mercurial
Jump to navigation
Jump to search
Contents
Installation
Creating
Renaming files
To rename a file in a mercurial repository, use the rename (or mv command after the hg command. For example to rename oldfile.txt to newfile.txt, do this command:
hg rename oldfile.txt newfile.txt
This will move the file to the new name as well as stop mercurial from monitoring the old filename and have it start monitoring the new file for changes.
Running the hg status command will display one addition and one removal to the repository:
hg status A newfile.txt R oldfile.txt
Links
- Mercurial homepage.
- HgInit: a Mercurial tutorial by Joel Spolsky.
- Mercurial Wikipedia entry.
- Mercurial: The Definitive Guide by Bryan O'Sullivan (alternate location).
- Why I chose Mercurial Dave Dribin.