Commit Graph

29 Commits

Author SHA1 Message Date
Adrian Buehlmann
a482b04850 hg.clone: report branch name on update 2009-10-16 23:57:34 +02:00
Matt Mackall
b6547e5312 Merge with stable 2009-10-11 13:54:19 -05:00
Patrick Mezard
a7d029beb4 patch: do not swallow header-like patch first line (issue1859)
Current solution is hackish but looks like a good trade-off short of rewriting
patch.extract() significantly.
2009-10-08 23:42:33 +02:00
Brendan Cully
dcdbd19aef patch: create file even if source is not /dev/null
as long as the first hunk is -0,0 and the source and destination have the
same name. Matt found a patch like this, and /usr/bin/patch accepts it.
2009-08-07 19:27:54 -07:00
Matt Mackall
89cb6de980 commit: move editor outside transaction
The commit editor is now invoked before files and manifest are
committed. The editor is now run with only the wlock held and aborting
an edit no longer requires rolling back a transaction. Changes to
files during a commit still result in undefined behavior.

(This is preliminary work for committing subrepositories)
2009-05-18 17:36:24 -05:00
Vsevolod Solovyov
201e56ffbb Fix issue1495, corner case of adding empty files via patching 2009-03-24 23:28:55 +00:00
Brendan Cully
aad17924e9 import: add similarity option (issue295) 2008-11-22 00:21:57 -08:00
Patrick Mezard
ef4d9a9d32 patch: fix patched files records in externalpatcher() 2008-10-26 17:26:28 +01:00
Brendan Cully
2aef8dbc09 Check that git patches only touch files under root 2008-06-25 14:13:20 -07:00
Benoit Boissinot
e297c198c0 fix import with -p0 2008-04-12 22:41:07 -04:00
Adrian Buehlmann
153675561e clone: print "updating working directory" status message
With this change, "hg clone" looks like this:

% hg clone http://example.com/repo/big big
requesting all changes
adding changesets
adding manifests
adding file changes
added XXX changesets with XXX changes to XXX files
updating working directory
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved

So the user sees

% hg clone http://example.com/repo/big big
requesting all changes
adding changesets
adding manifests
adding file changes
added XXX changesets with XXX changes to XXX files
updating working directory

while Mercurial is writing to disk to populate the working directory

With this change, "hg clone" looks like this:

% hg clone big big-work
updating working directory
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
2008-03-21 14:52:24 +01:00
Dirkjan Ochtman
3e3b0d62eb warn about new heads on commit (issue842) 2008-03-21 11:06:02 +01:00
Patrick Mezard
d65e9c81dd patch: fix corner case with update + copy patch handling (issue 937)
The self patching of files when diffed with a backup is a bit peculiar to me.
It makes sense in mpatch, that's less clear in mercurial patching code. Let's
document and preserve it for now.
2008-03-17 23:36:45 +01:00
Patrick Mezard
d5040b6003 patch: fix iterhunks() with trailing binary file removal
Like some renames or copy operations, binary file removal does not generate any
"file" or "hunk" action, but was not tagged as such and let iterhunk() assume
no hunk was applied for the deleted file.
2008-02-28 00:07:37 +01:00
Alexis S. L. Carvalho
961a45df72 merge with crew-stable 2008-02-03 21:47:07 -02:00
Alexis S. L. Carvalho
68bddaa728 hg import: write the dirstate after every commit
This allows the transaction system to backup the correct file, so
that a future rollback can do the right thing.

This should fix issue963.
2008-02-03 21:03:46 -02:00
Patrick Mezard
2d2126f043 patch: handle empty vs no file in git patches (issue906) 2008-01-12 19:35:11 +01:00
Jesse Glick
b6fdc96f71 Permitting the import command to accept a --user option.
The prose section of the help text for the command already said that -u and -m
are accepted, but -u was not listed in the table of options, and did not work.
Useful when accepting patches from other people made by hg diff rather than hg
export. For completeness, also accepting -d DATE.
[CHANGES: rebased against 2f0da487820f, --no-commit option.]
2008-01-25 19:49:15 -05:00
Thomas Arendsen Hein
4ae55d1279 Test case for hg import --no-commit 2008-01-25 16:18:49 +01:00
Patrick Mezard
d1c841154d Merge with crew-stable 2008-01-12 20:49:07 +01:00
Thomas Arendsen Hein
8dbd54d63d Clarify some messages during commit:
- use "branch 'foo'" to distinguish from "branch merge".
- commit messags can be empty (to abort commits)
- Added value for editor message: Tell about HG: lines like CVS does.
2007-12-28 17:10:25 +01:00
Patrick Mezard
d9be0f3383 Prompt for a commit message in editor, improve error message 2007-12-28 14:51:16 +01:00
Patrick Mezard
f280a41d83 test-import: test fuzziness, ambiguous patch locations 2007-11-25 12:17:30 +01:00
Patrick Mezard
59a5193f63 patch: fix git sendmail handling without proper mail headers 2007-10-08 22:20:23 +02:00
Thomas Arendsen Hein
05a43d0fea Added import test for [PATCH] subject and message body with subject 2007-07-02 22:45:58 +02:00
Alexis S. L. Carvalho
e488c0e84f Fix handling of paths when run outside the repo.
The main problem was that dirstate.getcwd() returned just "",
which was interpreted as "we're at the repo root".  It now returns
an absolute path.

The util.pathto function was also changed to deal with the "cwd is
an absolute path" case.
2007-03-16 00:22:58 -03:00
Brendan Cully
2709262462 Unify mq and hg patch invocation.
This makes patch a little less verbose by default, so the tests
had to be updated.
2006-08-15 11:28:50 -07:00
Mathieu Clabaut ext:(%22)
dced35893a Import say a file is not tracked after patching : test case 2006-08-02 09:29:17 +02:00
Vadim Gelfer
958489deb9 import: added tests, fixed bugs found by tests and asak. 2006-06-27 09:30:50 -07:00