When working on one version-controlled project on my hard drive, I often flip over quickly to another project to make a quick change. By the end of the day I have forgotten about that other change and often find it months later when I enter that repository again. I needed a way to be alerted at the end of each day about any uncommitted changes sitting around on my system.
Thus was born this “uncommitted” script: using either your system locate(1) command or by walking a filesystem tree on its own, it will find version controlled directories and print a report on the standard output about any uncommitted changes still sitting on your drive. By running it from a cron(8) job you can make this notification routine.
Running “uncommitted”
By default “uncommitted” uses the locate(1) command to scan for repositories, which means that it can operate quickly even over very large filesystems like my home directory:
$ uncommitted ~
But you should be warned: because the locate(1) database is only updated once a day on most systems, this will miss repositories which you have created since its last run. To be absolutely sure to see all current repositories, you should instead ask “uncommitted” to search the filesystem tree itself. To do this on your “devel” directory, for example, you would type this:
$ uncommitted -w ~/devel
Not only will the output of “-w” always be up-to-date, but it is usually faster for small directory trees. The default behavior (which can also be explicitly requested, with “-l”) is faster when the directory tree you are searching is very large.
Should you ever want a list of all repositories, and not just those with uncommitted changes, you can use the “-v” verbose option:
$ uncommitted -v ~
You can always get help by running “uncommitted” without arguments or with the “-h” or “–help” options.
Supported VCs
At the moment, “uncommitted” supports:
Mercurial (.hg directories)
Subversion (.svn directories)
It needs to support Git soon, since that DVCS is in widespread use. However, I am not familiar enough with Git’s output to write a function for it myself. When I tried out Git a few minutes ago, its status messages were crazy, with all sorts of hash characters everywhere; it looked like it was suffering from an acute lack of confidence, and was therefore commenting out all of its own output. Anyway, there is probably some simple way to make Git report on uncommitted changes, but I will leave it to a Git fan to figure out how, if they would like to contribute a patch back.
I would also not be opposed to someone contributing a Bazaar plugin. But CVS should probably never be supported by “uncommitted” because that might imply that it is still an acceptible system to be using.
It occurs to me that there might already be some version control abstraction layer that I should be using for this, rather than figuring out how to run each version control system myself; a quick search of PyPI suggests that I take a closer look at the pyvcs project. Maybe that can be a useful direction for the next phase of development!
Metadata
Release files for uncommitted 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uncommitted-1.0.tar.gz | 4.2 kB | Without provenance | Details for uncommitted-1.0.tar.gz |
Release files / uncommitted-1.0.tar.gz
| Download URL | uncommitted-1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1b013a413e6688071fb83ed398fae667952f89c0a48a234cb04f039b728ee9d
|
|
BLAKE2b-256 checksum How to use checksums |
a54764e8a8fb6e698a4a29fbf108fad9e3a202068f1082c3042e7291cd4e5154
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for uncommitted 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.