Меню:


BitKeeper is commercial implementation of version control system. However, users can use it for development of open source projects without any fee. Most well-know project, that had used BitKeeper was development of Linux kernel (but now it use Git for development).

Work with BitKeeper from Emacs is provided by bk package.

Installation

To install bk package you need to download it from http://www.emacswiki.org/elisp/bk.el, or obtain sources from BitKeeper's repository at bk://bk-emacs.bkbits.net/emacs. This source file you need to put to place, where Emacs can find it, and add loading of package to the initialization file. You also have to install x-migrant package, that is required for work of bk package.

Work with package

Work with bk package is similar to work with VC. Functions could be executed either via M-x and name of function, global and local key bindings, or via BitKeeper menu, that available when you work in bk-mode.

Package uses two prefix keys to work. The C-x v prefix is used by VC package, so functions from bk package overlap some of VC functions, that provides work with files. The C-c b prefix is global, and used for functions, that could be applied not only to files. You need to remember, that only some functions available via global key bindings (only with C-x v or C-c b prefixes). All other functions available only when you work with files, registered in BitKeeper.

When you work with files, that registered in BitKeeper, in status line you can see information about license: BKL, when you use standard commercial license, and BKCL, when you use community license. To get more detailed information on licenses you can use M-x bk-help licensing.

User can register new file in repository with bk-register function, that bound to C-x v i. Work with already registered files is very similar to work with VC package. Obtaining file from repository for editing, and releasing of it after editing is performed with vc-toggle-read-only function (C-x C-q). With vc-revert-buffer function (C-x v u) you can revert changes in file, and start to work with version from repository.

You can see information about concrete file's revision with bk-print-revision-summary function (C-x v l). To view revision history in a graphical form, you can execute bk-revtool function (C-c b r), and it runs graphical revisions browser, that come in BitKeeper's distribution. User can also view concrete file's revision with bk-print-rev function (C-x v ~), or display annotated file with bk-annotate function, that bound to C-x v g. To view files the view-mode is used.

Work with changes in BitKeeper is based on concept of changesets. To support work with changesets, the bk package defines several functions. To make changes and create new changeset exists bk-citool function, that bound to C-c b c. This command runs graphical utility from BitKeeper's distribution, that is used to commit changes to repository.

To exchange of changesets between repositories, bk defines two functions. bk-push function (C-c b .) is used to transfer changeset to the parent repository. And bk-pull function (C-c b ,) is used to retrieve new changesets from parent repository. Both these functions has global key bindings, so you can execute them from any place.

To get list of changes between your file and version in repository, user can use bk-diffs function, that bound to C-x v =. And to get changes for all files in directory and subdirectories you can use bk-recursive-diffs function (C-c b =). There is also bk-interesting-diffs function (C-c b i) that recursively compare files matched some condition — files that are locked and modified by users, and also files, that was added, but not yet committed to repository. To display list of locked and modified files (and also all added files) exists bk-sfiles function (C-c b s).

To get short description of package and main commands, user can use bk-help-overview function (C-c b h). User can also get help on BitKeeper with following functions: bk-help (C-c b m) shows manual page for BitKeeper, bk-apropos (C-c b a) makes search in BitKeeper's documentation, and bk-helptool function runs graphical help utility from BitKeeper's distribution.

Customization

User can use standard Emacs customization routines to change behaviour of package. With M-x customize-group bk function, user can set path to BitKeeper's executable files, command line options, and prefixes for key bindings.

Last change: 05.03.2013 16:54

blog comments powered by Disqus