How to remove directory within central repository in Mercurial?

If you mean that you want to remove it from the history on the central repository, the answer is that you can't - that's not how version control works If you mean that your remote repository has a working directory that you want the file(s) to disappear from, then you probably need to run hg update on that remote repo.

If you mean that you want to remove it from the history on the central repository, the answer is that you can't - that's not how version control works. If you mean that your remote repository has a working directory that you want the file(s) to disappear from, then you probably need to run hg update on that remote repo.

Thank you but 'hg update' did not work. Any other suggestions? – latvian Oct 22 '10 at 17:42 1 Is there any file left in name_directoriy?

Hg will not remove the directory if some ignored files somehow get in there. – Geoffrey Zheng Oct 22 '10 at 19:49.

What you want to do on the remote repository is: hg update What you've described above removes the files in that directory, and then pushes the change the removes the files up to the remote repository, but it doesn't update the working directory files on the remote repository. To update the working directory on that remote repository you need to run the update command there. As everyone else is pointing out those files, of course, still exist in history, but if you want them out of the working dir it's the update you're missing.

Thank you for replay. The 'hg update' does not do the work. I still can see the deleted directory in the central repository – latvian Oct 22 '10 at 17:34 When you say "see it in the central repository" where are you seeing it?

Are you looking at a web interface (hgweb or bitbucket)? Are you looking at the filesystem and doing a directory listing? Are you actually seeing the files in the directory or just the directory?

What does hg summary say when you run it on the server? Lastly, are you _positive you ran hg update on a shell on the remote server, not locally? – Ry4an Oct 22 '10 at 17:41 ...let me try to answer best I know.It is running on web interface but I am not sure if it is hgweb or bitbucket, how do I tell that?

I am on filesystem and doing "dir" to see. "hg status" does not show since I committed already. Oh I see, I did the update locally but I need to do it on server for server to sync with central, correct?...i will try that in moment and will get back to you.

Thank you again – latvian Oct 22 '10 at 17:49 Looks like the Mercurial Web app is caching per session, so when I refreshed the page the changes in central did not show up. After starting new session(new window opened) the changes in central repository showed up. Thank you....whether the changes were due to 'hg update' or not I cannot tell for sure but I assume it was – latvian Oct 22 '10 at 19:09.

The idea of central repository is foreign to mercurial, all repositories are equal, so the idea of a central repository is only useful when thinking about your workflow. What this means is that the directory is in the history of both your local copy of the repository and the one you call central. Mercurial, as any other SCM, doesn't delete files or directories from the history, as that would defeat its whole purpose, so you'd better ask yourself why you want to delete it, is it something that really can't be there (like a directory full of sensitive medical records in a public repository) or is it just a directory that isn't needed anymore?

, if the answer is the latter, just leave it alone, maybe in the future you'll be glad it's there, if you REALLY need to delete it, take a look around here.

Thank you for replay. Answering the question it is just directory not needed. I would like to delete to avoid confusion for others(imagine 10 or 20 like that kind of directories) and eliminate opportunity for others to use 'deleted' directory.

I think its a enough argument to delete...at last, I don't want to be limited by technology. Again, I am not trying to delete from history but so that it just does not appear there – latvian Oct 22 '10 at 17:40.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions