Issue #2596 resolved

"Pull to here" error: invoking hg with integer rev. number instead of hex id?

Piet Delport avatarPiet Delport created an issue

After doing an incoming check, i used the "Pull to here" context menu action on one of the revisions, but it failed with an "unknown revision" error message.

It appears that TortoiseHg is passing the integer revision number from hg incoming to hg pull --rev, which fails because the revision does not exist locally yet.

The output log shows the following, for the incoming check and pull attempt:

% hg --repository [...] incoming --quiet --bundle /tmp/[...] ssh://[...]
[command completed successfully Mon May 13 09:03:59 2013]
% hg --repository [...] pull --verbose --update --config ui.merge=internal:fail --rev 109 ssh://[...]
running ssh 'hg -R [...] serve --stdio'
pulling from ssh://[...]
unknown revision '109'
[command returned code 255 Mon May 13 09:04:05 2013]

Manually running hg pull --rev with the hex revid (instead of 109) works fine.

I'm using Ubuntu 12.10, with the latest packages from the TortoiseHg PPA:

  • TortoiseHg 2.8
  • Mercurial-2.6
  • PyQt-4.9.3, Qt-4.8.2
  • Python-2.7.3

Comments (6)

  1. Yuya Nishihara

    "pull to here" triggers the reload of the sync widget unexpectedly, and 042539f3ded0 causes this issue.

      File "tortoisehg/hgqt/", line 549, in rejectBundle
      File "tortoisehg/hgqt/", line 1017, in reload
      File "tortoisehg/hgqt/", line 1076, in reloadTaskTab
      File "tortoisehg/hgqt/", line 376, in reload
      File "tortoisehg/hgqt/", line 418, in setUrl
        self.pathSelected(ixs[0])  # in case of row not changed
      File "tortoisehg/hgqt/", line 403, in pathSelected
      File "tortoisehg/hgqt/", line 407, in setEditUrl
  2. Sebastian Müller

    Maybe this is related to the following, which seems to be more severe, at least for me: If you switch the repo in the sync tab and do an "incoming changes", doing a "pull to here" (via context menu) does not work at all anymore, because it will switch back to the default repo and that repo might not contain the changesets at all. Maybe I should open a new issue?

  3. Yuya Nishihara

    repowidget: work around unwanted rejectBundle during pull to here (fixes #2596)

    Because "pull to here" doesn't touch the confirmation infobar, the subsequent pull operation clears the infobar, which involves rejectBundle(). As a result, the incoming path changes before starting pull.

    rejectBundle -> reload -> restore original sync URL

    This works around the problem by removing the confirmation explicitly. We'll need to refactor handling of push/pull state later. This change is tricky.

    → <<cset bf6e69bfdc6a>>

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.