Best way to check if file is under Bazaar's control from a script
Andrew Bennetts
andrew at canonical.com
Sun Sep 7 11:37:44 BST 2008
Nicholas Allen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I think it would be nice if there was a command is-versioned and this
> would exit with code 0 if not versioned and 1 if versioned.
>
> Then you could easily use this in bash scripts:
>
> if [bzr is-versioned some_file]; ....
There's this:
bzr file-id blah > /dev/null 2>&1
That will exit with 0 if versioned or 3 if not versioned.
-Andrew.
More information about the bazaar
mailing list