Ticket #1 (closed defect: fixed)
browse source doesn't work
| Reported by: | zooko@… | Owned by: | somebody |
|---|---|---|---|
| Priority: | critical | Component: | darcs backend |
| Version: | 1.0 | Keywords: | |
| Cc: |
Description
It says things like this:
No node at 'trunk/tests' in revision 1150
I suspect that there is a problem where trac+darcs is looking at a different darcs revision than it thinks it is. For one thing, going to changeset/1150 takes me to the same page as changeset/2396, because 1150 is the changeset number that trac+darcs has assigned to this patch, and "[r2396]" appears at the beginning of the patch comment.
It is a mystery to me how trac is figuring out to map "changeset/2396" to changeset #1150 based solely on this string at the beginning of the patch comment.
Change History
comment:2 Changed 7 years ago by anonymous
- Priority changed from major to blocker
trac-darcs gets all kinds of file (re)moves wrong, that bug is only the tip of the iceberg. a hack to make that specific one go away is:
-
tracdarcs/repos.py
old new 596 596 try: 597 597 node = history.next() 598 598 except StopIteration: 599 raise TracError, "No node at %r in revision %s" % (path, rev) 599 node = DarcsNode(path, rev, Node.FILE, Changeset.DELETE, self, 600 path, self.previous_rev(rev)) 601 # raise TracError, "No node at %r in revision %s" % (path, rev) 600 602 601 603 return node
if you apply that, you'll at least be able to browse the repo. however, the server locks up if i enter a directory that has files that were moved into it. also, it still shows directories that were deleted long ago (they're shown as empty)
my guess is that the entire handling of file disappearances has to be reviewed.
if you need a public repo to see the bug on, leave a note on http://asa.diac24.net/ and i'll start my tracd.
comment:3 Changed 7 years ago by zooko@…
As per discussion with Lele (a couple of months ago), this could probably be fixed by using "darcs annotate"'s builtin ability to give you the version of the filesystem that existed at the time of a specified patch. This would be a more elegant replacement for darcs+trac's current approach which doesn't ask darcs what the filesystem looked like at a specific patch but instead tries (not very hard) to guess. Alberto Bertogli's ann2ascii.py already exists to parse the output of "darcs annotate --patch=$PATCH".
comment:4 Changed 7 years ago by lele
- Priority changed from trivial to critical
- Component changed from component2 to darcs backend
I'd like for this to get fixed. I guess it would help if there were a trac instance containing public source code so that we could have an example of the problem...