Integrating extensions into core?

Dan Villiom Podlaski Christiansen danchr at gmail.com
Mon Aug 10 06:09:19 CDT 2009


[Subject changed from »Re: [PATCH] add color diff support to record  
extension«]

On 10/08/2009, at 11.49, Dirkjan Ochtman wrote:

> On Mon, Aug 10, 2009 at 11:45, Dan Villiom Podlaski
> Christiansen<danchr at gmail.com> wrote:
>> Wouldn't it be worthwhile to integrate colour support into core?  
>> Currently,
>> the extension either duplicates the functionality of the commands  
>> it wraps,
>> or parses their output. It seems likely that having the commands  
>> themselves
>> add styles would make the implementation both simpler and more  
>> accurate.
>
> Would be fine with me as I already enable it everywhere anyway. I'll
> let Matt decide, though.

The idea is to change ‘ui.write(msg)’ to ‘ui.write(msg, style=None)’,  
and so on for the other methods. While at it, it would be useful for  
the UI class to allow specifying output file descriptors; this way UI  
could use ‘os.isatty()’ reliably on its descriptors.

>> With regard to ‘record’, wouldn't it be an excellent candidate for
>> integration as well? After all, it's hardly complex nor dangerous…
>
> Even if it's not complex, it does add an extra command, which makes
> the UI more complex.

True, but it's a simple and useful command. If nothing else, it could  
be integrated as ‘commit --interactive’. Isn't that how Git does it?

Another alternative would be to retain status quo by getting rid of  
another command. For example, the ‘locate’ and ‘manifest’ commands are  
very close to each other in semantics, and perhaps they could be  
merged into one?

For what it's worth, I'd consider ‘purge’ another candidate for  
integration. Granted, adding any of these commands to the default  
install would clutter the help output a bit. On the other hand, the  
current help is quite cluttered; do you mean that cleanups and  
reorganisations should come before adding any more commands?

(The full help output is quoted below.)

--

Dan Villiom Podlaski Christiansen
danchr at gmail.com

________________________________________________________________________________
>

> $ LC_ALL=C HGRCPATH=/dev/null hg help
> Mercurial Distributed SCM
>
> list of commands:
>
>  add          add the specified files on the next commit
>  addremove    add all new files, delete all missing files
>  annotate     show changeset information by line for each file
>  archive      create an unversioned archive of a repository revision
>  backout      reverse effect of earlier changeset
>  bisect       subdivision search of changesets
>  branch       set or show the current branch name
>  branches     list repository named branches
>  bundle       create a changegroup file
>  cat          output the current or given revision of files
>  clone        make a copy of an existing repository
>  commit       commit the specified files or all outstanding changes
>  copy         mark files as copied for the next commit
>  diff         diff repository (or selected files)
>  export       dump the header and diffs for one or more changesets
>  forget       forget the specified files on the next commit
>  grep         search for a pattern in specified files and revisions
>  heads        show current repository heads or show branch heads
>  help         show help for a given topic or a help overview
>  identify     identify the working copy or specified revision
>  import       import an ordered set of patches
>  incoming     show new changesets found in source
>  init         create a new repository in the given directory
>  locate       locate files matching specific patterns
>  log          show revision history of entire repository or files
>  manifest     output the current or given revision of the project  
> manifest
>  merge        merge working directory with another revision
>  outgoing     show changesets not found in destination
>  parents      show the parents of the working directory or revision
>  paths        show aliases for remote repositories
>  pull         pull changes from the specified source
>  push         push changes to the specified destination
>  recover      roll back an interrupted transaction
>  remove       remove the specified files on the next commit
>  rename       rename files; equivalent of copy + remove
>  resolve      retry file merges from a merge or update
>  revert       restore individual files or directories to an earlier  
> state
>  rollback     roll back the last transaction
>  root         print the root (top) of the current working directory
>  serve        export the repository via HTTP
>  showconfig   show combined config settings from all hgrc files
>  status       show changed files in the working directory
>  tag          add one or more tags for the current or given revision
>  tags         list repository tags
>  tip          show the tip revision
>  unbundle     apply one or more changegroup files
>  update       update working directory
>  verify       verify the integrity of the repository
>  version      output version and copyright information
>
> additional help topics:
>
>  dates        Date Formats
>  patterns     File Name Patterns
>  environment  Environment Variables
>  revisions    Specifying Single Revisions
>  multirevs    Specifying Multiple Revisions
>  diffs        Diff Formats
>  templating   Template Usage
>  urls         URL Paths
>  extensions   Using additional features
>
> use "hg -v help" to show aliases and global options
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1943 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090810/f6a883f6/attachment.bin 


More information about the Mercurial-devel mailing list