4012: rbt diff and rbt post don't handle revisions ranges in Mercurial consistently

glinders

What version are you running?

RBTools 0.7.4

What steps will reproduce the problem?

  1. commit a number of changesets in Mercurial
  2. try to 'rbt post' or 'rbt diff' two or three of them
  3. sometimes not all of the changesets are processed by rbt

What is the expected output? What do you see instead?

In some case I see the diff of 1 less than all changesets, I expect to see the diff of all changesets

What operating system are you using?

Windows XP

Attach the debug out from the command.

Note: The debug output is for 'rbt diff'. If I do an 'rbt post', the behaviour is the same.

C:\Dynamic\sandbox>rbt diff -d 47:49
>>> RBTools 0.7.4
>>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-XP-5.1.2600-SP2
>>> Home = C:\Documents and Settings\glinders\Application Data
>>> Current directory = C:\Dynamic\sandbox
>>> Running: git version
ERROR: Could not load SCM Client "git": [Error 2] The system cannot find the file specified
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> Checking for a Mercurial repository...
>>> Running: hg root
>>> Running: hg showconfig
>>> Running: hg svn info
>>> Command exited with rc 255: ['hg', 'svn', 'info']
hg: unknown command 'svn'
Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate      show changeset information by line for each file
 clone         make a copy of an existing repository
 commit        commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log           show revision history of entire repository or files
 merge         merge working directory with another revision
 pull          pull changes from the specified source
 push          push changes to the specified destination
 qdiff         diff of the current patch and subsequent modifications
 qnew          create a new patch
 qpop          pop the current patch off the stack
 qpush         push the next patch onto the stack
 qrefresh      update the current patch
 remove        remove the specified files on the next commit
 serve         start stand-alone webserver
 status        show changed files in the working directory
 summary       summarize working directory state
 update        update working directory (or switch revisions)

use "hg help" for the full list of commands or "hg -v" for details
---
>>> Using candidate path 'default': u'ssh://hg@nzchswhg.au.ivc/sandbox'
>>> repository info: Path: ssh://hg@nzchswhg.au.ivc/sandbox, Base path: , Supports changesets: False
>>> Making HTTP GET request to http://nzchswreviews.au.ivc/api/
>>> Running: hg parents --hidden -r 0
>>> Running: hg identify -i --hidden -r 47:49 --config "extensions.rbtoolsnormalize=C:\Program Files\RBTools\Python27\li
b\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Running: hg parents --hidden -r 2f64bb72d815 --template {node|short} --config "extensions.rbtoolsnormalize=C:\Progra
m Files\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Running: hg -q outgoing --template {rev}\t{node|short}\t{branch}\n default -r e05300d9c85c
>>> Found outgoing changeset 45:3562b0ddaecb
>>> Found outgoing changeset 46:087f55543671
>>> Found outgoing changeset 47:550b70221c10
>>> Found outgoing changeset 48:e05300d9c85c
>>> 4 outgoing changesets between remote and base.
>>> Running: hg parents --hidden -r 3562b0ddaecb --template {node|short} --config "extensions.rbtoolsnormalize=C:\Progra
m Files\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Identified 33d3d055aaca as parent base
>>> Running: hg diff --hidden -r e05300d9c85c -r 2f64bb72d815 --config "extensions.rbtoolsnormalize=C:\Program Files\RBT
ools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Running: hg locate -r e05300d9c85c
>>> Running: hg locate -r 2f64bb72d815
>>> Running: hg diff --hidden -r 33d3d055aaca -r e05300d9c85c --config "extensions.rbtoolsnormalize=C:\Program Files\RBT
ools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Running: hg locate -r 33d3d055aaca
>>> Running: hg locate -r e05300d9c85c
diff -r e05300d9c85c -r 2f64bb72d815 f1
--- a/f1        Mon Nov 09 11:31:04 2015 +1300
+++ b/f1        Mon Nov 09 11:31:14 2015 +1300
@@ -1,3 +1,4 @@
 c1
 c2
 c3
+c4


C:\Dynamic\sandbox>rbt diff -d 48:49
>>> RBTools 0.7.4
>>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-XP-5.1.2600-SP2
>>> Home = C:\Documents and Settings\glinders\Application Data
>>> Current directory = C:\Dynamic\sandbox
>>> Running: git version
ERROR: Could not load SCM Client "git": [Error 2] The system cannot find the file specified
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> Checking for a Mercurial repository...
>>> Running: hg root
>>> Running: hg showconfig
>>> Running: hg svn info
>>> Command exited with rc 255: ['hg', 'svn', 'info']
hg: unknown command 'svn'
Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate      show changeset information by line for each file
 clone         make a copy of an existing repository
 commit        commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log           show revision history of entire repository or files
 merge         merge working directory with another revision
 pull          pull changes from the specified source
 push          push changes to the specified destination
 qdiff         diff of the current patch and subsequent modifications
 qnew          create a new patch
 qpop          pop the current patch off the stack
 qpush         push the next patch onto the stack
 qrefresh      update the current patch
 remove        remove the specified files on the next commit
 serve         start stand-alone webserver
 status        show changed files in the working directory
 summary       summarize working directory state
 update        update working directory (or switch revisions)

