Currently, dvc-diff with the mtn backend defaults to the workspace
revision, which is _not_ the head of the current branch after pull.
That is a reasonable default, but I'd like a simple way for the user
to override it.

For example, I want to do dvc-diff against the head before doing
dvc-update, to preview the changes.

To be clearer; when a mtn workspace is created:

mtn -d <db> --branch <branch> checkout .

mtn remembers the base revision of the workspace. Later, when 'mtn
diff' is executed, that revision is the base revision. 'mtn commit'
updates the base revision to the committed revision.

However, suppose the database is updated with upstream revisions:

mtn pull

The workspace files are not affected; only the database. The base
workspace revision is not changed, so it is now different from the
head of the branch. There also may be several heads of several
branches in the database, due to unmerged forks.

Then when dvc-diff is executed, the workspace base revision is used by
default. 'mtn diff' has an option to use a different revision as the
base; we need a simple way for the user to specify that using DVC.

One way would be a prefix arg; C-u C-x V = could mean "use head". That
would be ambiguous if there is more than one head.

Another way would be to create a menu of the available branch heads,
using the 'mtn heads' command.

Note that bzr works differently; 'bzr pull' changes the workspace
files, and 'dvc-diff' then shows the changes between the updated
workspace and the old bzr database. That gives the preview I'm looking
for; the changes can be reverted at that point if desired.

I don't know about the other backends.

-- 
-- Stephe

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to