• 
      
    Fish Trophy

    brennie got a fish trophy!

    Fish Trophy

    Generate commit histories with Mercurial

    Review Request #10101 — Created July 24, 2018 and submitted

    Information

    RBTools
    master
    7b3cc01...

    Reviewers

    The Mercurial SCM tool can now generate commit histories so that it can
    be used to create review requests with history.

    Posted review requests with history.

    Description From Last Updated

    E303 too many blank lines (2)

    reviewbotreviewbot

    F821 undefined name 'NO_PARENT'

    reviewbotreviewbot

    Byte string prefix? We'd need it above as well.

    chipx86chipx86

    Byte string prefix?

    chipx86chipx86

    Alphabetical order.

    chipx86chipx86

    This should say that it raises NotImplementedError under the conditions.

    chipx86chipx86

    It'd be nice to know where the revisions come from.

    chipx86chipx86

    Just to check, is \\x1f right, or would \x1f be right?

    chipx86chipx86

    We use these special markers in several places. Let's make them constants so it's readable and consistent.

    chipx86chipx86

    This was reordered but wasn't put in alphabetical order.

    chipx86chipx86

    I think the function name changed in a parent change. Can you retest with that?

    chipx86chipx86

    Must be the full path: rbtools.clients.errors.SCMError.

    chipx86chipx86

    It'd be nice to have these as constants like with Git, to help with readability.

    chipx86chipx86

    Is there any reason why we couldn't just do if entry['parent2'] != self.NO_PARENT? We don't use it elsewhere, and it …

    daviddavid

    Missing period.

    chipx86chipx86
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    brennie
    chipx86
    1. 
        
    2. rbtools/clients/mercurial.py (Diff revision 2)
       
       
      Show all issues

      Byte string prefix?

      We'd need it above as well.

    3. rbtools/clients/mercurial.py (Diff revision 2)
       
       
       
      Show all issues

      Byte string prefix?

    4. 
        
    brennie
    brennie
    chipx86
    1. 
        
    2. rbtools/clients/mercurial.py (Diff revision 4)
       
       
       
      Show all issues

      Alphabetical order.

    3. rbtools/clients/mercurial.py (Diff revision 4)
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      This should say that it raises NotImplementedError under the conditions.

    4. rbtools/clients/mercurial.py (Diff revision 4)
       
       
       
      Show all issues

      It'd be nice to know where the revisions come from.

    5. rbtools/clients/mercurial.py (Diff revision 4)
       
       
      Show all issues

      Just to check, is \\x1f right, or would \x1f be right?

      1. \ is correct. We are giving the string "\x1f" (instead of the character 0x1F) to Hg. Ill switch it to a raw string.

    6. rbtools/clients/mercurial.py (Diff revision 4)
       
       
       
      Show all issues

      We use these special markers in several places. Let's make them constants so it's readable and consistent.

      1. We actually use \x1f (the character) and \\x1f (a string which contains a python escape sequence).

    7. 
        
    brennie
    chipx86
    1. 
        
    2. rbtools/clients/mercurial.py (Diff revision 5)
       
       
       
      Show all issues

      This was reordered but wasn't put in alphabetical order.

    3. rbtools/clients/mercurial.py (Diff revision 5)
       
       
      Show all issues

      I think the function name changed in a parent change. Can you retest with that?

      1. it did but the call sites didnt change. Ill fix that up.

    4. rbtools/clients/mercurial.py (Diff revision 5)
       
       
      Show all issues

      Must be the full path: rbtools.clients.errors.SCMError.

    5. rbtools/clients/mercurial.py (Diff revision 5)
       
       
       
      Show all issues

      It'd be nice to have these as constants like with Git, to help with readability.

    6. 
        
    brennie
    david
    1. 
        
    2. rbtools/clients/mercurial.py (Diff revision 6)
       
       
       
       
      Show all issues

      Is there any reason why we couldn't just do if entry['parent2'] != self.NO_PARENT? We don't use it elsewhere, and it seems like it's always going to be present (pop will throw an exception by default if not).

      1. It will always be present, but we do not want it present in the history entry.

      2. Can you add a comment explaining that?

    3. 
        
    brennie
    david
    1. Ship It!

    2. 
        
    brennie
    david
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. rbtools/clients/mercurial.py (Diff revision 8)
       
       
      Show all issues

      Missing period.

    3. 
        
    brennie
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (3d72ad6)