~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-04 10:01:41 UTC
  • mto: (5004.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5006.
  • Revision ID: v.ladeuil+lp@free.fr-20100204100141-aviyyic1im5neuu7
Add comments and update HACKING.txt about which units should be used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2191
2191
    :Tips & tricks:
2192
2192
 
2193
2193
      GUI tools and IDEs are often better at exploring history than command
2194
 
      line tools. You may prefer qlog or glog from the QBzr and Bzr-Gtk packages
 
2194
      line tools. You may prefer qlog or viz from the QBzr and Bzr-Gtk packages
2195
2195
      respectively for example. (TortoiseBzr uses qlog for displaying logs.) See
2196
2196
      http://bazaar-vcs.org/BzrPlugins and http://bazaar-vcs.org/IDEIntegration.
2197
2197
 
2609
2609
    After adding, editing or deleting that file either indirectly by
2610
2610
    using this command or directly by using an editor, be sure to commit
2611
2611
    it.
 
2612
    
 
2613
    Patterns prefixed with '!' are exceptions to ignore patterns and take
 
2614
    precedence over regular ignores.  Such exceptions are used to specify
 
2615
    files that should be versioned which would otherwise be ignored.
 
2616
    
 
2617
    Patterns prefixed with '!!' act as regular ignore patterns, but have
 
2618
    precedence over the '!' exception patterns.
2612
2619
 
2613
2620
    Note: ignore patterns containing shell wildcards must be quoted from
2614
2621
    the shell on Unix.
2618
2625
 
2619
2626
            bzr ignore ./Makefile
2620
2627
 
2621
 
        Ignore class files in all directories::
 
2628
        Ignore .class files in all directories...::
2622
2629
 
2623
2630
            bzr ignore "*.class"
2624
2631
 
 
2632
        ...but do not ignore "special.class"::
 
2633
 
 
2634
            bzr ignore "!special.class"
 
2635
 
2625
2636
        Ignore .o files under the lib directory::
2626
2637
 
2627
2638
            bzr ignore "lib/**/*.o"
2633
2644
        Ignore everything but the "debian" toplevel directory::
2634
2645
 
2635
2646
            bzr ignore "RE:(?!debian/).*"
 
2647
        
 
2648
        Ignore everything except the "local" toplevel directory,
 
2649
        but always ignore "*~" autosave files, even under local/::
 
2650
        
 
2651
            bzr ignore "*"
 
2652
            bzr ignore "!./local"
 
2653
            bzr ignore "!!*~"
2636
2654
    """
2637
2655
 
2638
2656
    _see_also = ['status', 'ignored', 'patterns']
3647
3665
    committed to record the result of the merge.
3648
3666
 
3649
3667
    merge refuses to run if there are any uncommitted changes, unless
3650
 
    --force is given.
 
3668
    --force is given. The --force option can also be used to create a
 
3669
    merge revision which has more than two parents.
 
3670
 
 
3671
    If one would like to merge changes from the working tree of the other
 
3672
    branch without merging any committed revisions, the --uncommitted option
 
3673
    can be given.
3651
3674
 
3652
3675
    To select only some changes to merge, use "merge -i", which will prompt
3653
3676
    you to apply each diff hunk and file change, similar to "shelve".
3668
3691
        To apply a merge directive contained in /tmp/merge::
3669
3692
 
3670
3693
            bzr merge /tmp/merge
 
3694
 
 
3695
        To create a merge revision with three parents from two branches
 
3696
        feature1a and feature1b:
 
3697
 
 
3698
            bzr merge ../feature1a
 
3699
            bzr merge ../feature1b --force
 
3700
            bzr commit -m 'revision with three parents'
3671
3701
    """
3672
3702
 
3673
3703
    encoding_type = 'exact'
4083
4113
    created as above.  Directories containing unknown files will not be
4084
4114
    deleted.
4085
4115
 
4086
 
    The working tree contains a list of pending merged revisions, which will
4087
 
    be included as parents in the next commit.  Normally, revert clears that
4088
 
    list as well as reverting the files.  If any files are specified, revert
4089
 
    leaves the pending merge list alone and reverts only the files.  Use "bzr
4090
 
    revert ." in the tree root to revert all files but keep the merge record,
4091
 
    and "bzr revert --forget-merges" to clear the pending merge list without
 
4116
    The working tree contains a list of revisions that have been merged but
 
4117
    not yet committed. These revisions will be included as additional parents
 
4118
    of the next commit.  Normally, using revert clears that list as well as
 
4119
    reverting the files.  If any files are specified, revert leaves the list
 
4120
    of uncommitted merges alone and reverts only the files.  Use ``bzr revert
 
4121
    .`` in the tree root to revert all files but keep the recorded merges,
 
4122
    and ``bzr revert --forget-merges`` to clear the pending merge list without
4092
4123
    reverting any files.
4093
4124
 
4094
 
    Using "bzr revert --forget-merges", it is possible to apply the changes
4095
 
    from an arbitrary merge as a single revision.  To do this, perform the
4096
 
    merge as desired.  Then doing revert with the "--forget-merges" option will
4097
 
    keep the content of the tree as it was, but it will clear the list of
4098
 
    pending merges.  The next commit will then contain all of the changes that
4099
 
    would have been in the merge, but without any mention of the other parent
4100
 
    revisions.  Because this technique forgets where these changes originated,
4101
 
    it may cause additional conflicts on later merges involving the source and
 
4125
    Using "bzr revert --forget-merges", it is possible to apply all of the
 
4126
    changes from a branch in a single revision.  To do this, perform the merge
 
4127
    as desired.  Then doing revert with the "--forget-merges" option will keep
 
4128
    the content of the tree as it was, but it will clear the list of pending
 
4129
    merges.  The next commit will then contain all of the changes that are
 
4130
    present in the other branch, but without any other parent revisions.
 
4131
    Because this technique forgets where these changes originated, it may
 
4132
    cause additional conflicts on later merges involving the same source and
4102
4133
    target branches.
4103
4134
    """
4104
4135