hgtouch /

Filename Size Date modified Message
17 B
989 B
2.2 KB
HG Touch Extension
===================


Purpose
-------

When working with some software projects the developer often needs to
create new files, edit them, and add them to the mercurial repository
that is being worked on.
This extension automates that a bit by combining the file create and
repository add steps. This is nice for those of us who may touch
files, work on them, and then commit; accidentally forgetting to 
'hg add' the files.


Configuration
--------------

Edit the hgrc file and add the following to the
extensions section::

   [extensions]
   hgtouch = path/to/hgtouch.py


Examples
---------

The following are some brief examples of using the extension::

  # create empty C/header files - ready for editing
  % hg touch  foo.h foo.c

  # create a valid python package dir in one step
  % hg touch -s  mylib/__init__.py

  # silly, but possible
  % hg touch -s {a,b,c}/{x,y,z}
  % hg status
  A a/x
  A a/y
  A a/z
  A b/x
  A b/y
  A b/z
  A c/x
  A c/y
  A c/z


Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.