Merge tag 'v0.6' into felipec

These changes involve a port to python3.  These can mostly be discarded,
as such port has already been done in an alternative way, which supports
both v2 and v3.
This commit is contained in:
Mark Nauwelaerts
2025-04-28 18:53:34 +02:00
5 changed files with 28 additions and 20 deletions

View File

@@ -7,16 +7,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: 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: env:
HG_VERSION: ${{ matrix.hg }} HG_VERSION: ${{ matrix.hg }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: '2.7' python-version: '3.8'
- name: Install python-dev check-latest: true
run: sudo apt-get install -y python2.7-dev
- name: Cache check-versions script - name: Cache check-versions script
id: cache-check-versions id: cache-check-versions
uses: actions/cache@v3 uses: actions/cache@v3

View File

@@ -76,10 +76,7 @@ the same commits:
Remember to run `git gc --aggressive` after cloning a repository, especially 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. 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 The newest supported version of Mercurial is 6.2, the oldest one is 2.4.
oldest one is 2.4.
Support for Python 3 is ready, but will be released in the next version soon.
=== Pushing branches === === Pushing branches ===

View File

@@ -38,7 +38,8 @@ If you want to see Mercurial revisions as Git commit notes:
% git config core.notesRef refs/notes/hg % 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 % 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 % 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 % git config --global remote-hg.hg-git-compat true
@@ -105,16 +107,15 @@ the invalid '~'
NOTES 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. 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, The newest supported version of Mercurial is 6.2, the oldest one is 2.4.
but you might experience some issues.
Pushing branches 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 % 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 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] [auth]
@@ -145,7 +146,7 @@ bb.password = password
-------------------------------------- --------------------------------------
Finally, you can also use the Finally, you can also use the
https://pypi.python.org/pypi/mercurial_keyring[keyring extension]. https://pypi.org/project/mercurial_keyring[keyring extension].
CAVEATS 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 can't have both 'dev/feature' and 'dev' (as Git uses files and directories to
store them). 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. 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 reopen. Additionally in certain rare situations a synchronization issue can
occur (https://github.com/felipec/git/issues/65[Bug #65]). occur (https://github.com/felipec/git/issues/65[Bug #65]).

View File

@@ -852,8 +852,11 @@ def do_list(parser, branchmap):
for branch, heads in compat.iteritems(branchmap): for branch, heads in compat.iteritems(branchmap):
# only open heads # only open heads
heads = [h for h in heads if b'close' not in repo.changelog.read(h)[5]] try:
if heads: 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 branches[branch] = heads
list_head(repo, cur) list_head(repo, cur)

View File

@@ -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.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.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