Commits

Hidetaka Iwata committed 956f202

graph: remove unused options from revision_grapher

removed options:
- start_rev / stop_rev / follow

They seems to have hidden bugs as below:
- `follow` does not work when workingtree is shown.
- when `stop_rev` is specified, edges down to lower than stop_rev are shown.

  • Participants
  • Parent commits f1b9500

Comments (0)

Files changed (1)

tortoisehg/hgqt/graph.py

     """incremental revision grapher
 
     param repo       The repository
-    opt   start_rev  Tip-most revision of range to graph
-    opt   stop_rev   0-most revision of range to graph
-    opt   follow     True means graph only ancestors of start_rev
     opt   revset     set of revisions to graph.
-                     If used, then start_rev, stop_rev, and follow is ignored
     opt   branch     Only graph this branch
     opt   allparents If set in addition to branch, then cset outside the
                      branch that are ancestors to some cset inside the branch
                      is also graphed
 
-    This generator function walks through the revision history from
-    revision start_rev to revision stop_rev (which must be less than
-    or equal to start_rev) and for each revision emits tuples with the
-    following elements:
+    This generator function walks through the revision range in descending
+    order.
+    When revset is specified, range is from max(revset) to min(revset),
+    otherwise from working tree(pseudo revision) to rev0.
+    For each revision emits tuples with the following elements:
 
       - current revision
       - column of the current node in the set of ongoing edges
     if revset:
         start_rev = max(revset)
         stop_rev = min(revset)
-        follow = False
         hidden = lambda rev: (rev not in revset) or (rev in revhidden)
     else:
-        start_rev = opts.get('start_rev', None)
-        stop_rev = opts.get('stop_rev', 0)
-        follow = opts.get('follow', False)
+        start_rev = None
+        stop_rev = 0
         hidden = lambda rev: rev in revhidden
 
     assert start_rev is None or start_rev >= stop_rev
                 continue
 
             # New head.
-            if start_rev and follow and curr_rev != start_rev:
-                curr_rev -= 1
-                continue
             revs.append(curr_rev)
         rev_index = revs.index(curr_rev)
         next_revs = revs[:]