File | Date | Author | Commit |
---|---|---|---|
.hgignore | 2022-01-05 |
![]() |
[82b4bc] Initial load |
README.md | 2022-01-07 |
![]() |
[b618f2] Readme fixed as hook cannot tell accurately whe... |
edit | 2022-01-05 |
![]() |
[82b4bc] Initial load |
stat-repos | 2022-01-06 |
![]() |
[629d86] Rename again |
This utility will traverse down through a directory tree and identify all mercurial repositories found within the tree.
This utility will only function using the bash
scripting language in Linux.
The utility utilises a number of simple hooks that should be included in the Mercurial configuration file. This may be the users configuration file (at $HOME/.hgrc
) or the system wide configuration file (at /etc/mercurial/hgrc
or in /etc/mercurial/hgrc.d/
).
The following lines should be included within the files:
[hooks]
# The following lines were added to help find-repos utility.
commit = echo >>./.hg/hgactivity.log "$(date '+%F %T') : Committed."
preoutgoing = echo >>./.hg/hgactivity.log "$(date '+%F %T') : Sent."
The absence of these lines in the configuration file will not cause the utility to fail, but it will reduce the information it can report on.
The format of the command to invoke the utility is:
stat-repos
list-of-directories
Each of the directories included in the list-of-directories will be searched for included repositories.
stat-repos . ../show-user
Searching:"/home/ggb/Dev/stat-repos"
- Repo: "/home/ggb/Dev/stat-repos"
Last-action: "2022-01-06 00:16:54 : Committed"
Status:
- branch: default
commit: 1 unknown (clean)
Paths:
---
Searching:"/home/ggb/Dev/show-user"
- Repo: "/home/ggb/Dev/show-user"
Last-action: "2022-01-06 22:21:35 : Committed"
Status:
- branch: default
commit: (clean)
Paths:
- default: "ssh://ggb-sw@hg.code.sf.net/p/showuser/code"
---
The output is valid YAML.
Each directory in the list specified on command line will generate a seperate YAML document (seperated by ---
).