mercurial - Removing a file from TortoiseHg

23
2013-11
  • bergin

    I'm having problems removing a file from TortoiseHg.

    I make the clone, and there are a few test files which I want out. What is the procedure for removing a file from the repository?

  • Answers
  • nicorellius

    If you are using the GUI, you can right click on your local directory and choose repository explorer to see what the branches look like. Then, you will want to remove the files locally, and then next time you commit and push changes they will be gone. To do this you would right click on the files you want to remove and choose "remove." It may prompt you to confirm this "clean." Then, commit and push changes. When you finsih this, log into your repository (i.e, bitbucket.org, kiln) and confirm your changes.

    If you want to do this through the command line, type:

    hg -? in Windows to see list of commands. Or, type:

    hg --help in Linux for the help list.


  • Related Question

    mercurial - Getting parent repository path
  • Jeffrey04

    I have a cloned mercurial repository (and working copy) in my own machine. Is it possible if I want to know the parent path to a specific file? For example, I cloned a repository that contains a file at

    http://foo/bar/hgwebdir.cgi/repository/file_a
    

    and file_a is located in my machine at

    /home/jeffrey04/documents/repository_clone/file_a
    

    Is there a command that I can use to get the parent path (the first url) of file_a ??!


  • Related Answers
  • Justin Love

    hg paths will show the repository path, and hg root your current repository. I think you'd have to do the path munging yourself, however.

    I understand hg extensions can be as simple as a python file, so might be easy to write yourself.