sapling/fastannotate
Jun Wu dc07b62633 fastannotate: handle "draft" paths, and renames correctly
Summary:
Previously we can only answer the "path" information when the revision is in
the linelog revmap, and the code would crash if a revision is in a side
branch, and the user requests path information. This diff fixes it.

Besides, this diff improves rename handling. For example, given the following
chart:

```
  o---o  -o   file name: a
        /
  o---o-      file name: b
  ^   ^   ^
  1   2   3   revisions
```

Depending on the position of the `main branch` reference, fastannotate may
or may not use linelog:

- main branch is at rev 2, annotate a -r 3 will not take advantage of linelog
  (fallback to slow annotate)
- main branch is at rev 3, annotate a -r 2 will not take advantage of linelog

This is not ideal, but seems to be the best we can do for now.

Test Plan:
Added a new test, updated existing relevant tests. Some debug messages are
changed to reflect internals more precisely.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4010964

Signature: t1:4010964:1476458201:79875d96399d023d0000d0c4bb8b8d40ea43eef0
2016-10-09 19:47:01 +01:00
..
__init__.py fastannotate: document defaultformat 2016-10-12 22:05:03 +01:00
commands.py fastannotate: add diffopts 2016-10-08 15:58:21 +01:00
context.py fastannotate: handle "draft" paths, and renames correctly 2016-10-09 19:47:01 +01:00
error.py fastannotate: move exception classes to error.py 2016-09-08 14:47:49 +01:00
formatter.py fastannotate: add a --deleted option 2016-09-11 22:52:29 +01:00
hgwebsupport.py fastannotate: add hgweb support 2016-10-09 15:19:18 +01:00
revmap.py fastannotate: handle "draft" paths, and renames correctly 2016-10-09 19:47:01 +01:00