diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 84dd14f..dbb32bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,16 +7,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - hg: [ '5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7' ] + hg: [ '5.5', '5.6', '5.7', '5.8', '5.9', '6.0', '6.1', '6.2' ] env: HG_VERSION: ${{ matrix.hg }} steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v4 with: - python-version: '2.7' - - name: Install python-dev - run: sudo apt-get install -y python2.7-dev + python-version: '3.8' + check-latest: true - name: Cache check-versions script id: cache-check-versions uses: actions/cache@v3 diff --git a/README.asciidoc b/README.asciidoc index c3d28f3..2f6607b 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -76,10 +76,7 @@ the same commits: Remember to run `git gc --aggressive` after cloning a repository, especially if it's a big one. Otherwise lots of space will be wasted. -The newest supported version of Mercurial is 6.1 but only through Python 2. The -oldest one is 2.4. - -Support for Python 3 is ready, but will be released in the next version soon. +The newest supported version of Mercurial is 6.2, the oldest one is 2.4. === Pushing branches === diff --git a/doc/git-remote-hg.txt b/doc/git-remote-hg.txt index 6a8d53b..de838f6 100644 --- a/doc/git-remote-hg.txt +++ b/doc/git-remote-hg.txt @@ -38,7 +38,8 @@ If you want to see Mercurial revisions as Git commit notes: % git config core.notesRef refs/notes/hg -------------------------------------- -If you are not interested in Mercurial permanent and global branches (aka. commit labels): +If you are not interested in Mercurial permanent and global branches (aka. +commit labels): -------------------------------------- % git config --global remote-hg.track-branches false @@ -52,7 +53,8 @@ If you want the equivalent of `hg clone --insecure`: % git config --global remote-hg.insecure true -------------------------------------- -If you want 'git-remote-hg' to be compatible with 'hg-git', and generate exactly the same commits: +If you want 'git-remote-hg' to be compatible with 'hg-git', and generate exactly +the same commits: -------------------------------------- % git config --global remote-hg.hg-git-compat true @@ -105,16 +107,15 @@ the invalid '~' NOTES ----- -Remember to run `git gc --aggressive` after cloning a repository, specially if +Remember to run `git gc --aggressive` after cloning a repository, especially if it's a big one. Otherwise lots of space will be wasted. -The oldest version of Mercurial supported is 1.9. For the most part 1.8 works, -but you might experience some issues. +The newest supported version of Mercurial is 6.2, the oldest one is 2.4. Pushing branches ~~~~~~~~~~~~~~~~ -To push a Mercurial named branch, you need to use the "branches/" prefix: +To push a branch, you need to use the "branches/" prefix: -------------------------------------- % git checkout branches/next @@ -135,7 +136,7 @@ The simplest way is to specify the user and password in the URL: git clone hg::https://user:password@bitbucket.org/user/repo -------------------------------------- -You can also use the http://mercurial.selenic.com/wiki/SchemesExtension[schemes extension]: +You can also use the https://mercurial-scm.org/wiki/SchemesExtension[schemes extension]: -------------------------------------- [auth] @@ -145,7 +146,7 @@ bb.password = password -------------------------------------- Finally, you can also use the -https://pypi.python.org/pypi/mercurial_keyring[keyring extension]. +https://pypi.org/project/mercurial_keyring[keyring extension]. CAVEATS ------- @@ -157,10 +158,10 @@ Mercurial branches and bookmarks have some limitations of Git branches: you can't have both 'dev/feature' and 'dev' (as Git uses files and directories to store them). -Multiple anonymous heads (which are useless anyway) are not supported; you +Multiple anonymous heads (which are useless anyway) are not supported: you would only see the latest head. -Closed branches are not supported; they are not shown and you can't close or +Closed branches are not supported: they are not shown and you can't close or reopen. Additionally in certain rare situations a synchronization issue can occur (https://github.com/felipec/git/issues/65[Bug #65]). diff --git a/git-remote-hg b/git-remote-hg index acfc7f2..fa53690 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -852,8 +852,11 @@ def do_list(parser, branchmap): for branch, heads in compat.iteritems(branchmap): # only open heads - heads = [h for h in heads if b'close' not in repo.changelog.read(h)[5]] - if heads: + try: + heads = [h for h in heads if b'close' not in repo.changelog.read(h)[5]] + if heads: + branches[branch] = heads + except error.LookupError: branches[branch] = heads list_head(repo, cur) diff --git a/tools/versions.txt b/tools/versions.txt index 839bbab..8ac50b3 100644 --- a/tools/versions.txt +++ b/tools/versions.txt @@ -40,3 +40,11 @@ hg:5.5 hggit:0.9.0 dulwich:0.19.15 # 2020_08 hg:5.6 hggit:0.9.0 dulwich:0.19.15 # 2020_10 hg:5.7 hggit:0.10.0 dulwich:0.19.16 # 2021_01 + +hg:5.8 hggit:0.10.2 dulwich:0.20.0 # 2021_05 # python3 +hg:5.9 hggit:0.10.2 dulwich:0.20.0 # 2021_08 +hg:6.0 hggit:0.10.2 dulwich:0.20.0 # 2021_11 +hg:6.1 hggit:0.10.2 dulwich:0.20.0 # 2022_02 +hg:6.2 hggit:0.10.2 dulwich:0.20.0 # 2022_07 + +hg:6.2 hggit:1.0.0 dulwich:0.20.45 # latest