Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
hg-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
hg-git
Commits
1d326a57
Commit
1d326a57
authored
11 years ago
by
Jordi Gutiérrez Hermoso
Browse files
Options
Downloads
Patches
Plain Diff
git-handler: turn refs from None to {} so that empty git repos can convert
parent
503d403f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hggit/git_handler.py
+5
-1
5 additions, 1 deletion
hggit/git_handler.py
tests/test-clone.t
+8
-0
8 additions, 0 deletions
tests/test-clone.t
with
13 additions
and
1 deletion
hggit/git_handler.py
+
5
−
1
View file @
1d326a57
...
...
@@ -1017,7 +1017,11 @@
f
.
seek
(
0
)
po
=
self
.
git
.
object_store
.
add_thin_pack
(
f
.
read
,
None
)
progress
.
flush
()
return
ret
# For empty repos dulwich gives us None, but since later
# we want to iterate over this, we really want an empty
# iterable
return
ret
if
ret
else
{}
except
(
HangupException
,
GitProtocolError
),
e
:
raise
hgutil
.
Abort
(
_
(
"
git remote error:
"
)
+
str
(
e
))
...
...
This diff is collapsed.
Click to expand it.
tests/test-clone.t
+
8
−
0
View file @
1d326a57
...
...
@@ -50,3 +50,11 @@
date:
Mon
Jan
01
00
:
00
:
10
2007
+
0000
summary:
add
alpha
clone
empty
repo
$
git
init
empty
Initialized
empty
Git
repository
in
$TESTTMP
/empty/
.
git
/
$
hg
clone
empty
emptyhg
no
changes
found
updating
to
branch
default
0
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment