1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #3538 resolved

Executing of reviewboard plugin with revision number instead of hash

Lukas Wöhrl
created an issue

The reviewboard plugin is executed with the revision numbers instead of the hash, this leads to weird diff creations. The parent is created as the first revision - 1 which is not necessarily true.

Part which get's the revisions

Parent is Rev - 1 ?

The plugin should be executed with the changeset hash, and the parent should be calculated correctly

Comments (6)

  1. Yuya Nishihara

    As you said, self.selectedRevs[0] - 1 is wrong, but is it correct to send the diff between the parent of selectedRevs[0] and the last selectedRevs ?

    I think it should post selectedRevs[0], selectedRevs[1], ... separately.

  2. Lukas Wöhrl reporter

    I think that depends, I ask myself if it is semantically correct to only select partly changesets inside a branch. If i have a branch with A -> B -> C and i select only Revision A and C, the diff A -> B + B -> C is the same as A -> C.

    But i don't know how reviewboard handles multiple posts.

    I also think that posting selectedRevs[0] as the parent is wrong, because selectedRevs[0] needs to make a diff to its parent. So this must be differently retrieved than selectedRevs[0] - 1

  3. Yuya Nishihara

    It's easy to retrieve the parent of the selectedRevs[0]:

    firstrev = selectedRevs[0]

    It can work around several cases. But it's still wrong if any of the selected revisions aren't contiguous.

  4. Lukas Wöhrl reporter

    How about retrieving the parent for each selected revision and post these as separate diffs?

    It would be maybe even better to check selectedRevs for contiguous parts and post only these as separate diffs.

  5. Yuya Nishihara

    How about retrieving the parent for each selected revision and post these as separate diffs?

    Posting selectedRevs[0], selectedRevs[1], ... separately? In that case, --parent option won't be necessary.

    I hope the reviewboard extension can handle multiple revisions.

  6. Log in to comment