-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a WorkingCopy class to allow for more than just individual file…
…s, and updated VersionedFile to work with it. git-svn-id: http://svn.textmate.org/trunk/Bundles/CVS.tmbundle@2742 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
- Loading branch information
Brian Donovan
committed
Feb 22, 2006
1 parent
ad6caf4
commit 31c9e71
Showing
2 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module CVS | ||
class WorkingCopy < VersionedFile | ||
def initialize(path) | ||
@path = (path =~ %r{/$}) ? path : "#{path}/" # add / if not there | ||
end | ||
|
||
def basename | ||
'.' | ||
end | ||
|
||
def status | ||
cvs(:update, :pretend => true, :quiet => true).inject([]) do |files,line| | ||
files << {$1 => status_for_line line} if line =~ /^\S (.*)$/ | ||
files | ||
end | ||
end | ||
end | ||
end |