Class: Amp::Repositories::DirStateEntry
- Defined in:
- lib/amp/repository/dir_state.rb
Overview
An entry in the dirstate. Similar to IndexEntry for revlogs. Simple struct, that’s all.
Instance Attribute Summary collapse
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#mtime ⇒ Object
Returns the value of attribute mtime.
-
#size ⇒ Object
Returns the value of attribute size.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #added? ⇒ Boolean
-
#dirty? ⇒ Boolean
Do I represent a dirty object?.
- #forgotten? ⇒ Boolean
-
#maybe_dirty? ⇒ Boolean
Do I possibly represent a dirty object?.
- #merged? ⇒ Boolean
- #modified? ⇒ Boolean
- #normal? ⇒ Boolean
-
#removed? ⇒ Boolean
shortcuts!.
- #untracked? ⇒ Boolean
Instance Attribute Details
#mode ⇒ Object
Returns the value of attribute mode
7 8 9 |
# File 'lib/amp/repository/dir_state.rb', line 7 def mode @mode end |
#mtime ⇒ Object
Returns the value of attribute mtime
7 8 9 |
# File 'lib/amp/repository/dir_state.rb', line 7 def mtime @mtime end |
#size ⇒ Object
Returns the value of attribute size
7 8 9 |
# File 'lib/amp/repository/dir_state.rb', line 7 def size @size end |
#status ⇒ Object
Returns the value of attribute status
7 8 9 |
# File 'lib/amp/repository/dir_state.rb', line 7 def status @status end |
Instance Method Details
#added? ⇒ Boolean
12 |
# File 'lib/amp/repository/dir_state.rb', line 12 def added?; self.status == :added; end |
#dirty? ⇒ Boolean
Do I represent a dirty object?
23 24 25 |
# File 'lib/amp/repository/dir_state.rb', line 23 def dirty? self[-2] == -2 && self[-1] == -1 && self.normal? end |
#forgotten? ⇒ Boolean
17 |
# File 'lib/amp/repository/dir_state.rb', line 17 def forgotten?; self.status == :forgotten; end |
#maybe_dirty? ⇒ Boolean
Do I possibly represent a dirty object?
31 32 33 |
# File 'lib/amp/repository/dir_state.rb', line 31 def maybe_dirty? self[-2] == -1 && self[-1] == -1 && self.normal? end |
#merged? ⇒ Boolean
15 |
# File 'lib/amp/repository/dir_state.rb', line 15 def merged?; self.status == :merged; end |
#modified? ⇒ Boolean
14 |
# File 'lib/amp/repository/dir_state.rb', line 14 def modified?; self.status == :modified; end |
#normal? ⇒ Boolean
16 |
# File 'lib/amp/repository/dir_state.rb', line 16 def normal?; self.status == :normal; end |
#removed? ⇒ Boolean
shortcuts!
11 |
# File 'lib/amp/repository/dir_state.rb', line 11 def removed?; self.status == :removed; end |
#untracked? ⇒ Boolean
13 |
# File 'lib/amp/repository/dir_state.rb', line 13 def untracked?; self.status == :untracked; end |