You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2002/04/05 22:31:45 UTC

the @ syntax (was: svn commit: rev 1643 ...)

On Fri, Apr 05, 2002 at 03:33:43PM -0600, cmpilato@collab.net wrote:
> "Bill Tutt" <ra...@lyra.org> writes:
> > That's correct. See the very bottom of:
> > 
> > http://www.perforce.com/perforce/doc.011/manuals/cmdref/o.fspecs.html
> 
> We could just keep the single '@' seperator, and if you have a file
> with '@' in the name itself, allow for "@@" escaping.

This will make shell scripting more difficult. You'd need to make sure that
all files that you process have no '@' characters in them.

I *really* like the @ syntax, but worry some about making it a bit tougher
to script.

Oh: and just testing for @DIGITS is insufficient. @head should work. Also,
@2002-04-05-14:19 should be able to work. Or "foo@april 4, 2002".

Here is an idea: what if we say that a trailing @ means "no revision
specified". Essentially, the syntax would be:

    file '@' revision

Where revision can be empty, a number, a few keywords, or a date. Since we
only look at the *last* '@' symbol, then a shell script can simply do:

for f in $*; do
  svn add $f@
done

That trailing @ ensures that we don't look at a @ symbol in $f and attempt
to process it.

[ and generally, a dumb shell script that forgets to add @ is still going to
  work for most cases; at some point, a file with @ will be passed into the
  script and it will break, but oh well. ]

> Note the following paths at revision 123:
> 
>    foo        -> foo@123
>    foo@bar    -> foo@@bar@123
>    foo@123    -> foo@@123@123
> 
> Of course, that means always un-escaping input paths, and the doom of
> using your shell's path completion (you'll have to insert extra '@'s),
> but...

The unescaping is no big deal. Recall that we already need to process the
input paths: the cmdline client needs to ensure that all paths are in UTF-8
before passing them into the Subversion libraries. Normally, I think we
would presume that the paths are in the current locale when they get passed
via argv[].

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: the @ syntax (was: svn commit: rev 1643 ...)

Posted by Michael Wood <mw...@its.uct.ac.za>.
On Fri, Apr 05, 2002 at 02:31:45PM -0800, Greg Stein wrote:
[snip]
> Here is an idea: what if we say that a trailing @ means "no
> revision specified". Essentially, the syntax would be:
> 
>     file '@' revision
> 
> Where revision can be empty, a number, a few keywords, or a
> date. Since we only look at the *last* '@' symbol, then a
> shell script can simply do:
> 
> for f in $*; do
>   svn add $f@
> done
> 
> That trailing @ ensures that we don't look at a @ symbol in $f
> and attempt to process it.
[snip]

That should be:

for f; do
	svn add "${f}@"
done

or:

for f in "$@"; do
	svn add "${f}@"
done

-- 
Michael Wood <mw...@its.uct.ac.za>

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

Re: the @ syntax - date format

Posted by Hontvari Jozsef <ho...@solware.com>.
> @2002-04-05-14:19 should be able to work.

this is a bit different subject, ISO8601 about international date in
information exchange specifies the "T" as time designator. So I would use
@2002-04-05T14:19. Because neither "T" nor "-" is very readable as a time
designator I would prefer the standard.



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