Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial: R with 'hg status', how to commit?

Tags:

mercurial

If I do 'hg status' and see the following:

R flash/AC_OETags.js

it seems to mean that there is no file there, but there has been one at some point that has been removed.

How do I 'commit' this change so it stops showing up when I do 'hg status'?

==UPDATE==

The answer seems to be to commit the file. Actually, there are ~100 files with status R because I removed an entire directory tree. Anyone know how to commit all files in a directory tree in one go?

I don't want to do just hg commit, because there are other changes too.

like image 819
AP257 Avatar asked Oct 12 '10 15:10

AP257


People also ask

What does hg mean in Mercurial?

hg status shows the status of a repository. Files are stored in a project's working directory (which users see), and the local repository (where committed snapshots are permanently recorded). hg add tells Mercurial to track files. hg commit creates a snapshot of the changes to 1 or more files in the local repository.

What is the use of hg command?

The hg command provides a command line interface to the Mercurial system.

How do you push in Mercurial?

From the main menu, choose VCS | Mercurial | Push. The Push Commits dialog opens showing all Mercurial repositories (for multi-repository projects) and listing all commits made in the current branch in each repository since the last push.


2 Answers

The “R” means “Removed” so the next time we commit in Mercurial this file will be removed. (The history of the file will remain in the repository, so of course we can always get it back).

therefore run your hg commit command and all will be well

Thanks to hginit.com for that titbit - its my Mercurial bible

like image 155
stack72 Avatar answered Oct 04 '22 16:10

stack72


You can commit just that file:

hg commit flash/AC_OETags.js

however having "masses of other uncommitted files" is terrible process. You need to come up with a workflow that lets you commit frequently.

like image 31
Ry4an Brase Avatar answered Oct 04 '22 16:10

Ry4an Brase