I've just set up SourceTree and BitBucket (with Mercurial) so that I can track revisions of my personal scripts and libraries and access them from other machines on occasion. I'm concerned about forgetting to commit changes I make, so I'd like to set up a cron job (or actually, a launchd job, since I'm using a Mac) to check for uncommitted changes and alert me if there are any. I'm new to cloud source control, but I think what I want is to run the equivalent of "hg diff". My working copy will always be in the same place. I ran "Install command line tools" in SourceTree but as far as I can tell that only gave me a tool called stree that serves a different purpose. What should I do? Should I install regular command line Mercurial (looks like from http://mercurial.berkwood.com/) or will that installation fight with SourceTree?
You can choose which hg binaries you want to use in SourceTree preference which means you can use both binaries at the same time.
I used this (http://www.macupdate.com/app/mac/7486/cronnix) to run bash scripts. You could create your own scripts and check if there are any files that are not changed:
You can test out the various scenarios, grep the output and do something with it (http://apple.stackexchange.com/questions/57412/how-can-i-trigger-a-notification-center-notification-from-an-applescript-or-shel)
Thank you, Timothy. Am I right that SourceTree's embedded Mercurial is not accessible (e.g., from the command line)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure. Never tried to find them before.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does SourceTree for Mac have a terminal button? If so, does it launch a terminal emulator (on windows it launches mingw), or just the standard Mac terminal in a special location?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, ST for Mac has a terminal button. It just opens up the regular terminal at the location of the repository on disk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then I expect you can run embedded Mercurial from the terminal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then I expect you can run embedded Mercurial from the terminal.
How would I do this? I've tried just running "hg diff" at the prompt, and "find / -name hg" does not find anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you just need to be contextually specific. When you run any command from the terminal it uses your PATH as a reference. At the terminal, type "echo $PATH" and you'll see a load of output. Those are colon-separated paths which are used in order of appearance to find whatever it is you're calling from the terminal.
To call the SourceTree version in specific you'd have to specify the path explicitly, so "/path/to/the/hg/install/hg <command>".
Hope that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kieran, do you know what the default path is to embedded hg?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The command I wanted (to plug into a script as described by Timothy C.) was:
/Applications/SourceTree.app/Contents/Resources/mercurial_local/hg_local diff
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, everyone. For posterity the command I wanted was:
/Applications/SourceTree.app/Contents/Resources/mercurial_local/hg_local diff
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.