1. 15 9月, 2007 2 次提交
  2. 05 9月, 2007 1 次提交
  3. 30 8月, 2007 1 次提交
    • P
      gitk: Add a cache for the topology info · 5cd15b6b
      Paul Mackerras 提交于
      This adds code to write out the topology information used to determine
      precedes/follows and branch information into a cache file (~3.5MB for
      the kernel tree).  At startup we read the cache file and then do a
      git rev-list to update it, which is fast because we exclude all commits
      in the cache that have no children and commits reachable from them
      (which amounts to everything in the cache).  If one of those commits
      without children no longer exists, then git rev-list will give an error,
      whereupon we throw away the cache and read in the whole tree again.
      
      This gives a significant speedup in the startup time for gitk.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5cd15b6b
  4. 29 8月, 2007 3 次提交
    • P
      gitk: Fix bug causing undefined variable error when cherry-picking · 6eaaccd1
      Paul Mackerras 提交于
      When "Show nearby tags" is turned off and the user did a cherry-pick,
      we were trying to access variables relating to the descendent/ancestor
      tag & head computations in addnewchild though they hadn't been set.
      This makes sure we don't do that.  Reported by Johannes Sixt.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6eaaccd1
    • P
      gitk: Fix bug causing incorrect ref list contents when switching view · df904497
      Paul Mackerras 提交于
      If the view we're switching to hadn't been read in, we hit an early
      return in showview which meant we didn't update the ref list window.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      df904497
    • P
      gitk: Do only the parts of the layout that are needed · 0380081c
      Paul Mackerras 提交于
      This changes layoutrows and optimize_rows to make it possible to lay
      out only a little bit more of the graph than is visible, rather than
      having to lay out the whole graph from top to bottom.  To lay out
      some of the graph without starting at the top, we use the new make_idlist
      procedure for the first row, then lay it out proceeding downwards
      as before.  Empty list elements in rowidlist are used to denote rows
      that haven't been laid out yet.
      
      Optimizing happens much as before except that we don't try to optimize
      unless we have three consecutive rows laid out (or the top 2 rows).
      We have a new list, rowisopt, to record which rows have been optimized.
      
      If we change a row that has already been drawn, we set a flag which
      causes drawcommits to throw away everything drawn on the canvas and redraw
      the visible rows.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0380081c
  5. 24 8月, 2007 1 次提交
    • P
      gitk: Get rid of the rowchk array · 8f0bc7e9
      Paul Mackerras 提交于
      Instead, when looking for lines that should be terminated with a down
      arrow, we look at the parents of the commit $downarrowlen + 1 rows
      before.  This gets rid of one more place where we are assuming that
      all the rows are laid out in order from top to bottom.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8f0bc7e9
  6. 23 8月, 2007 2 次提交
    • P
      gitk: Fix some problems with the display of ids as links · 97645683
      Paul Mackerras 提交于
      First, this fixes the problem where a SHA1 id wouldn't be displayed
      as a link if it wasn't in the part of the graph that had been laid
      out at the time the details pane was filled in, even if that commit
      later became part of the graph.  This arranges for us to turn the
      SHA1 id into a link when we get to that id in laying out the graph.
      
      Secondly, there was a problem where the cursor wouldn't always turn
      to a hand when over a link, because the areas for two links could
      overlap slightly.  This fixes that by using a counter rather than
      always reverting to a counter when we leave the region of a link
      (which can happen just after we've entered a different link).
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      97645683
    • P
      gitk: Get rid of idinlist array · b0cdca99
      Paul Mackerras 提交于
      This changes layoutrows to use information from rowidlist and children
      to work out which parent ids are appearing for the first time or need
      an up arrow, instead of using idinlist.  To detect the situation where
      git log doesn't give us all the commits it references, this adds an
      idpending array that is updated and used by getcommitlines.
      
      This also fixes a bug where we weren't resetting the ordertok array when
      updating the list of commits; this fixes that too, and a bug where we
      could try to access an undefined element of commitrow if the user did
      an update before gitk had finished reading in the graph.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b0cdca99
  7. 22 8月, 2007 1 次提交
    • P
      gitk: Get rid of idrowranges and rowrangelist · 92ed666f
      Paul Mackerras 提交于
      Instead make the rowranges procedure compute its result by looking
      in the rowidlist entries for the rows around the children of the id
      and the id itself.  This turns out not to take too long, and not having
      to maintain idrowranges and rowrangelist speeds up the layout.
      
      This also makes optimize_rows not use rowranges, since all it really
      needed was a way to work out if one id is the first child of another,
      so it can just look at the children list.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      92ed666f
  8. 20 8月, 2007 2 次提交
  9. 17 8月, 2007 2 次提交
  10. 15 8月, 2007 3 次提交
  11. 13 8月, 2007 4 次提交
  12. 12 8月, 2007 6 次提交
  13. 01 8月, 2007 1 次提交
    • P
      gitk: Improve the drawing of links to parent lines · 513a54dc
      Paul Mackerras 提交于
      The way gitk used to draw the lines joining a commit to the lines
      representing its parents was sometimes visually ambiguous, especially
      when the line to the parent had a corner that coincided with a corner
      on another line.
      
      This improves things by using a smaller slanting section on the line
      joining a commit to a parent line if the parent line is vertical where
      it joins on.  It also optimizes the drawing a little in the case where
      the parent line slants towards this commit already.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      513a54dc
  14. 31 7月, 2007 1 次提交
    • P
      gitk: Establish and use global left-to-right ordering for commits · 6e8c8707
      Paul Mackerras 提交于
      This creates an "ordering token" for each commit which establishes
      a total ordering for commits and is used to order the commits from
      left to right on a row.  The ordering token is assigned when a commit
      is first encountered or when it is first listed as a parent of some
      other commit, whichever comes first.  The ordering token is a string
      of variable length.  Parents that don't already have an ordering
      token are assigned one by appending to the child's token; the first
      parent gets a "0" on the end, the second "1" and so on.  As an
      optimization, the "0" isn't appended if the child only has one parent.
      
      When inserting a new commit into an element of rowidlist, it is
      inserted in the position which makes the ordering tokens increase
      from left to right.
      
      This also simplifies the layout code by getting rid of the rowoffsets
      variable, and terminates lines with an arrow after 5 rows if the line
      would be longer than about 110 rows (rather than letting them go on
      and terminating them later with an arrow if the graph gets too wide).
      
      The effect of having the total ordering, and terminating the lines
      early, is that it will be possible to lay out only a part of the graph
      rather than having to do the whole thing top to bottom.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6e8c8707
  15. 27 7月, 2007 1 次提交
  16. 26 7月, 2007 1 次提交
    • P
      gitk: Fix bugs in the Find function · 005a2f4e
      Paul Mackerras 提交于
      This fixes the problem reported by Brian Downing where searching for
      a string that doesn't exist would give a Tcl error.  The basic problem
      was that we weren't reading the data for the last commit since it
      wasn't terminated with a null.  This effectively adds a null on the end
      (if there isn't one already) to make sure we process the last commit.
      
      This also makes the yellow background behind instances of the search
      string appear more consistently, and fixes a bug where the "/" key
      would just find the same commit again and again instead of advancing.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      005a2f4e
  17. 23 7月, 2007 1 次提交
    • P
      gitk: Wait for the window to become visible after creating it · 0eafba14
      Paul Mackerras 提交于
      When the git log process returned an error immediately, we were
      sometimes getting no main window and no error window displayed,
      with the gitk process just hanging waiting for something.  It appears
      that the tkwait in show_error, which waits for the error window to
      be destroyed, wasn't sufficient to allow the main window or the error
      window to be mapped.
      
      This adds a wait in the main startup code after the main window
      has been created to wait until it is visible.  This seems to fix the
      problem.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0eafba14
  18. 22 7月, 2007 3 次提交
  19. 13 7月, 2007 2 次提交
    • P
      gitk: Show changes in index and changes in working directory separately · 8f489363
      Paul Mackerras 提交于
      This makes gitk show up to two fake commits when there are local changes
      in the repository; one to represent the state of the index and one to
      represent the state of the working directory.  The commit representing
      the working directory is colored red as before; the commit representing
      the index state is colored magenta (as being between red and blue in
      some sense).
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8f489363
    • P
      gitk: Fix bug introduced by previous commit · 6ebedabf
      Paul Mackerras 提交于
      When I added the "--" case to the code scanning the arguments, I missed
      the fact that since the switch statement uses -regexp, the "--" case
      will match any argument containing "--", e.g. "--all".  This fixes it
      by taking out the -regexp (since we don't actually need regular
      expression matching) and adjusting the match strings.
      
      A side effect of this is that previously any argument starting with
      "-d" would be taken to indicate date mode; now the argument has to be
      exactly "-d" if you want date mode.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6ebedabf
  20. 12 7月, 2007 1 次提交
    • P
      gitk: Improve handling of -- and ambiguous arguments · cdaee5db
      Paul Mackerras 提交于
      This makes gitk more consistent with git rev-list and git log in its
      handling of arguments that could be either a revision or a filename;
      now gitk displays an error message and quits, rather than treating it
      as a revision and getting an error in the underlying git log.  Now
      gitk always passes "--" to git log even if no filenames are being
      specified.
      
      It also makes gitk display errors in invoking git log in a window
      rather than on stderr, and makes gitk stop looking for a -d flag
      when it sees a "--" argument.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cdaee5db
  21. 09 7月, 2007 1 次提交
    • P
      gitk: Use git log and add support for --left-right · c961b228
      Paul Mackerras 提交于
      This is based on patches from Linus Torvalds and Junio Hamano, so the
      ideas here are theirs.
      
      This makes gitk use "git log -z --pretty=raw" instead of "git rev-list"
      to generate the list of commits, and also makes it grok the "<" and ">"
      markers that git log (and git rev-list) output with the --left-right
      flag to indicate which side of a symmetric diff a commit is reachable
      from.  Left-side commits are drawn with a triangle pointing leftwards
      instead of a circle, and right-side commits are drawn with a triangle
      pointing rightwards.  The commitlisted list is used to store the
      left/right information as well as the information about whether each
      commit is on the boundary.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c961b228