You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Peter Hercek <pe...@syncad.com> on 2004/07/27 15:04:20 UTC

specifying revisions using their distance (in days) from the current date

Hi all,

This is a proposal for enhancement.

I plan to add it to Subversion Issue Tracker if there are no objections or
better ideas.

Problem:

It is dificult to find out all the log records for commits which happened
in the last x days. The timestamps can be specified only in the absolute
format. One more date format would be accepted by svn to improve this. It
would specify the timestamp as an amount of time we need move back from the
current timestamp. The format would look like this:

'{-' number_of_days_ago (
    'T' number_of_hours_ago (
        ':' number_of_minutes_ago (
            ':' number_of_seconds_ago
        )?
    )?
)? '}'

The format can be easily recongnized from the standard date formats since
t starts with a minus sign (dash).

Examples:
{-3}       would mean 3 days ago (ie Now()-3 provided that Now is a function
           returning the current timestamp)
 {-4T12:30} would mean 3 days, 12 hours and 30 minutes ago


Is it a good proposal? Any better ideas?

Peter.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: specifying revisions using their distance (in days) from the current date

Posted by kf...@collab.net.
"Peter Hercek" <pe...@syncad.com> writes:
> > I like it.  If you add support for year/month, you could have an
> > optional character after what is currently the day number:
> > 
> >    {-3dT12:30}
> >    {-3mT12:30}
> >    {-3yT12:30}
> > 
> > Also, how do you want it to behave when two timestamps are give, that
> > is:
> > 
> >    svn CMD -r{DATE1}:{DATE2}
> > 
> > What if exactly one of those dates is in your new format?  And what if
> > *both* are?
> 
> Hmmm, I'm not committed to implement it myself. I want to add it into
>  the issue list at least if more people think it is a good idea. I may implement
>  it sometimes; although I do not have idea how code contributions are
>  done here yet :)
> 
> I'm not sure about d, m, and y sufixes. I would not have any use for them in
>  my ussage patterns. I would be using this more in situations when I know
>  that something worked a few days ago and want to quickly check what
>  changed from *about* that time. I'm not even sure whether hours and
>  minutes options should be added at all.

If you file an enhancement request (which is fine, though of course no
promises about when it would get implemented, if ever), do make sure
to reference this mail thread in the archives.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: specifying revisions using their distance (in days) from the current date

Posted by Peter Hercek <pe...@syncad.com>.
----- Original Message ----- 
From: <kf...@collab.net>
Newsgroups: gmane.comp.version-control.subversion.user
Cc: <us...@subversion.tigris.org>
Sent: Wednesday, July 28, 2004 12:51
Subject: Re: specifying revisions using their distance (in days) from the current date


> I like it.  If you add support for year/month, you could have an
> optional character after what is currently the day number:
> 
>    {-3dT12:30}
>    {-3mT12:30}
>    {-3yT12:30}
> 
> Also, how do you want it to behave when two timestamps are give, that
> is:
> 
>    svn CMD -r{DATE1}:{DATE2}
> 
> What if exactly one of those dates is in your new format?  And what if
> *both* are?

Hmmm, I'm not committed to implement it myself. I want to add it into
 the issue list at least if more people think it is a good idea. I may implement
 it sometimes; although I do not have idea how code contributions are
 done here yet :)

I'm not sure about d, m, and y sufixes. I would not have any use for them in
 my ussage patterns. I would be using this more in situations when I know
 that something worked a few days ago and want to quickly check what
 changed from *about* that time. I'm not even sure whether hours and
 minutes options should be added at all.

The whole reason I think about extension at all is that it is easier to think
 in terms of "a few days ago" than in terms "on this date". Oh, and it is
 also less to type :)

As for as two dates on command line: both would be relative to the currnet
 time. It is just to keep it simple. If one of the dates should be relative
 to the other one, then we would need more prefixes:
* relative to the current time
* relative to the other time; add the value
* relative to the other time; substract the value
Looks to me complicated already.

BTW, if you have installed perl (not common on win32) there is
 a nice workaround form Eric Hanchrow:

>     #!/usr/bin/env perl
> 
>     use warnings;
>     use strict;
> 
>     my $since_when=shift;
>     my $zdate = qx(date --utc +%Y-%m-%dT%XZ --date='$since_when');
>     die unless $zdate;
>     chomp $zdate;
> 
>     exec ("svn", "log", "-r{$zdate}:HEAD", @ARGV);
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: specifying revisions using their distance (in days) from the current date

Posted by kf...@collab.net.
"Peter Hercek" <pe...@syncad.com> writes:
> This is a proposal for enhancement.
> 
> I plan to add it to Subversion Issue Tracker if there are no objections or
> better ideas.
> 
> Problem:
> 
> It is dificult to find out all the log records for commits which happened
> in the last x days. The timestamps can be specified only in the absolute
> format. One more date format would be accepted by svn to improve this. It
> would specify the timestamp as an amount of time we need move back from the
> current timestamp. The format would look like this:
> 
> '{-' number_of_days_ago (
>     'T' number_of_hours_ago (
>         ':' number_of_minutes_ago (
>             ':' number_of_seconds_ago
>         )?
>     )?
> )? '}'
> 
> The format can be easily recongnized from the standard date formats since
> t starts with a minus sign (dash).
> 
> Examples:
> {-3}       would mean 3 days ago (ie Now()-3 provided that Now is a function
>            returning the current timestamp)
>  {-4T12:30} would mean 3 days, 12 hours and 30 minutes ago
> 
> 
> Is it a good proposal? Any better ideas?

I like it.  If you add support for year/month, you could have an
optional character after what is currently the day number:

   {-3dT12:30}
   {-3mT12:30}
   {-3yT12:30}

Also, how do you want it to behave when two timestamps are give, that
is:

   svn CMD -r{DATE1}:{DATE2}

What if exactly one of those dates is in your new format?  And what if
*both* are?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org