[MERGE] Fix for 306394: warning, not error, on non-existent file.
John Arbash Meinel
john at arbash-meinel.com
Tue Dec 30 14:23:51 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ian Clatworthy wrote:
> Aaron Bentley wrote:
>> Karl Fogel wrote:
>>> Aaron Bentley <aaron at aaronbentley.com> writes:
>>>>>> Why is it bad to error on a non-existent file? What are the use cases?
>
>> But from my POV, that's not what status is for. It's for asking about
>> files that are versioned, or might be versioned. Asking about files
>> that don't exist suggests a deeper error, so it makes sense to me to
>> stop. It also keeps the exit codes simple.
>>
>> I expect there are two common usages for "status":
>> - "bzr status"
>> - "bzr status $FILE"
>>
>> For "bzr status $FILE", it might as well be an error. It's only when
>> you're listing multiple files that it really makes a difference. And
>> listing multiple files at the commandline is usually not worth the effort.
>
> There's another (pending) example where reporting non-existence will
> be better than generating an error: filtered views. If a user creates
> a view, then the list of files in that view is effectively implicitly
> given to commands like status and commit. Removing one of those files
> shouldn't stop status from reporting about the rest. (Furthermore, it
> would be wrong to immediately remove the file from the view when it
> is 'bzr remove'd - the removal needs to be committed first.)
Just to mention, I would expect filtered views to be used on *versioned*
files. Having a file not present just shows up as "missing/removed". The
point of this thread is doing something like:
bzr init test
cd test
bzr status file_which_never_existed
Or more importantly
touch one_file
bzr add one_file
bzr status one_file another_file_no_exist
So doing "rm one_file; bzr status one_file" will do the right thing,
because it used to be versioned, and now doesn't exist. So I don't think
this will effect filtered views.
Then again, you could do something like:
bzr init test
cd test
bzr view files don't exist yet
At which point, it would. I'm not sure what your use case is for using
views to filter non-versioned files.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklaLvcACgkQJdeBCYSNAAMIggCeLqG/xr9gdS7tDkWyVV24zRh8
UewAn16sJcW8j0GWkJg/rXQjfDX4Bp9/
=lnKT
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list