Re: I forgot to push
Rick Richardson <[email protected]> Tue, 2 Nov 2004 09:27:04 -0600
| Newsgroups | gmane.comp.version-control.bitkeeper.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Nov 02, 2004 at 06:50:19AM -0800, Larry McVoy wrote:
> On Tue, Nov 02, 2004 at 08:45:53AM -0600, Rick Richardson wrote:
> > Is there a *hideously fast* way I can tell if I have unpushed changes
> > that I could add to my "cd" alias for when I enter a repo?
>
> You could put some triggers in your repo, one post-commit which touches
> BitKeeper/log/needs_push and one post-outgoing which removes that file.
> Then all your cd command has to do is
>
> test -f BitKeeper/log/needs_push && echo This repo has unpushed changes
>
> How's that?
Sub-optimal, because I'd have to change dozens of existing repos to
make it work. Of course, I'd forget to do it to the one that really
needs it. I'd need something like a way to add "personal" triggers
that would effectively apply to any and all repos I had out. So I
could add the trigger in just one place, probably in a dot directory
under my $HOME.
I suppose for now I will bite the 1/2 second bullet and put
if [ -d BitKeeper ]; then
bk parent
_changes=$(bk changes -L)
[ "" != "$_changes" ] && echo This repo has unpushed changes
in my cd alias. That should always work, no?
-Rick
--
Rick Richardson [email protected] http://home.mn.rr.com/richardsons/
Linux tools for geocaching http://geo.rkkda.com
High oil prices encourage drilling and alternative energy research.
_______________________________________________
Bitkeeper-users mailing list
[email protected]
http://bitmover.com/mailman/listinfo/bitkeeper-users
To unsubscribe from this list, go to the above URL, follow instruction at the bottom of the web page.