use "hg help" for the full list of commands or "hg -v" for details
---
>>> Using candidate path 'default': u'ssh://hg@nzchswhg.au.ivc/sandbox'
>>> repository info: Path: ssh://hg@nzchswhg.au.ivc/sandbox, Base path: , Supports changesets: False
>>> Making HTTP GET request to http://nzchswreviews.au.ivc/api/
>>> Running: hg parents --hidden -r 0
>>> Running: hg identify -i --hidden -r 48:49 --config "extensions.rbtoolsnormalize=C:\Program Files\RBTools\Python27\li
b\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Running: hg parents --hidden -r 2f64bb72d815 --template {node|short} --config "extensions.rbtoolsnormalize=C:\Progra
m Files\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Running: hg -q outgoing --template {rev}\t{node|short}\t{branch}\n default -r e05300d9c85c
>>> Found outgoing changeset 45:3562b0ddaecb
>>> Found outgoing changeset 46:087f55543671
>>> Found outgoing changeset 47:550b70221c10
>>> Found outgoing changeset 48:e05300d9c85c
>>> 4 outgoing changesets between remote and base.
>>> Running: hg parents --hidden -r 3562b0ddaecb --template {node|short} --config "extensions.rbtoolsnormalize=C:\Progra
m Files\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Identified 33d3d055aaca as parent base
>>> Running: hg diff --hidden -r e05300d9c85c -r 2f64bb72d815 --config "extensions.rbtoolsnormalize=C:\Program Files\RBT
ools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Running: hg locate -r e05300d9c85c
>>> Running: hg locate -r 2f64bb72d815
>>> Running: hg diff --hidden -r 33d3d055aaca -r e05300d9c85c --config "extensions.rbtoolsnormalize=C:\Program Files\RBT
ools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\helpers\hgext.py"
>>> Running: hg locate -r 33d3d055aaca
>>> Running: hg locate -r e05300d9c85c
diff -r e05300d9c85c -r 2f64bb72d815 f1
--- a/f1        Mon Nov 09 11:31:04 2015 +1300
+++ b/f1        Mon Nov 09 11:31:14 2015 +1300
@@ -1,3 +1,4 @@
 c1
 c2
 c3
+c4


C:\Dynamic\sandbox>

Please provide any additional information below.

The first command rbt diff -d 47:49 only shows the diff for revisions 48 and 49. The second command rbt diff -d 48:49 gives the same output. I would expect to see:

C:\Dynamic\sandbox>rbt diff 47:49
diff -r 550b70221c10 -r 2f64bb72d815 f1
--- a/f1        Mon Nov 09 11:30:56 2015 +1300
+++ b/f1        Mon Nov 09 11:31:14 2015 +1300
@@ -1,2 +1,4 @@
 c1
 c2
+c3
+c4

My revision history is:

C:\Dynamic\sandbox>hg hist -r -5:
changeset:   45:3562b0ddaecb
user:        user
date:        Mon Nov 09 11:30:26 2015 +1300
summary:     starting point

changeset:   46:087f55543671
user:        user
date:        Mon Nov 09 11:30:48 2015 +1300
summary:     change 1

changeset:   47:550b70221c10
user:        user
date:        Mon Nov 09 11:30:56 2015 +1300
summary:     change 2

changeset:   48:e05300d9c85c
user:        user
date:        Mon Nov 09 11:31:04 2015 +1300
summary:     change 3

changeset:   49:2f64bb72d815
tag:         tip
user:        user
date:        Mon Nov 09 11:31:14 2015 +1300
summary:     change 4

The diffs are:

C:\Dynamic\sandbox>hg diff -r 47:48
diff -r 550b70221c10 -r e05300d9c85c f1
--- a/f1        Mon Nov 09 11:30:56 2015 +1300
+++ b/f1        Mon Nov 09 11:31:04 2015 +1300
@@ -1,2 +1,3 @@
 c1
 c2
+c3

C:\Dynamic\sandbox>hg diff -r 48:49
diff -r e05300d9c85c -r 2f64bb72d815 f1
--- a/f1        Mon Nov 09 11:31:04 2015 +1300
+++ b/f1        Mon Nov 09 11:31:14 2015 +1300
@@ -1,3 +1,4 @@
 c1
 c2
 c3
+c4

C:\Dynamic\sandbox>hg diff -r 47:49
diff -r 550b70221c10 -r 2f64bb72d815 f1
--- a/f1        Mon Nov 09 11:30:56 2015 +1300
+++ b/f1        Mon Nov 09 11:31:14 2015 +1300
@@ -1,2 +1,4 @@
 c1
 c2
+c3
+c4

C:\Dynamic\sandbox>