add --rebase to npull

Issue #35 new
Richard PALO
created an issue

It would be great to see '--rebase' added to npull if the rebase extension is enabled.

    --rebase                rebase working directory to branch head
 -t --tool VALUE            specify merge tool for rebase

The rebase extension wraps these onto pull in uisetup() so it doesn't seem to show up automatically. Perhaps hgnested could check to see if rebase is enabled and do the same.

Comments (4)

  1. Richard PALO reporter

    for proof of concept, here is a simple case for pull considering rebase:

    diff -r bd39764e6a83 hgnested/
    --- a/hgnested/      Wed Aug 10 10:02:26 2016 +0200
    +++ b/hgnested/      Sun Mar 11 09:21:43 2018 +0100
    @@ -335,3 +335,13 @@
         _nested_apply(ui, repo, commands.update, True, node=node, rev=rev,
                 clean=clean, date=date, check=check)
    +def extsetup(ui):
    +    try:
    +        rebasemod = extensions.find('rebase')
    +        cmdtable['npull'] = (cmdtable['npull'][0],
    +            cmdutil.findcmd('pull', commands.table)[1][1],
    +            cmdtable['npull'][2])
    +    except KeyError:
    +        # rebase extension not found
    +        return

    update: Unfortunately, I notice that even though --rebase is added in the test, using npull -uv --rebase does not give the same results as if pull -uv --rebase is done directly in the nested repository.

    I'm curious whether this might be the the fault of the rebase extension using wrappers which might not be in effect for the nested repositories... (re

  2. Richard PALO reporter


    -------- Message transféré --------
    Sujet : [Bug 5813] pull --rebase via hgnested's npull doesn't rebase correctly
    Date : Fri, 01 Jun 2018 06:16:26 +0000
    De :
    Pour :
    Augie Fackler <> changed:
               What    |Removed                     |Added
                 Status|UNCONFIRMED                 |NEED_EXAMPLE
         Ever confirmed|0                           |1
                     CC|                            |
    --- Comment #5 from Augie Fackler <> ---
    OOC, why hgnested (which I've never heard of) rather than hg's built in subrepo
    If you can use subrepos, we can probably help you, otherwise you're likely on
    your own...
    (Setting to "need example" because that's the closest I've got to a "chatting"
  3. Log in to comment