2

What's the story with permissions in Mercurial / Kiln?

alt text

What are these permissions? Why do I care? How/why would I set them to something other than this default? Why are they set per file?

Do they really need prominent display in the file browser UI? I would think a last modified date and possibly the name of the last modifying user would be more useful in this space.

Apologies in advance if I'm missing something mindblowingly obvious.

flag
This has been fixed internally and should be released soon. Thanks a lot for all of your input! – Sam Vanderpol Oct 14 2009 at 17:56

closed as no longer relevant by Benjamin Pollack♦♦ Feb 21 2011 at 21:56

2 Answers

3

You're not missing something; that column's frequently unnecessary, but it does tell you something useful.

Mercurial originated on Unix—in fact, it was originally designed to manage the Linux kernel source code—so it tracks both whether a given file is executable, and whether it's a symlink, in Unix terms. But that's it: it doesn't track full Unix permissions. Because having a single column called "Executable or Symlink" made no sense, and because hg serve shows you the permissions you will get if you update to the given revision on a Unix system, we opted to emulate hg serve and show the Unix permissions you would get on cloning.

There are a couple alternatives that immediately come to mind:

  1. Never show the column at all, since it usually doesn't matter, even on Unix systems.
  2. Never show the column, but only on Windows systems, since it's literally counterproductive there. (cmd.exe and Explorer both launch anything at all, as long as it has a recognized extension, so going by the executable flag could be dangerously misleading.) We would continue to display it if viewing the repository from a Unix or Mac system in this scenario.
  3. Attempt to convey whether a file is executable or a symlink via its icon. The only concern here is that there's no truly standard icon for executables versus documents, but I suspect that the generic Windows or Mac icons would be clear enough to be useful--and we could probably easily serve up icons appropriate to the platform of the browser viewing the page. This would be unobtrusive and less confusing, while still conveying the information.

We're not at all wedded to the current implementation. Option 3 seems like a good compromise to me. What are your thoughts?

link|flag
2 
Thanks for the explanation. I'm not the best qualified to comment, since I didn't even know what this meant until now, but I'd think that if it is truly this obscure you could never show it at all. If people need it later, they can always ask. Presumably, Mercurial also provides access to this information from the command line, so they'd have a workaround. As it stands it is in some pretty valuable screen space and just makes you go "huh?", especially if you are a Mercurial neophyte from Windows-land like me (and maybe a significant fraction of the target market?). – Douglas McClean Oct 9 2009 at 2:57
1 
I tend to agree w/ Douglas here. Benjamin has some good alternative ideas -- we'll figure out some compromise that doesn't worry or confuse users unnecessarily. – Ben Kamens Oct 9 2009 at 3:16
2

How about this? (@Benjamin Pollack)

Name                                    | Size  | Modified
================================================================
Puppy.jpg                               |   87k | Jun 6 by Fred
build.bat (Executable)                  |    2k | Apr 4 by Mike
SillyThingFactoryFactory.java           |    9k | Dec 1 by Fred
ExternalLib.dll (Symbolic Link)         |    -- | Jun 6 by Fred

Better still, make it "build.bat (Executable)" and "ExternalLib.dll (Symbolic Link)". Presto! Free cluesauce for noobs like me. :)

link|flag
Showing last-modified might be kind of expensive, but we can give it a shot, and either remove it, or cache it, if it ends up being a problem. I'll try to find time to play with that at some point in the next few days if I can. – Benjamin Pollack Oct 9 2009 at 3:53
1 
We're kind of discussing two things at once. I would suggest that removing or humanizing the permissions column is useful independent of whether it actually makes sense to use the space for something else. Last-modified would be nice to have, but if there are technical reasons why it is a PITA or not a good idea, that's ok too. – Douglas McClean Oct 9 2009 at 4:05
1 
Oh, I get that, and we'll figure out a sane future for the permissions column. I just hadn't thought about a Modified column, and I like the idea. – Benjamin Pollack Oct 9 2009 at 14:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.