Skip to content
Snippets Groups Projects
Commit 7d5fbed2 authored by Scott Chacon's avatar Scott Chacon
Browse files

merge with a rename is working now, but the fix cannot be the right way to do it

parent 19053d11
No related branches found
No related tags found
No related merge requests found
......@@ -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
===========
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment