Verwendung von Bazaar Version Control System (VCS) auf Debian Etch - Seite 2


Nun kann jeder eine Kopie Deines Zweigs runterladen. Um dies zu testen, erstellen wir das Verzeichnis test/ und laden eine Kopie des Zweigs in das Verzeichnis:

cd ~
mkdir test/
cd test/
bzr branch http://192.168.0.101/myproject

falko@server1:~/test$ bzr branch http://192.168.0.101/myproject
Branched 2 revision(s).
falko@server1:~/test$

Während Du an Deiner Kopie arbeitest, kann es sein, dass andere Leute ihre Änderungen auf den Server übertragen. Um diese Änderungen in Deiner Arbeitskopie zusammenzufügen, lass dies laufen

cd myproject/
bzr merge

In meinem Fall müssen keine Änderungen zusammengefügt werden:

falko@server1:~/test/myproject$ bzr merge
Merging from remembered location http://192.168.0.101/myproject/
Nothing to do.
falko@server1:~/test/myproject$

Um zu überprüfen was genau sich verändert hat, lass Folgendes laufen

bzr diff

Nun kannst Du Deine Arbeitskopie ändern, z.B.:

vi test1.txt


some text...
bla
Sieh Dir die Änderungen an:

bzr diff


falko@server1:~/test/myproject$ bzr diff
=== modified file 'test1.txt'
--- test1.txt 2007-12-19 15:22:52 +0000
+++ test1.txt 2007-12-19 15:41:37 +0000
@@ -1,1 +1,2 @@
some text...
+bla

falko@server1:~/test/myproject$

Übertrage Deine Änderungen wenn Du fertig bist:

bzr commit -m "Some changes"


falko@server1:~/test/myproject$ bzr commit -m "Some changes"
modified test1.txt
Committed revision 3.
falko@server1:~/test/myproject$

Lade danach die Änderungen auf den Server:

bzr push --create-prefix sftp://falko@192.168.0.101/~/public_html/myproject

Danach kannst Du (wenn Du magst) Deine Arbeitskopie wieder löschen.

Um herauszufinden, was Du noch mit Bazaar anstellen kannst, sieh Dir Folgendes an

bzr help


falko@server1:~/test/myproject$ bzr help
Bazaar -- a free distributed version-control tool
http://bazaar-vcs.org/

Grundbefehle:

bzr init makes this directory a versioned branch
bzr branch make a copy of another branch

bzr add make files or directories versioned
bzr ignore ignore a file or pattern
bzr mv move or rename a versioned file

bzr status summarize changes in working copy
bzr diff show detailed diffs

bzr merge pull in changes from another branch
bzr commit save some or all changes

bzr log show history of changes
bzr check validate storage

bzr help init more help on e.g. init command
bzr help commands list all commands
falko@server1:~/test/myproject$

und

bzr help commands

falko@server1:~/test/myproject$ bzr help commands
bzr add [FILE...]
Add specified files or directories.
bzr annotate FILENAME
Show the origin of each line in a file.
bzr bind LOCATION
Bind the current branch to a master branch.
bzr branch FROM_LOCATION [TO_LOCATION]
Create a new copy of a branch.
bzr break-lock [LOCATION]
Break a dead lock on a repository, branch or working directory.
bzr bundle-revisions [BASE]
Generate a revision bundle.
bzr cat FILENAME
Write a file's text from a previous revision.
bzr check [BRANCH]
Validate consistency of branch history.
bzr checkout [BRANCH_LOCATION] [TO_LOCATION]
Create a new checkout of an existing branch.
bzr commit [SELECTED...]
Commit changes into a new revision.
bzr conflicts
List files with conflicts.
bzr deleted
List files deleted in the working tree.
bzr diff [FILE...]
Show differences in the working tree or between revisions.
bzr export DEST
Export past revision to destination directory.
bzr help [TOPIC]
Show help on a command or other topic.
bzr ignore [NAME_PATTERN]
Ignore a command or pattern.
bzr ignored
List ignored files and the patterns that matched them.
bzr info [LOCATION]
Show information about a working tree, branch or repository.
bzr init [LOCATION]
Make a directory into a versioned branch.
bzr init-repository LOCATION
Create a shared repository to hold branches.
bzr inventory [FILE...]
Show inventory of the current working copy or a revision.
bzr log [LOCATION]
Show log of a branch, file, or directory.
bzr merge [BRANCH]
Perform a three-way merge.
bzr missing [OTHER_BRANCH]
Show unmerged/unpulled revisions between two branches.
bzr mkdir DIR...
Create a new versioned directory.
bzr mv [NAMES...]
Move or rename a file.
bzr nick [NICKNAME]
Print or set the branch nickname.
bzr pull [LOCATION]
Turn this branch into a mirror of another branch.
bzr push [LOCATION]
Update a mirror of this branch.
bzr reconcile [BRANCH]
Reconcile bzr metadata in a branch.
bzr register-branch BRANCH_URL
(From plugin "launchpad")
Register a branch with launchpad.net.
bzr remerge [FILE...]
Redo a merge.
bzr remove [FILE...]
Make a file unversioned.
bzr renames [DIR]
Show list of renamed files.
bzr resolve [FILE...]
Mark a conflict as resolved.
bzr revert [FILE...]
Revert files to a previous revision.
bzr revno [LOCATION]
Show current revision number.
bzr root [FILENAME]
Show the tree root directory.
bzr serve
Run the bzr server.
bzr sign-my-commits [LOCATION] [COMMITTER]
Sign all commits by a given committer.
bzr status [FILE...]
Display status summary.
bzr testament [BRANCH]
Show testament (signing-form) of a revision.
bzr unbind
Unbind the current branch from its master branch.
bzr uncommit [LOCATION]
Remove the last committed revision.
bzr unknowns
List unknown files.
bzr update [DIR]
Update a tree to have the latest code committed to its branch.
bzr upgrade [URL]
Upgrade branch storage to current format.
bzr version
Show version of bzr.
bzr version-info [LOCATION]
Generate version information about this tree.
bzr whoami [NAME]
Show or set bzr user id.
falko@server1:~/test/myproject$

Der Bazaar Benutzerleitfaden ist hier erhältlich: http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html

5 Links

0 Kommentar(e)

Zum Posten von Kommentaren bitte