bzr status is silent on two disparate situations

John Arbash Meinel john at arbash-meinel.com
Thu Apr 24 23:37:33 BST 2008


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

Rahul Nabar wrote:
> Here's another cycle I find myself repeating often these days:
> 
> bzr status ~/foo
> bzr log ~/foo
> bzr: ERROR: Path does not have any revision history: ~/foo
> bzr add ~/foo
> bzr commit ~/foo
> bzr status ~/foo
> 
> Ideally I'd wish to run a single:
> 
> bzr my_command file
> 
> *************pseudocode********************
> file is being currently versioned?
> no:
>     add
>     commit
> yes:
>     file up-to-date?
>     no:
>          commit
>     yes:
>         die without a noise.
> *****************************
> 
> 
> 
> I'm thinking of writing a shell wrapper to do this but thought this
> might be a pretty common situation that bzr might want to cover it
> internally. I thought it somewhat non-intuitive that bzr status is
> silent on two very different occasions (1) If a file is being
> versioned and is up-to-date
> (2) If a file is not being versioned at all!
> 
> When one edits a file  it'd be convenient to just do a quick bzr
> status to see if a file is up-to-date-or-not AND  versioned-or-not.
> Otherwise there's the risk of a newbie  seeing a silent bzr status and
> assuming a file is up-to-date whereas in reality one just forgot to
> bzr add it.
> 
> Just curious....

It depends if a file is ignored or not. If a file is not ignored then doing:

'bzr status X'
will report that it is 'unknown'.

I'm guessing you are running into this because you have '*' in your
ignore patterns.

'bzr status X' says if anything needs to happen to X, and if it is
ignored, then it doesn't need to be added or committed, because you have
it marked as ignored.

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

iD8DBQFIEQutJdeBCYSNAAMRAkx4AJ94wfJC3hU2yW4WtcuiJ4pUHHtWaQCdH1ch
h8jFDUmq5NT6WbRl+m6udUI=
=X+I8
-----END PGP SIGNATURE-----



More information about the bazaar mailing list