Best way to check if file is under Bazaar's control from a script
Nicholas Allen
nick.allen at onlinehome.de
Sun Sep 7 11:23:57 BST 2008
-----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]; ....
Nicholas Allen wrote:
> Hi,
>
> I would like to know if a given file is under Bazaar version control or
> not (i.e it exists in Bazaar's repository) from a script (actually my
> Eclipse plugin which just executes Bazaar commands).
>
> What is the best way to do this? I could just do bzr ls --versioned
> path/to/file and see if anything is printed to stdout. Is that the
> easiest way?
>
> Cheers,
>
> Nick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIw6u91+i51gqqEGkRApUZAKC0srmu2PAGN33ezrBiBiSMpEnXVACgsFU3
ZxmA9JUyd/O/y/NJChoqEwA=
=Pf89
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list