Commits

alu committed 4d52ac1

Automated commit message

Comments (0)

Files changed (1)

-== Tasks extension for mercurial ==
-
-Tasks are collections of contiguous changesets.  A task can be short or long lived, but its informatino is only available locally.  This extension overrides the behaviour of push so that it will not push incomplete tasks by default. A task can be in one of 3 states:
-        * new - this task has no changesets only a parent node
-        * active - a task with some changesets but not complete
-        * complete - a task with some changesets and marked as complete
-
-Use 'hg tasks' to list all new and active tasks.  'hg tasks --all' will show completed tasks along with those that are new and active.
-
-This extension adds two new options to push:
-        * --all-tasks        will push all tasks including incomplete tasks
-        * --completed-tasks  will only push completed tasks
-
-Use 'hg update [NAME]' to update to the tip node of a task and set it as current.  When a task is set as current, all subsequent commits will be assigned to the task.
-
-If the auto.track.new option is set newly created tasks will automatically be set as current.  Otherwise, you will need to first create the task, and then update to it to make it current.
-
-=== enabling the tasks extension ===
-To enable this extension download the [[http://bitbucket.org/alu/hgtasks/src/tip/hgext/tasks.py|tasks.py]] and save it somewhere on your system.  Then edit your config file so that it has something similar to:
-{{{
-      [extensions]
-      config = /my/path/to/tasks.py
-}}}
-
-=== optional behaviour ===
-The tasks extension can automatically mark newly created tasks as current if you set the auto.track.new.  This will allow you to start work on a task right away.  To enable this functionality, add this to your config:
-{{{
-      [tasks]
-      auto.track.new = True
-}}}
-
-You can have the tasks extension automatically 'stash' your working copy when you are working on a task.  This allows you to update to a task, do some work, and then update to another task or node and not lose your changes.  This means you can switch your context easily and not worry about committing your files.  To enable auto stashing of tasks, add this to your config:
-{{{
-      [tasks]
-      auto.stash = True
-}}}
-
-=== commands ===
-
-List tasks:
-{{{
-      $ hg tasks
-      $ hg tasks --all            # will show completed tasks as well
-}}}
-Create a new task:
-{{{
-      $ hg task mytask
-      $ hg task mytask -r 3       # will create new task at revision 3
-
-      $ hg task mytask -r 3:10    # will create new task with parent at rev 3,
-                                  # start at rev 4, and end at rev 10
-}}}
-Rename a task:
-{{{
-      $ hg task -m mytask mynewtaskname
-}}}
-Mark a task as current:
-{{{
-      $ hg update mytask
-}}}
-Delete a task:
-{{{
-      $ hg task mytask -d
-      $ hg task mytask --delete
-}}}
-Delete all tasks:
-{{{
-      $ hg tasks -A
-      $ hg tasks --delete-all
-}}}
-Delete complete tasks only:
-{{{
-      $ hg tasks -C
-      $ hg tasks --delete-complete
-}}}
-Get information on a task:
-{{{
-      $ hg task mytask -i
-      $ hg task mytask --info
-}}}
-Resume a completed task (will mark a completed task as not complete):
-{{{
-      $ hg task mytask -u
-      $ hg task mytask --resume
-}}}
-Trim revisions off a task:
-{{{
-      $ hg task mytask -t -r 3
-      $ hg task mytask --trim --rev 3
-}}}
-Append revisions to a task:
-{{{
-      $ hg task mytask -n -r 3
-      $ hg task mytask --append --rev 3
-}}}
-
-=== additional push options ===
-This extension changes the behaviour of the 'push' command and adds two new options.
-
-When performing an 'hg push' you will be warned and the operation will abort if you have incomplete tasks in your outgoing changesets.  This is to stop you from pushing incomplete work.  When this occurs, you can do one of two things:
-
-1. push the incomplete work, use the --all-tasks option:
-{{{
-      $ hg push --all-tasks
-}}}
-2. push only completed tasks (all revisions belonging to an incomplete task will be stripped from the outgoing changesets), use the --completed-tasks option:
-{{{
-      $ hg push --completed-tasks
-}}}
-
-Note that push ignores tasks that are new (i.e. not complete but have no changesets attached).
-
-[[PushBehaviour|Visual example of push behaviour]]
-
-=== using transplant with tasks ===
-If you have the transplant extensions entabled you can use it as follows:
-
-{{{
-      $ hg transplant --task mytask
-      $ hg transplant -t mytask
-}}}
-
-=== using log with tasks ===
-The log function is wrapped to accept task names as an argument and will show only changesets that belong to a particular gtask.
-
-{{{
-      $ hg log mytask
-}}}
-
-=== implementation notes ===
-
-Task information is stored in two files:
-{{{
-      .hg/tasks              # all task info
-      .hg/tasks.current      # the current task
-}}}
-
-The file format for the tasks and tasks.complete filesa are as follows:
-{{{
-      <taskname>,<parent_node>,<start_node>,<end_node>,state
-}}}
-The state can be one of the following: 0 - new, 1 - active, 2 - complete.
-The first entry shows a task with 2 or more changesets assigned to it, the second entry is a newly created task with no changesets - only a parent:
-{{{
-      task1,2ed12f44801b412ed18e758f709aae4034a9ad4f,9ab60daf8b432d2db7639dc3d81f5319900570cd,d6c91858f9d502d626c28960660489cf4142829e,1
-      task2,2ed12f44801b412ed18e758f709aae4034a9ad4f,,,0
-}}}
-The above two tasks were created on the same revision (they share the same parent 2ed12f...) but only task1 has any work done against it.
-
-==== request for help/improvements ====
-
-This extension was hacked together very quickcly and was _heavily_ based on the bookmarks extension distributed with mercurial.  I needed something a bit different for my needs and wanted an extension that provided a todo list type of functionality and protected me from accidentally pushing incomplete work.
-
-Code optimizations/recommendations/patches are welcome.  I know that this extension does not make the best use of either the Python language or the Mercurial API.
-
+== Tasks extension for mercurial ==
+
+Tasks are collections of contiguous changesets.  A task can be short or long lived, but its information is only available locally.  This extension overrides the behaviour of push so that it will not push incomplete tasks by default. A task can be in one of 3 states:
+        * new - this task has no changesets only a parent node
+        * active - a task with some changesets but not complete
+        * complete - a task with some changesets and marked as complete
+
+Use 'hg tasks' to list all new and active tasks.  'hg tasks --all' will show completed tasks along with those that are new and active.
+
+This extension adds two new options to push:
+        * --all-tasks        will push all tasks including incomplete tasks
+        * --completed-tasks  will only push completed tasks
+
+Use 'hg update [TASK]' to update to the tip node of a task and set it as current.  When a task is set as current, all subsequent commits will be assigned/appended to the task.
+
+If the auto.track.new option is set, newly created tasks will automatically be set as current.  Otherwise, you will need to first create the task, and then update to it to make it current.
+
+If the auto.stash option is set, your local working copy will be stashed when you update away from the current task.
+
+=== enabling the tasks extension ===
+To enable this extension download the [[http://bitbucket.org/alu/hgtasks/src/tip/hgext/tasks.py|tasks.py]] and save it somewhere on your system.  Then edit your config file so that it has something similar to:
+{{{
+      [extensions]
+      config = /my/path/to/tasks.py
+}}}
+
+=== optional behaviour ===
+The tasks extension can automatically mark newly created tasks as current if you set the auto.track.new.  This will allow you to start work on a task right away.  To enable this functionality, add this to your config:
+{{{
+      [tasks]
+      auto.track.new = True
+}}}
+
+You can have the tasks extension automatically 'stash' your working copy when you are working on a task.  This allows you to update to a task, do some work, and then update to another task or node and not lose your changes.  This means you can switch your context easily and not worry about committing your files.  To enable auto stashing of tasks, add this to your config:
+{{{
+      [tasks]
+      auto.stash = True
+}}}
+
+=== commands ===
+
+List tasks:
+{{{
+      $ hg tasks
+      $ hg tasks --all            # will show completed tasks as well
+}}}
+Create a new task:
+{{{
+      $ hg task mytask
+      $ hg task mytask -r 3       # will create new task at revision 3
+
+      $ hg task mytask -r 3:10    # will create new task with parent at rev 3,
+                                  # start at rev 4, and end at rev 10
+}}}
+Rename a task:
+{{{
+      $ hg task -m mytask mynewtaskname
+}}}
+Mark a task as current:
+{{{
+      $ hg update mytask
+}}}
+Delete a task:
+{{{
+      $ hg task mytask -d
+      $ hg task mytask --delete
+}}}
+Delete all tasks:
+{{{
+      $ hg tasks -A
+      $ hg tasks --delete-all
+}}}
+Delete complete tasks only:
+{{{
+      $ hg tasks -C
+      $ hg tasks --delete-complete
+}}}
+Get information on a task:
+{{{
+      $ hg task mytask -i
+      $ hg task mytask --info
+}}}
+Resume a completed task (will mark a completed task as not complete):
+{{{
+      $ hg task mytask -u
+      $ hg task mytask --resume
+}}}
+Trim revisions off a task:
+{{{
+      $ hg task mytask -t -r 3
+      $ hg task mytask --trim --rev 3
+}}}
+Append revisions to a task:
+{{{
+      $ hg task mytask -n -r 3
+      $ hg task mytask --append --rev 3
+}}}
+
+=== additional push options ===
+This extension changes the behaviour of the 'push' command and adds two new options.
+
+When performing an 'hg push' you will be warned and the operation will abort if you have incomplete tasks in your outgoing changesets.  This is to stop you from pushing incomplete work.  When this occurs, you can do one of two things:
+
+1. push the incomplete work, use the --all-tasks option:
+{{{
+      $ hg push --all-tasks
+}}}
+2. push only completed tasks (all revisions belonging to an incomplete task will be stripped from the outgoing changesets), use the --completed-tasks option:
+{{{
+      $ hg push --completed-tasks
+}}}
+
+Note that push ignores tasks that are new (i.e. not complete but have no changesets attached).
+
+[[PushBehaviour|Visual example of push behaviour]]
+
+=== using transplant with tasks ===
+If you have the transplant extensions entabled you can use it as follows:
+
+{{{
+      $ hg transplant --task mytask
+      $ hg transplant -t mytask
+}}}
+
+=== using log with tasks ===
+The log function is wrapped to accept task names as an argument and will show only changesets that belong to a particular gtask.
+
+{{{
+      $ hg log mytask
+}}}
+
+=== implementation notes ===
+
+Task information is stored in two files:
+{{{
+      .hg/tasks              # all task info
+      .hg/tasks.current      # the current task
+}}}
+
+The file format for the tasks and tasks.complete filesa are as follows:
+{{{
+      <taskname>,<parent_node>,<start_node>,<end_node>,state
+}}}
+The state can be one of the following: 0 - new, 1 - active, 2 - complete.
+The first entry shows a task with 2 or more changesets assigned to it, the second entry is a newly created task with no changesets - only a parent:
+{{{
+      task1,2ed12f44801b412ed18e758f709aae4034a9ad4f,9ab60daf8b432d2db7639dc3d81f5319900570cd,d6c91858f9d502d626c28960660489cf4142829e,1
+      task2,2ed12f44801b412ed18e758f709aae4034a9ad4f,,,0
+}}}
+The above two tasks were created on the same revision (they share the same parent 2ed12f...) but only task1 has any work done against it.
+
+==== request for help/improvements ====
+
+This extension was hacked together very quickcly and was _heavily_ based on the bookmarks extension distributed with mercurial.  I needed something a bit different for my needs and wanted an extension that provided a todo list type of functionality and protected me from accidentally pushing incomplete work.
+
+Code optimizations/recommendations/patches are welcome.  I know that this extension does not make the best use of either the Python language or the Mercurial API.
+