/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/using_aliases.txt

  • Committer: v.ladeuil+lp at free
  • Date: 2007-02-04 17:41:12 UTC
  • mto: (2323.7.1 redirection)
  • mto: This revision was merged to the branch mainline in revision 2390.
  • Revision ID: v.ladeuil+lp@free.fr-20070204174112-iv6gxzinnjddlaxj
Add tests for redirection. Preserve transport decorations.

* bzrlib/tests/test_http.py:
(TestRedirections): new tests.

* bzrlib/tests/HttpServer.py:
(HttpServer): Make server host and port public once the socket
have been established.

* bzrlib/tests/HTTPTestUtil.py:
(RedirectRequestHandler, HTTPServerRedirecting): New http test
server for redirections. Only a whole host can be redirected, so
far.

* bzrlib/errors.py:
(RedirectRequested.__init__): Add a 'qual_proto' oso that
transport decorations can be transmitted to redirected transport.
(RedirectRequested._requalify_url,
RedirectRequested.get_source_url,
RedirectRequested.get_target_url): New methods providing fully
decorated urls.

* bzrlib/bzrdir.py:
(BzrDir.open_from_transport): The redirection should preserve
transport decorations.
(BzrDirMetaFormat1): To be able to specialize bzr branches from
foreign branches, we need to register BzrDirMetaFormat1 as the
default control format (instead of BzrDirMetaFormat which is
abstract and can still be used by foreign branches).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=================================
 
2
Using aliases for Bazaar commands
 
3
=================================
 
4
 
 
5
Command aliases are an easy way to customize the behaviour of Bazaar. Aliases
 
6
are an easy way to create shortcuts for commonly-typed commands, or to set
 
7
defaults for commands.
 
8
 
 
9
Command aliases can be defined in the **[ALIASES]** section of your
 
10
**.bazaar/bazaar.conf** file. Aliases start with the alias name, then an
 
11
equal sign, then a command fragment.  Here's an example ALIASES section:
 
12
 
 
13
Examples
 
14
========
 
15
A typical example::
 
16
 
 
17
    [ALIASES]
 
18
    recentlog=log -r-3..-1
 
19
    ll=log --line -r-10..-1
 
20
    commit=commit --strict
 
21
    diff=diff --diff-options -p
 
22
 
 
23
Explanation of examples
 
24
=======================
 
25
 
 
26
 * The first alias makes a new 'recentlog' command that shows the logs for the
 
27
   last three revisions
 
28
 * The **ll** alias shows the last 10 log entries in line format.
 
29
 * the **commit** alias sets the default for commit to refuse to commit if new
 
30
   files in the tree are not recognized.
 
31
 * the **diff** alias adds the coveted -p option to diff
 
32
 
 
33
 
 
34
Rules for Aliases
 
35
=================
 
36
 
 
37
 * You can override parts of the options given in an alias by overriding it.
 
38
   For example, if you run **lastlog -r-5..**, you will only get five
 
39
   line-based log entries instead of 10.
 
40
 * Aliases can override the standard behaviour of existing commands by giving
 
41
   an alias name that is thesame as the orignal command. For example, default
 
42
   commit is changed with **commit=commit --strict**.
 
43
 * Aliases can not refer to other aliases. In other words making a
 
44
   **lastlog** alias and referring to it with a **ll** alias will not work.
 
45
 
 
46
This includes aliases that override standard commands
 
47
 
 
48
 * Giving the **--no-aliases** to the bzr command will tell it to ignore aliases
 
49
   for that run. For example, running **bzr --no-aliases commit** will perform a
 
50
   standard commit instead not do a **commit --strict**.
 
51