--user option

Ivan Glushkov gli.work at gmail.com
Tue Feb 27 12:02:45 PST 2007


On Tue, 27 Feb 2007 22:23:55 +0300, Vlad Skvortsov <vss at 73rus.com> wrote:

> Иван Глушков wrote:
>
> [skipped]
>> I also reopened i#98 as filter "my" doesn't understand environment
>> variable $DITRACK_USER:
>>
>> $ grep my etc/filters
>> 0.5-my: Due-in=0.5,Status=open,Owned-by=$USER
>> my: Status=open,Owned-by=$USER
>> $ echo $USER
>> glushkov
>> $ echo $DITRACK_USER
>> gli
>> $ ./dt ls my
>> $ USER=gli ./dt ls my
>> 80   gli      0.7      open   DITRACK_ROOT messes up the test suite
>> 124  gli      0.6      open   svn:ignore an LMA (.ditrack)
>> 137  gli      0.6      open   'act' is case-sensitive to issue names
>>
>> This behaviour differs from that in our ChangeLog:
>>
>
> No, it doesn't. We never claimed that either '--user' or DITRACK_USER  
> override the value of the USER environment variable. We claimed that  
> '--user', DITRACK_USER and USER are the ways to communicate the user id  
> to DITrack -- which holds true. We claimed that one may reference  
> environment variables from within predefined filters -- which is also  
> true.

you are absolutely right.
so i'll close i#98.

>> "It is now possible to specify user id through the '--user'/'-u'  
>> command line
>> option or by setting the DITRACK_USER environment variable (i#98)."
>>
>> We should create some "synonym" for abstract "ditrack user" to use it
>> in the filters. Without it we can't ensure our announcement.
>> I suppose it can be $USER (as it actually is). Not in the meaning of
>> environment variable, but in the meaning of "ditrack user".
>>
>
> It's a separate issue and I was also thinking about addressing it. I  
> propose to stick to the current syntax to refer to environment variables  
> and come up with alternative notation for DITrack-provided values. We  
> might, for example, use something like:
>
> my: Status=open,Owned-by=%DTUSER

Great!
We should allow users to use environment variables through '$'. And we
could also address to DITrack variables with '%'.
But if '%' already means that it's DITrack-provided value, why do you use
prefix 'DT'. Why not simply '%USER':
my: Status=open,Owned-by=%USER

Or may be to simplify parsing we should use both-side-percent-symbol:
my: Status=open,Owned-by=%DTUSER%
?

Vlad, will you open new issue on me about using DITrack-provided values?

Ivan


More information about the Dev mailing list