Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
Add bzr support
Browse files Browse the repository at this point in the history
It currently passes two tests and fails two tests.
  • Loading branch information
mndrix committed Feb 28, 2012
1 parent adf4d85 commit 02b1f94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ breaks your program at runtime (I hope you have a good test suite :-)
Running the Tests
-----------------

The tests currently support three tools: darcs, git, hg. Specify the
The tests currently support three tools: bzr, darcs, git, hg. Specify the
tool with the `VCS` environment variable.

$ env VCS=git perl -Ilib t/move-modify.t
Expand Down
6 changes: 6 additions & 0 deletions lib/Test/Merges.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ sub file {
# initialize a repository in the current directory
sub init {
given($ENV{VCS}) {
when('bzr') { system "bzr init" }
when('darcs') { system "darcs init" }
when('git') { system "git init" }
when('hg') { system "hg init" }
Expand All @@ -56,6 +57,7 @@ sub init {
sub add {
my @files = @_;
given($ENV{VCS}) {
when('bzr') { system "bzr add @files" }
when('darcs') { system "darcs add @files" }
when('git') { system "git add @files" }
when('hg') { system "hg add @files" }
Expand All @@ -66,6 +68,7 @@ sub add {
sub commit {
my ($message) = @_;
given($ENV{VCS}) {
when('bzr') { system "bzr commit -m '$message'" }
when('darcs') {
system "darcs record -a --skip-long-comment -m '$message'"
}
Expand All @@ -78,6 +81,7 @@ sub commit {
sub clone {
my ($source,$target) = @_;
given($ENV{VCS}) {
when('bzr') { system "bzr branch $source $target" }
when('darcs') {
system "darcs get --set-scripts-executable $source $target"
}
Expand All @@ -102,6 +106,7 @@ sub branch {
sub perform_merge {
my ($source) = @_;
given($ENV{VCS}) {
when('bzr') { system "bzr merge --show-base $source" }
when('darcs') {
system "darcs pull -a"
. " --no-allow-conflicts"
Expand Down Expand Up @@ -153,6 +158,7 @@ sub replace {
sub move {
my ($old,$new) = @_;
given($ENV{VCS}) {
when('bzr') { system "bzr mv $old $new" }
when('darcs') { system "darcs move $old $new" }
when('git') { system "git mv $old $new" }
when('hg') { system "hg mv $old $new" }
Expand Down

0 comments on commit 02b1f94

Please sign in to comment.