From: Rob H. <for...@us...> - 2001-12-16 09:12:52
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv5684/lib/SandWeb Modified Files: Repository.pm Log Message: fixed some typos in Repository.pm/CVS.pm that prevented simple diff ( current sandbox version versus repo version ) from working. also did some formatting while i was there. There's alot of code duplication in CVS.pm and Repository.pm, I think they could get cut down to almost nothing, just as UI was. Ah, well, it's annoying, because it's not really high priority, but it makes stupid little bugs like this more frequent. I can see value in sitting down and cleaning these modules up before we go further, since they're just going to keep causing little bugs due to human error. Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -U2 -r1.13 -r1.14 --- Repository.pm 2001/12/10 18:33:33 1.13 +++ Repository.pm 2001/12/16 09:12:49 1.14 @@ -89,6 +89,8 @@ if ($repo_type eq 'CVS') { - %return = $vcs->admin(type => $type, - file => $file ); + %return = $vcs->admin( + type => $type, + file => $file, + ); } @@ -163,12 +165,16 @@ my $sandbox = $self->get_sandbox(); my %return = {}; - my $vcs = SandWeb::Repository::CVS->new(root => $root, - sandbox => $sandbox); + my $vcs = SandWeb::Repository::CVS->new( + root => $root, + sandbox => $sandbox, + ); if ($repo_type eq 'CVS') { - %return = $vcs->commit(message => $message, - rev => $rev, - recurse => $recurse, - file => $file ); + %return = $vcs->commit( + message => $message, + rev => $rev, + recurse => $recurse, + file => $file, + ); } @@ -181,38 +187,27 @@ my %args = @_; - my $rev => $args{'rev'}; - my $recurse => $args{'recurse'}; - my $file => $args{'file'}; + my $file = $args{'file'}; + my $rev = $args{'rev'}; + my $recurse = $args{'recurse'}; my $repo_type = $self->get_repo_type(); my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); my %return = {}; - my $vcs = SandWeb::Repository::CVS->new(root => $root, - sandbox => $sandbox); + my $vcs = SandWeb::Repository::CVS->new( + root => $root, + sandbox => $sandbox, + ); if ($repo_type eq 'CVS') { - %return = $vcs->diff( - type => $type, - date => $date, - rev => $rev, - recurse => $recurse, - file => $file, - ); + %return = $vcs->diff( + type => $type, + date => $date, + rev => $rev, + recurse => $recurse, + file => $file, + ); } return %return; - -# -D d1 Diff revision or date against working file. -# -# -D d2 Diff rev1/date1 against date2. -# -# -N include diffs for added and removed files. -# -# -r rev1 Diff revision for rev1 against working file. -# -# -r rev2 Diff rev1/date1 against rev2. -# -# --ifdef=arg Output diffs in ifdef format. - } @@ -232,7 +227,9 @@ if ($repo_type eq 'CVS') { - %return = $vcs->edit(action => $action, - recurse => $recurse, - file => $file ); + %return = $vcs->edit( + action => $action, + recurse => $recurse, + file => $file, + ); } |