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
7d5fbed2
Commit
7d5fbed2
authored
15 years ago
by
Scott Chacon
Browse files
Options
Downloads
Patches
Plain Diff
merge with a rename is working now, but the fix cannot be the right way to do it
parent
19053d11
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
TODO.txt
+5
-3
5 additions, 3 deletions
TODO.txt
git_handler.py
+16
-3
16 additions, 3 deletions
git_handler.py
with
21 additions
and
6 deletions
TODO.txt
+
5
−
3
View file @
7d5fbed2
...
...
@@ -4,6 +4,7 @@
- hg push git@...
- hg fetch [remote] (remote is url, hg alias or hg-git remote)
- hg clone url
* fail nicely when the remote_name is not there
* more tests
* submodules?
* .gitignore, etc - try to convert?
...
...
@@ -23,7 +24,7 @@
MAPPING ISSUES
==============
Created in Hg:
* named branches
* merges
(
dont convert back properly for some reason
)
* named branches
#
* merges
with renames -
dont convert back properly for some reason
Created in Git:
...
...
@@ -28,3 +29,5 @@
Created in Git:
* different committer in Git objects
* encoding field
* octopus merge explode/implode
...
...
@@ -30,5 +33,4 @@
* octopus merge explode/implode
* different committer in Git objects
WEBSITE
===========
...
...
This diff is collapsed.
Click to expand it.
git_handler.py
+
16
−
3
View file @
7d5fbed2
...
...
@@ -523,6 +523,11 @@
# TODO : map extra parents to the extras file
pass
files
=
self
.
git
.
get_files_changed
(
commit
)
# if committer is different than author, add it to extra
extra
=
{}
if
not
((
commit
.
author
==
commit
.
committer
)
and
(
commit
.
author_time
==
commit
.
commit_time
)):
cdate
=
datetime
.
datetime
.
fromtimestamp
(
commit
.
commit_time
).
strftime
(
"
%Y-%m-%d %H:%M:%S
"
)
extra
[
'
committer
'
]
=
commit
.
committer
extra
[
'
commit_time
'
]
=
cdate
# get a list of the changed, added, removed files
...
...
@@ -527,7 +532,15 @@
# get a list of the changed, added, removed files
extra
=
{}
# *TODO : if committer is different than author, add it to extra
files
=
self
.
git
.
get_files_changed
(
commit
)
# if this is a merge commit, don't list renamed files
# i'm really confused here - this is the only way my use case will
# work, but it seems really hacky - do I need to just remove renames
# from one of the parents? AARRGH!
if
not
(
p2
==
"
0
"
*
40
):
for
removefile
in
hg_renames
.
values
():
files
.
remove
(
removefile
)
text
=
strip_message
date
=
datetime
.
datetime
.
fromtimestamp
(
commit
.
author_time
).
strftime
(
"
%Y-%m-%d %H:%M:%S
"
)
ctx
=
context
.
memctx
(
self
.
repo
,
(
p1
,
p2
),
text
,
files
,
getfilectx
,
...
...
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