Domanda

For example I have a hg versioned project in this path: C:\src\sample_project

Now, lets this project have subfolders, and lets say I'm editing a file inside this project C:\src\sample_project\docs\index.rst.

Having the path of this file C:\src\sample_project\docs\index.rst what is the easiest and most effective way to check if the file is versioned by hg, by either using Windows shell commands, hg.exe or tortoise (thg.exe)?

È stato utile?

Soluzione 2

What you stated is a way, but there is a cleaner one imo. You can use:

hg status -u which lists all unknown (read: not tracked) files in your repository.

Altri suggerimenti

I'll post my doubt as answer.

Command to check if file is versioned: hg status <path> and then if the first character in stdout of this command is ? or a (from abort: no repository found in...) I should assume that file is not versioned.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top