bzr.rst
changeset 1246 dff21ea5a8fd
parent 1245 c4b183601a06
parent 1237 1a51a3c2e4fa
child 1247 cc97907e3123
child 1259 c7069f501ce1
child 1271 1ea412c9aefb
equal deleted inserted replaced
1245:c4b183601a06 1246:dff21ea5a8fd
     1 -*- mode: outline -*-
       
     2 
       
     3 * Import existing/init new project.
       
     4 
       
     5   $ mkdir proj
       
     6   $ cd proj
       
     7   $ touch README Makefile main.c
       
     8   $ bzr init
       
     9 Created a standalone tree (format: 2a)
       
    10   $ bzr add .
       
    11 adding Makefile
       
    12 adding README
       
    13 adding main.c
       
    14   $ bzr ci -m 'Init proj.'
       
    15 Committing to: /cygdrive/e/home/devel/tmp/vcs-bzr/proj/
       
    16 added Makefile
       
    17 added README
       
    18 added main.c
       
    19 Committed revision 1.
       
    20 
       
    21 * Cloning/branching repo.
       
    22 
       
    23 'branch'/'get'/'clone' are aliases for 'branch' command:
       
    24 
       
    25   $ bzr clone proj/ proj-clone
       
    26 Branched 1 revision(s).
       
    27 
       
    28 * Updating repo.
       
    29 
       
    30 * Incoming changes.
       
    31 
       
    32   $ bzr missing --theirs-only bzr://bzr.example.com/proj/trunk
       
    33 
       
    34 * Outgoing changes.
       
    35 
       
    36   $ bzr st
       
    37 modified:
       
    38   README
       
    39   $ bzr ci -m up
       
    40 Committing to: /cygdrive/e/home/devel/tmp/vcs-bzr/proj-clone/
       
    41 modified README
       
    42 Committed revision 2.
       
    43   $ bzr missing --mine-only
       
    44 Using saved parent location: /cygdrive/e/home/devel/tmp/vcs-bzr/proj/
       
    45 You have 1 extra revision(s):
       
    46 ------------------------------------------------------------
       
    47 revno: 2
       
    48 committer: Oleksandr Gavenko <gavenkoa@gmail.com>
       
    49 branch nick: proj-clone
       
    50 timestamp: Mon 2011-01-24 00:21:27 +0200
       
    51 message:
       
    52   up
       
    53 
       
    54 * Working copy status.
       
    55 
       
    56 'status'/'st'/'stat' are aliases for 'status' command:
       
    57 
       
    58   $ bzr rm README
       
    59 deleted README
       
    60   $ bzr st
       
    61 removed:
       
    62   README
       
    63 
       
    64 * Show working copy diff.
       
    65 
       
    66   $ echo hello >README
       
    67   $ bzr diff
       
    68 === modified file 'README'
       
    69 --- README  2011-01-23 21:16:40 +0000
       
    70 +++ README  2011-01-23 21:37:47 +0000
       
    71 @@ -0,0 +1,1 @@
       
    72 +hello
       
    73 
       
    74 * Show history log.
       
    75 
       
    76   $ bzr log
       
    77 
       
    78 * Adding files to repo.
       
    79 
       
    80   $ touch hello.c
       
    81   $ bzr add hello.c
       
    82 adding hello.c
       
    83 
       
    84 * Deleting files from repo.
       
    85 
       
    86 'remove'/'rm'/'del' are aliases for 'remove' command:
       
    87 
       
    88   $ bzr rm README
       
    89 deleted README
       
    90 
       
    91 * Undo local changes.
       
    92 
       
    93   $ bzr rm README
       
    94 deleted README
       
    95   $ bzr revert README
       
    96 +N  README
       
    97 
       
    98 * Undo last commit.
       
    99 
       
   100   $ bzr add hello.c
       
   101 adding hello.c
       
   102 
       
   103   $ bzr ci -m bug
       
   104 Committing to: /cygdrive/e/home/devel/tmp/vcs-bzr/proj-clone/
       
   105 added hello.c
       
   106 Committed revision 2.
       
   107 
       
   108   $ bzr uncommit
       
   109 Are you sure? [y/n]: y
       
   110     2 Oleksandr Gavenko	2011-01-23
       
   111       bug
       
   112 
       
   113 The above revision(s) will be removed.
       
   114 You can restore the old tip by running:
       
   115   bzr pull . -r revid:gavenkoa@gmail.com-20110123213425-f2ca8umip5iw73is
       
   116 
       
   117   $ bzr st
       
   118 added:
       
   119   hello.c
       
   120 
       
   121 * Info about bzr repo.
       
   122 
       
   123   $ bzr info
       
   124 Standalone tree (format: 2a)
       
   125 Location:
       
   126   branch root: .
       
   127 
       
   128 Related branches:
       
   129   parent branch: /cygdrive/e/home/devel/tmp/vcs-bzr/proj
       
   130 
       
   131 * Shelf changes.
       
   132 
       
   133   $ bzr st
       
   134 modified:
       
   135   README
       
   136   $ bzr shelve --all
       
   137 Selected changes:
       
   138  M  README
       
   139 Changes shelved with id "1".
       
   140   $ bzr diff
       
   141   $ bzr shelve --list
       
   142   1: <no message>
       
   143   $  bzr unshelve
       
   144 Using changes with id "1".
       
   145  M  README
       
   146 All changes applied successfully.
       
   147 Deleted changes with id "1".
       
   148