devopshq / tfs

Microsoft TFS API Python client
https://devopshq.github.io/tfs/
MIT License
110 stars 28 forks source link

get_changesets with item_path not restricting based on from and to #74

Closed fuzzmz closed 5 years ago

fuzzmz commented 5 years ago

When trying to get all changesets starting from a specific one affecting a specific folder or branch, get_changesets returns all changes (basically ignores the from_ directive).

For example let's say that we have the following:

  1. source location = $/sample/test
  2. source location history = changesets 1, 2, 3, 4, 5, 6

Running get_changesets(from_=4, item_path='$/sample/test') returns all changesets (1, 2, 3, 4, 5, 6) instead of just 5 and 6.

This is equivalent to just running get_changesets(item_path='$/sample/test')

fuzzmz commented 5 years ago

Think I found where the issue is: looks like you can't just use from_ without to_; if you do that it just ignores the from.

Going to make a PR which changes this behavior in the following way:

  1. if just from_ is specified, assume that to_ is the latest changeset
  2. if just to_ is specified, assume that you want the history starting the from the first available changeset up to the specified one.