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
5185af4e
Commit
5185af4e
authored
15 years ago
by
Scott Chacon
Browse files
Options
Downloads
Patches
Plain Diff
hg gfetch now works
parent
4b1fa3d0
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
__init__.py
+6
-4
6 additions, 4 deletions
__init__.py
git_handler.py
+11
-5
11 additions, 5 deletions
git_handler.py
with
17 additions
and
9 deletions
__init__.py
+
6
−
4
View file @
5185af4e
...
...
@@ -73,10 +73,12 @@
repo
.
ui
.
status
(
_
(
"
clearing out the git cache data
\n
"
))
git
=
GitHandler
(
repo
,
ui
)
git
.
clear
()
def
gfetch
(
ui
,
repo
):
dest_repo
.
ui
.
status
(
_
(
"
pulling from git url
\n
"
))
def
gfetch
(
ui
,
repo
,
remote_name
=
'
origin
'
):
repo
.
ui
.
status
(
_
(
"
pulling from git url
\n
"
))
git
=
GitHandler
(
repo
,
ui
)
git
.
fetch
(
remote_name
)
commands
.
norepo
+=
"
gclone
"
cmdtable
=
{
"
gclone
"
:
...
...
This diff is collapsed.
Click to expand it.
git_handler.py
+
11
−
5
View file @
5185af4e
...
...
@@ -113,8 +113,9 @@
def
fetch
(
self
,
remote_name
):
self
.
ui
.
status
(
_
(
"
fetching from :
"
+
remote_name
+
"
\n
"
))
self
.
export_git_objects
()
self
.
fetch_pack
(
remote_name
)
self
.
import_git_objects
(
remote_name
)
refs
=
self
.
fetch_pack
(
remote_name
)
if
refs
:
self
.
import_git_objects
(
remote_name
)
self
.
save_map
()
def
push
(
self
,
remote_name
):
...
...
@@ -386,7 +387,11 @@
refs
=
client
.
fetch_pack
(
path
,
determine_wants
,
graphwalker
,
f
.
write
,
sys
.
stdout
.
write
)
f
.
close
()
commit
()
self
.
git
.
set_remote_refs
(
refs
,
remote_name
)
if
refs
:
self
.
git
.
set_remote_refs
(
refs
,
remote_name
)
else
:
self
.
ui
.
status
(
_
(
"
nothing new on the server
\n
"
))
return
refs
except
:
f
.
close
()
raise
...
...
@@ -422,8 +427,9 @@
# import each of the commits, oldest first
for
csha
in
commits
:
commit
=
convert_list
[
csha
]
self
.
import_git_commit
(
commit
)
if
not
self
.
map_hg_get
(
csha
):
commit
=
convert_list
[
csha
]
self
.
import_git_commit
(
commit
)
self
.
update_hg_bookmarks
(
remote_name
)
...
...
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