Best way to check if file is under Bazaar's control from a script

Nicholas Allen nick.allen at onlinehome.de
Sun Sep 7 12:45:01 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the tip! Perfect ;-)

Nick

Andrew Bennetts wrote:
> 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.
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIw7691+i51gqqEGkRAlhyAKCgP3Uoy2xb4/1YowyjAPO5XtOwYQCfSBP5
RLgin3fG5pY7C4jEt+Hj0CA=
=Gd3M
-----END PGP SIGNATURE-----



More information about the bazaar mailing list