[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: BUG: feature request: 'tla chmod' which 'touch'
From: |
Zenaan Harkness |
Subject: |
Re: [Gnu-arch-users] Re: BUG: feature request: 'tla chmod' which 'touch'es files |
Date: |
Sat, 25 Sep 2004 12:40:43 +1000 |
On Sat, 2004-09-25 at 11:34, Mark Stosberg wrote:
> On 2004-09-24, Zenaan Harkness <address@hidden> wrote:
> >
> > Trying to create a shared revlib when initial permissions were not set
> > up as group +rw(x) has been a long, messy and at times quite frustrating
> > experience for me.
> >
> > Too many times I've been bitten by chmod not 'touch'ing the
> > corresponding file, and therefore not propagating the perms change into
> > the commit.
> >
> > A function like the following would probably do the trick:
> >
> > tla-chmod
> > {
> > chmod $@
> > touch $@
> > }
>
> I don't think this adds much value to 'tla' as the 100th-and-something
> sub-command. It does nothing tla-specific. It sounds like either some
> other 'tla' command should be chmod'ing and touch'ing files
> automatically, or you could use a shell alias for 'chmod-n-touch'.
>
> It does seem like a reasonable idea for 'chmod' to 'touch' a file if you
> want it to, so perhaps patching chmod with "--touch" flag could even
> make sense.
I disagree.
tla subcommands that mirror Unix commands for manipulating files are
1) easy to remember, eg:
tla rm
tla rmdir
tla mv
tla cp
tla chmod
2) Do The Right Thing w.r.t. arch/tla (very important for newbies).
When should "write a script" be the answer and when should
"tla should provide it" be the answer?
3) Bitkeeper provides this level of intuitive "it just works"ness:
---
$ bk help chmod
bk chmod(1) BitKeeper User's Manual bk chmod(1)
NAME
bk chmod - change the mode of a file and save it
SYNOPSIS
bk chmod <[ugoa]+rwxs> <file> [<file> ...]
bk chmod <[ugoa]-rwxs> <file> [<file> ...]
bk chmod <[ugoa]=rwxs> <file> [<file> ...]
bk chmod <octal> <file> [<file> ...]
DESCRIPTION
The chmod command changes the stored file modes for files in the repos-
itory. File modes are normally whatever the file was when it was
checked in to BitKeeper. When changes to the mode need to be made, the
bk chmod command is used to record the new permissions.
The permission syntax is one of
[ugoa]+rwxs
A symbolic way of adding permissions. The prefix before the "+"
indicates the users to which the permissions apply: "u" is user,
"g" is group, "o" is other, "a" is all. If none are specified
the default is "a". The postfix after the "+" indicates the
permission to add: "r" is read, "w" is write, "x" is execute,
"s" is setuid or setgid depending on the prefix.
[ugoa]-rwxs
A symbolic way of removing permissions. As above.
[ugoa]=rwxs
A symbolic way of setting permissions absolutely. As above.
octal A 4 digit octal number wherein 04000 means setuid, 02000 means
setgid, and in the following 3 digits 4 means read permission, 2
means write permission, and 1 means execute permission. The
last three digits are for user, group, other permissions respec-
tively. This form sets the permission absolutely, it is not
relative to the previously recorded permission.
NOTE
Write permission is somewhat pointless since BitKeeper will remove
write permission if the file is checked out unlocked and add write per-
mission if the file is checked out with a lock.
SEE ALSO
bk help admin
bk help prs
CATEGORY
File
BitMover, Inc 2003/08/08 bk chmod(1)
---
Finally, there are other things that are what I'd call "intuitive"
from the bitkeeper UI, such as "bk diff" which has intelligence
about interpreting the arguments passed to it, to simplify
seeing the differences between two versions of a file.
Eg. in tla, it could perhaps recognize things such as:
tla diff myversion--patch-N filename
tla diff my-branch--myversion--patch-N patch-M
tla diff address@hidden/c--b--v file
etc
etc
cheers
zen
- [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, Zenaan Harkness, 2004/09/23
- [Gnu-arch-users] Re: BUG: feature request: 'tla chmod' which 'touch'es files, Mark Stosberg, 2004/09/24
- Re: [Gnu-arch-users] Re: BUG: feature request: 'tla chmod' which 'touch'es files,
Zenaan Harkness <=
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, Aaron Bentley, 2004/09/25
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, John Meinel, 2004/09/25
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, Aaron Bentley, 2004/09/25
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, Matthew Dempsky, 2004/09/25
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, John Meinel, 2004/09/25
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, Matthew Dempsky, 2004/09/26
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, John Meinel, 2004/09/26
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, Matthew Dempsky, 2004/09/26
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, Harald Meland, 2004/09/26
- Re: [Gnu-arch-users] BUG: feature request: 'tla chmod' which 'touch'es files, Jason McCarty, 2004/09/26