Module: Subversion::SvnCommand::Revisions
- Defined in:
- lib/subwrap/svn_command.rb
Overview
:todo: Pre-fetch svn diff in the background (fork the process) so you don’t have to wait, in interactive mode. :todo: When calling this command on a single file,
-
default to not showing all that annoying list of files (-v) but yes to automatically showing diffs.
-
currently defaults to showingly only changes to this file, but should be option for View this changeset to show the full changeset
:todo: add number aliases (1) for view changeset, etc. so you can use numpad exclusively :todo: rename interactive mode to different name, s.a. browse_revisions Add –grep option to non-interactively search all changesets returned for a pattern.
Instance Method Summary collapse
- #__author(author) ⇒ Object
- #__back_to(revision) ⇒ Object
-
#__by(author) ⇒ Object
Only show revisions that were committed by a certain author.
-
#__fetch_all_diffs_up_front ⇒ Object
————————————————————————-.
-
#__from(revision) ⇒ Object
(also: #__since)
————————————————————————- revision can be revision number or date.
- #__interactive ⇒ Object
- #__newest_first ⇒ Object (also: #__reverse, #__backwards)
- #__no_file_list ⇒ Object
-
#__non_interactive ⇒ Object
(also: #__ni)
————————————————————————- Automatically fetch and print all diffs, pipe to a pager.
-
#__oldest_first ⇒ Object
(also: #__forward, #__forwards, #__chronological)
————————————————————————- Start at earlier revision and go forwards rather than starting at the latest revision.
-
#__revision(revisions) ⇒ Object
(also: #_r)
————————————————————————-.
-
#__show_diffs ⇒ Object
(also: #__auto_diffs)
————————————————————————- Show diffs automatically for each revision without the user having to press v.
-
#__show_file_list ⇒ Object
————————————————————————-.
-
#__since_last_update ⇒ Object
(also: #__from_base, #__since_base, #__new, #__whats_new)
————————————————————————- :todo: Problem: I often forget to run this before doing an svn update.
-
#__unreviewed_only ⇒ Object
————————————————————————- Only show revisions that are in need of a code review :todo:.
-
#documentation ⇒ Object
————————————————————————-.
Instance Method Details
#__author(author) ⇒ Object
1495 1496 1497 |
# File 'lib/subwrap/svn_command.rb', line 1495 def () @author_filter = end |
#__back_to(revision) ⇒ Object
1433 1434 1435 1436 |
# File 'lib/subwrap/svn_command.rb', line 1433 def __back_to(revision) @revisions = "#{revision}:head" @newest_first_default = true end |
#__by(author) ⇒ Object
Only show revisions that were committed by a certain author. :todo:
1492 1493 1494 |
# File 'lib/subwrap/svn_command.rb', line 1492 def __by() @author_filter = end |
#__fetch_all_diffs_up_front ⇒ Object
1450 1451 1452 1453 |
# File 'lib/subwrap/svn_command.rb', line 1450 def __fetch_all_diffs_up_front # :todo: # So that when you're actually stepping through revisions, viewing a diff is instantaneous... end |
#__from(revision) ⇒ Object Also known as: __since
revision can be revision number or date. :todo: allow ‘yesterday’, etc. or absolute time
Use chronic?
:todo:
1427 1428 1429 1430 |
# File 'lib/subwrap/svn_command.rb', line 1427 def __from(revision) @revisions = "#{revision}:head" @newest_first_default = false end |
#__interactive ⇒ Object
1479 1480 1481 |
# File 'lib/subwrap/svn_command.rb', line 1479 def __interactive @interactive = true end |
#__newest_first ⇒ Object Also known as: __reverse, __backwards
1464 1465 1466 |
# File 'lib/subwrap/svn_command.rb', line 1464 def __newest_first @newest_first = true end |
#__no_file_list ⇒ Object
1447 |
# File 'lib/subwrap/svn_command.rb', line 1447 def __no_file_list; @show_file_list = false; end |
#__non_interactive ⇒ Object Also known as: __ni
Automatically fetch and print all diffs, pipe to a pager. Great for catching up on what’s new, skimming through recent commits. (Whereas intercative mode is better for investigating, searching for the right commit that corresponds to some change you noticed, etc.)
1474 1475 1476 |
# File 'lib/subwrap/svn_command.rb', line 1474 def __non_interactive @interactive = false end |
#__oldest_first ⇒ Object Also known as: __forward, __forwards, __chronological
Start at earlier revision and go forwards rather than starting at the latest revision
1457 1458 1459 |
# File 'lib/subwrap/svn_command.rb', line 1457 def __oldest_first @newest_first = false end |
#__revision(revisions) ⇒ Object Also known as: _r
1402 1403 1404 |
# File 'lib/subwrap/svn_command.rb', line 1402 def __revision(revisions) @revisions = revisions end |
#__show_diffs ⇒ Object Also known as: __auto_diffs
Show diffs automatically for each revision without the user having to press v
1440 1441 1442 |
# File 'lib/subwrap/svn_command.rb', line 1440 def __show_diffs @show_diffs = true end |
#__show_file_list ⇒ Object
1446 |
# File 'lib/subwrap/svn_command.rb', line 1446 def __show_file_list; @show_file_list = true; end |
#__since_last_update ⇒ Object Also known as: __from_base, __since_base, __new, __whats_new
:todo: Problem: I often forget to run this before doing an svn update. But as soon as I do an update, base is updated and now there is nothing new since last update. Possible solution: Keep a log of updates (at least all updates that use this wrapper) and let you go back to any previous update as your starting point if you’ve updated very recently and want to go back farther than that. (Or maybe .svn has a record of the previous update time somewhere that we can pick up?) Also, as soon as you do an svn revisions, it detects that it’s out of date and forces an update, making it so that you can’t repeat the command and get the same results.
1413 1414 1415 1416 |
# File 'lib/subwrap/svn_command.rb', line 1413 def __since_last_update @revisions = '%base%:head' @newest_first_default = false end |
#__unreviewed_only ⇒ Object
Only show revisions that are in need of a code review :todo:
1486 1487 1488 |
# File 'lib/subwrap/svn_command.rb', line 1486 def __unreviewed_only @unreviewed_only = true end |
#documentation ⇒ Object
1395 1396 1397 1398 1399 |
# File 'lib/subwrap/svn_command.rb', line 1395 def documentation "Examples: > subwrap revisions --limit 5 -r {2008-06-10}:head . " end |