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
66860f14
Commit
66860f14
authored
15 years ago
by
Scott Chacon
Browse files
Options
Downloads
Patches
Plain Diff
update todo file and removed outdated TODO comments
parent
7e776864
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
TODO.txt
+1
-0
1 addition, 0 deletions
TODO.txt
dulwich/repo.py
+0
-3
0 additions, 3 deletions
dulwich/repo.py
git_handler.py
+3
-4
3 additions, 4 deletions
git_handler.py
with
4 additions
and
7 deletions
TODO.txt
+
1
−
0
View file @
66860f14
CLONE
===========
* only try to import non-mapped commits
* update/add bookmarks
* checkout the tip
* limit to HEAD branch? (gh-pages makes weird import)
...
...
This diff is collapsed.
Click to expand it.
dulwich/repo.py
+
0
−
3
View file @
66860f14
...
...
@@ -308,7 +308,6 @@
# takes a commit object and a file path
# returns the contents of that file at that commit
# TODO : make this recursive - any file in a subdir wont be found here
def
get_file
(
self
,
commit
,
f
):
otree
=
self
.
tree
(
commit
.
tree
)
parts
=
f
.
split
(
'
/
'
)
...
...
@@ -322,8 +321,6 @@
# takes a commit and returns an array of the files that were changed
# between that commit and it's parents
# TODO : optimize this, it's horrible
# TODO : if no parents, return all files
def
get_files_changed
(
self
,
commit
):
def
filenames
(
basetree
,
comptree
,
prefix
):
...
...
This diff is collapsed.
Click to expand it.
git_handler.py
+
3
−
4
View file @
66860f14
...
...
@@ -76,7 +76,7 @@
convert_list
[
sha
]
=
commit
todo
.
extend
([
p
for
p
in
commit
.
parents
if
p
not
in
done
])
# sort the commits
by commit date (TODO: change to topo sort)
# sort the commits
commits
=
TopoSort
(
convert_list
).
items
()
# import each of the commits, oldest first
...
...
@@ -84,9 +84,9 @@
commit
=
convert_list
[
csha
]
self
.
import_git_commit
(
commit
)
# TODO : update Hg bookmarks
(possibly named heads?)
# TODO : update Hg bookmarks
print
bookmarks
.
parse
(
self
.
repo
)
def
import_git_commit
(
self
,
commit
):
print
"
importing:
"
+
commit
.
id
...
...
@@ -88,9 +88,9 @@
print
bookmarks
.
parse
(
self
.
repo
)
def
import_git_commit
(
self
,
commit
):
print
"
importing:
"
+
commit
.
id
# TODO : have to handle merge contexts at some point (two parent files, etc)
# TODO :
(?)
have to handle merge contexts at some point (two parent files, etc)
def
getfilectx
(
repo
,
memctx
,
f
):
(
e
,
sha
,
data
)
=
self
.
git
.
get_file
(
commit
,
f
)
e
=
''
# TODO : make this a real mode
...
...
@@ -98,7 +98,6 @@
p1
=
"
0
"
*
40
p2
=
"
0
"
*
40
# TODO : do something if parent is not mapped yet!
if
len
(
commit
.
parents
)
>
0
:
sha
=
commit
.
parents
[
0
]
p1
=
self
.
_map
[
sha
]
...
...
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