Skip to content
Snippets Groups Projects
  1. Oct 27, 2020
  2. Dec 11, 2020
  3. Dec 09, 2020
    • muxator's avatar
      gitdirstate: do not crash on hg status with an unreadable dir and no .hgignore · d2ab8d805345
      muxator authored
      Now it is possible to invoke hg status in a repo where there is an unreadable
      directory and no .hgignore without crashing.
      
      This probably uncovers another (albeit minor) bug: the "Permission denied"
      message is printed twice.
      d2ab8d805345
    • muxator's avatar
      tests: document hg status crash with an unreadable dir and no .hgignore · d27df9cfb9b0
      muxator authored
      If a repo has no .hgignore (this happens frequently on repositories that come
      from a git clone, which tend to have a .gitignore but no .hgignore), and a
      directory is not readable by the current user (for example, for a ownership or
      persmission problem), hg-git causes a crash in hg status instead of printing an
      error message.
      
      An almost complete stack trace is:
      
      $ hg status
      ...
      Traceback (most recent call last):
        File "/opt/mercurial/hg-git/hggit/gitdirstate.py", line 99, in _ignore
          fp = open(files[0], 'rb')
      FileNotFoundError: [Errno 2] No such file or directory: b'/tmp/example/.hgignore'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/opt/mercurial/hg-git/hggit/gitdirstate.py", line 182, in _finddotgitignores
          entries = util.listdir(join(nd), stat=True, skip=skip)
      PermissionError: [Errno 13] Permission denied: '/tmp/example/not_readable'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        [...]
        File "/opt/mercurial/hg-git/hggit/gitdirstate.py", line 102, in _ignore
          fns = self._finddotgitignores()
        File "/opt/mercurial/hg-git/hggit/gitdirstate.py", line 185, in _finddotgitignores
          fwarn(nd, inst.strerror)
        File "/opt/mercurial/hg-git/hggit/gitdirstate.py", line 128, in fwarn
          self._ui.warn(b'%s: %s\n' % (self.pathto(f), msg))
      TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'
      d27df9cfb9b0
  4. Nov 25, 2020
    • Dan Villiom Podlaski Christiansen's avatar
      ci: retry failing jobs · 6e576b67d1ce
      Dan Villiom Podlaski Christiansen authored
      The compatibility tests occasionally fail. To work around this, we
      simply set the tests to retry once. Given that each test run is quite
      short, we can safely retry them. We do so only once to begin with, but
      to be safe, I've also added a timeout so that a hanging job isn't left
      running for half an hour.
      6e576b67d1ce
  5. Nov 24, 2020
  6. Nov 23, 2020
  7. Nov 22, 2020
  8. Nov 20, 2020
  9. Nov 22, 2020
  10. Nov 21, 2020
  11. Oct 24, 2020
  12. Aug 20, 2020
  13. Aug 07, 2020
  14. Aug 04, 2018
    • Dan Villiom Podlaski Christiansen's avatar
      debuggitdir: add new command · 9e47dd1088ef
      Dan Villiom Podlaski Christiansen authored
      This is useful for interacting with the Git repository directly,
      either from shell scripts, the terminal, or perhaps an alias like
      this:
      
      [alias]
      git=!GIT_DIR=$(hg debuggitdir) git "$@"
      
      ...and with that, you can easily access features not offered by
      Dulwich such as `hg git gc`.
      9e47dd1088ef
  15. Oct 23, 2020
  16. Jul 12, 2020
  17. Nov 20, 2020
  18. Oct 23, 2020
  19. Aug 13, 2020
  20. Sep 15, 2020
  21. Oct 11, 2020
  22. Aug 13, 2020
  23. Sep 15, 2020
  24. Aug 18, 2020
    • Dan Villiom Podlaski Christiansen's avatar
      import: _always_ save the map after an import · c3f19d62a6f6
      Dan Villiom Podlaski Christiansen authored
      Pulls aren't done in a transaction, so you can safely interrupt them,
      and get a partial result. Unfortunately, the commit map isn't updated,
      so once you resume the pull, it'll begin at the start at same commit as
      last, rather than where interrupted.
      
      With this tiny change, I can interrupt and resume long-running pulls
      at leisure.
      
      There's no test, since writing the required infrastructure seems a bit
      overkill.
      c3f19d62a6f6
  25. Aug 03, 2020
    • muxator's avatar
      gitnodekw: do not crash on hg incoming when log template includes gitnode() · d6ac1ae9027a
      muxator authored
      Before this change, if the user's log template included a call to gitnode() to
      show the git commit hash, invoking "hg incoming" on a git repository that had at
      least one incoming change failed with:
      
         AttributeError: 'overlayrepo' object has no attribute 'githandler'
      
      Since an incoming changeset should already have well defined git commit hashes,
      there is no apparent reason for which "hg incoming" should not have this
      information already.
      
      This change is a workaround that removes any reference to the hg-git structures
      from the incoming changeset, thus merely avoiding the crash.
      
      Fixes #239 (#239)
      d6ac1ae9027a
  26. Aug 06, 2020
Loading