git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Best method of detecting if list of commit refs is a parent
@ 2008-08-18  2:24 Thomas Harning Jr.
  2008-08-18  4:41 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Harning Jr. @ 2008-08-18  2:24 UTC (permalink / raw)
  To: git

I'm working on my 'Stick' git bug-tracking tool and am working on the
functionality to get a list of relevant bug-items at a specific point
in history.

Before I get into figuring out the 'best' way to do this, I thought
I'd at least get the simple single-item case of detecting if a
specific commit can be walked to from another commit... and that
doesn't seem to work as expected.

 git rev-list 0..Y --graph --abbrev-commit --abbrev=4
* Y
*   X
|\
| * d
| * c
| * b
* | E
* | D
* | C
* | B
|/
* A

For example... bug is reported to affect 'B'.. .user is at 'd' and is
wondering if said bug is listed as affecting him.
Command:
git rev-list B..d --graph ..  reports:
* d
* c
* b

... shouldn't this fail as the path from B to d doesn't really exist?
Or is there some better command or algorithm to use.
One mechanism that I thought 'could' work is to show the parents as
well and check that the last listed commit contains B ... but then I
can't take advantage of the no-output option for speed...

Now... into 'best method'...  given a list of N revisions with
associated bug-items, how would one determine the subset that revision
A is affected by.
Basically the bug storage mechanism is a directory structure w/ files
containing bug-items that can have one or more commit references....
to facilitate faster reports, a small database is used as a caching
mechanism to help create a distinct list of commits to worry about and
look up all the items associated w/ the status-processed commit...

Note: bug-items can mean anything from bug reported at X, bug-status
affected by X, or bug-closed at X  (at which case any previous items
related to a given bug could be ignored and not displayed... but
that's deeper implementation...).

I intend this bug tracker to be best-suited to git... but if other bug
trackers could have the mechanisms to provide this commit-tracking,
then those could be dropped in...
As for web interface idea... I'd probably have it "linked" to a
specific branch-head for its status-tracking............

-- 
Thomas Harning Jr.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-08-23  2:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-18  2:24 Best method of detecting if list of commit refs is a parent Thomas Harning Jr.
2008-08-18  4:41 ` Junio C Hamano
2008-08-18 13:37   ` Thomas Harning
2008-08-23  2:24     ` Thomas Harning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).