Commit Graph

16 Commits

Author SHA1 Message Date
Patrick Mezard
8207527bd4 test-convert-git: be tolerant to git output variants 2010-04-26 14:40:34 +02:00
Patrick Mezard
438c49a871 convert/git: check status when reading output stream 2010-04-25 23:07:46 +02:00
Patrick Mezard
e8585b2da9 convert: fail fast if source does not support --sourcesort 2009-06-01 17:12:39 +02:00
Richard Quirk
1652c239fa Add committer tag only when needed in git conversion
Convert from a git repo added a committer: tag in the log message
even if the committer and the author were the same person.
2009-05-01 11:32:19 +02:00
Patrick Mezard
f93bdf76d1 Merge with crew-stable 2008-10-23 15:44:23 +02:00
Patrick Mezard
54f7c66fa0 convert: read git output in binary mode under Windows (issue 1359) 2008-10-23 14:05:11 +02:00
Matt Mackall
0a211cf39a context: consistently return p1 context for None 2008-06-25 17:33:51 -05:00
Alexis S. L. Carvalho
4789a32b07 localrepo.commit: normalize commit message even for rawcommit.
This normalization consists of:
- stripping trailing whitespace
- always using "\n" as the line separator

I think the main reason rawcommit was skipping this normalization was
an attempt to preserve hashes during an hg->hg conversion.

While this is a nice goal, it's not particularly interesting in
practice.  Since SHA-1 is so strong, the only safe way to do it is to
have absolutely identical revisions.  But:

- if the original revision was created with a recent version of hg,
  the commit message will be the same, with or without that
  normalization

- if it was created with an ancient version of hg that didn't do any
  normalization, even if the commit message is identical, the file list
  in the changelog is likely to be different (e.g. no removed files),
  and there were some old issues with e.g. extra file merging, which
  will end up changing the hash anyway

- in any case, if one *really* has to preserve hashes, it's easier
  (and faster) to fake a partial conversion using something like:

  hg clone -U -r rev orig-repo new-repo
  hg -R new-repo log --template '#node# #node#\n' > new-repo/.hg/shamap

Additionally, we've had some reports of problems arising from this lack
of normalization - e.g. issue871, and a user that was wondering why
hg export/hg import was not preserving hashes when there was nothing
unusual going on (it was just import doing the normalization that had
been skipped).

This also means that it's even more unlikely to get identical revisions
when going $VCS->hg->$VCS.
2008-03-14 09:56:58 -03:00
Patrick Mezard
c9215420e8 Display symlink or executable bit with manifest -v
New output looks like:

644   a
755 * b/a
644 @ l
2007-10-06 22:30:22 +02:00
Alexis S. L. Carvalho
b7d48206ca convert_git: add --filemap support 2007-10-04 23:21:37 -03:00
Patrick Mezard
091596b961 Merge with crew-stable 2007-09-30 12:36:11 +02:00
Patrick Mezard
298631f312 Test mercurial convert sink removes empty directories. 2007-09-30 12:08:33 +02:00
Alexis S. L. Carvalho
ddf41e005d Merge with crew-stable 2007-09-24 19:14:18 -03:00
Alexis S. L. Carvalho
6f75c91b5f convert_git: avoid returning two entries for the same file in getchanges
This could happen in merge changesets if the merged file was different
from both parents.
2007-09-24 19:00:11 -03:00
Thomas Arendsen Hein
58eb01c17d Make test-convert-git compatible with other git versions (tested with 1.4.4.3) 2007-08-31 12:32:18 +02:00
Patrick Mezard
26ffa26890 Test git repository conversion 2007-08-26 15:07:13 +02:00