472: HGTool does not support git style diff
- WontFix
- Review Board
dar****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
Sept. 29, 2008 | |
877 |
What's the URL of the page containing the problem? http://localhost:8080/r/new/ What steps will reproduce the problem? 1. Add a mercurial repository 2. extract a git diff: hg diff --git /path/to/repository > mychanges.diff 3. Create a new review request using the diff file 4. Error message: the system could not recognize the diff file What is the expected output? What do you see instead? Expected output: diff recognized What operating system are you using? What browser? ubuntu, firefox Please provide any additional information below. none.
So, it turns out that "git-style diffs" from Hg don't include revision information. There's no way we can support these.
-
+ WontFix
Why not taking the most recent revision then (tip)? I don't see any reason of posting a diff that does not apply on the most recent revision ... BTW, Mercurial sources (Python, GPL v2) also parse those files, there might be some interesting pieces to take there ...
It may be out of date. There's a massive race condition in doing that, and it can break the diff in subtle or drastic ways. Also, what is "most recent?" According to whose repository? When? We store the diff and apply it when viewed, so it may be "most recent" when posted but 5 minutes, a month, a year later, it won't be viewable anymore.
http://www.selenic.com/mercurial/bts/issue1268 is the relevant Mercurial bug
Why can't it pull the revision info from the export header?
The `hg export --git` command includes the revision information in the diff and could be pulled like ivazqueznet mentions. $ hg export --help hg export [OPTION]... [-o OUTFILESPEC] REV... dump the header and diffs for one or more changesets Print the changeset header and diffs for one or more revisions.