[Bug 4317] New: push -r rev not respected by subrepositories

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Wed Jul 30 01:01:50 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4317

          Priority: normal
            Bug ID: 4317
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: push -r rev not respected by subrepositories
          Severity: bug
    Classification: Unclassified
                OS: Windows
          Reporter: mercurialbugs at mailinator.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: unspecified
         Component: Mercurial
           Product: Mercurial

there's a simple fix to subrepo.py

instead of the current push it's trying to do, it can use the revs that it has
in the 'opts' argument, i.e. it should become

        dest = self._repo.ui.expandpath('default-push', 'default')
        dest, branches = hg.parseurl(dest, opts.get('branch'))
        revs, checkout = hg.addbranchrevs(self._repo, self._repo, branches,
opts.get('rev'))
        if revs:
            revs = [self._repo.lookup(r) for r in scmutil.revrange(self._repo,
revs)]
        other = hg.peer(self._repo, {'ssh': ssh}, dsturl)
        res = self._repo.push(other, force, revs=revs, newbranch=newbranch)


clearly, the whole code in this area is a duplicate of 'commands.py:push', so
there should be a general refactoring to not duplicate this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list