Commit Graph

144 Commits

Author SHA1 Message Date
Martin Geisler
28fb695e9a i18n: mark strings for translation in Mercurial 2008-08-31 16:12:02 +02:00
Martin Geisler
897f1ddab8 i18n: avoid naive plural tricks 2008-08-31 16:12:02 +02:00
Dirkjan Ochtman
fcaabba3ec fix double indentation and trailing whitespace 2008-08-31 11:41:52 +02:00
Dirkjan Ochtman
6b51480caa merge with crew-stable 2008-08-12 17:47:08 +02:00
Matt Mackall
e03f4e2f73 util: set_flags shouldn't know about repo flag formats 2008-08-10 21:55:06 -05:00
Brendan Cully
2aef8dbc09 Check that git patches only touch files under root 2008-06-25 14:13:20 -07:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Matt Mackall
d4ab55a92b status: clean up all users for unknown files 2008-06-27 13:43:29 -05:00
Brendan Cully
f5b1d49e0d Check that git patches only touch files under root 2008-06-25 14:13:20 -07:00
Matt Mackall
fbb5127472 use repo[changeid] to get a changectx 2008-06-26 14:35:46 -05:00
Matt Mackall
d462e1fc26 simplify flag handling
add _checklink var to dirstate
introduce dirstate.flagfunc
switch users of util.execfunc/linkfunc to flagfunc
change manifestdict.set to take a flags string
change ctx.fileflags to ctx.flags
change gitmode func to a dict
remove util.execfunc/linkfunc
2008-06-26 13:46:34 -05:00
Matt Mackall
5867ff1667 use repo.changectx(None) to get a workingctx 2008-06-26 13:46:29 -05:00
Matt Mackall
5001543d15 use repo.changectx rather than context.changectx 2008-06-25 17:34:28 -05:00
Matt Mackall
fb88571d19 match: remove files arg from repo.status and friends 2008-05-12 11:37:08 -05:00
Matt Mackall
081e89551b match: remove files argument from patch.diff 2008-05-12 11:37:08 -05:00
Adrian Buehlmann
8dddfa01ec removing unused local ccache in patch.diff 2008-04-11 15:14:00 +02:00
Benoit Boissinot
60caa13781 merge with -stable 2008-04-12 23:05:51 -04:00
Benoit Boissinot
e297c198c0 fix import with -p0 2008-04-12 22:41:07 -04:00
Patrick Mezard
8e0cbccd26 Let --unified default to diff.unified (issue 1076) 2008-04-04 22:15:14 +02:00
Dirkjan Ochtman
34d6bea8db python 2.6 compatibility: compatibility wrappers for hash functions 2008-04-04 22:36:40 +02: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
107a228e2f patch: check filename is /dev/null for creation or deletion (issue 1033)
Otherwise, file creation or deletion is ambiguous with file being filled or
emptied.
2008-03-16 00:35:12 +01:00
Matt Mackall
5c5200eb63 diff: use copy smarts from copies.py 2008-03-15 10:02:31 -05:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +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
Bryan O'Sullivan
4a012ef2b9 Merge with crew 2008-02-06 19:57:52 -08:00
Matt Mackall
63cc8c83c8 transform a bunch of print statements to appropriate ui calls 2008-01-18 10:48:25 -06:00
Patrick Mezard
d1c841154d Merge with crew-stable 2008-01-12 20:49:07 +01:00
Patrick Mezard
2d2126f043 patch: handle empty vs no file in git patches (issue906) 2008-01-12 19:35:11 +01:00
Patrick Mezard
b3a11777ac patch: remove CRLF when parsing file names 2008-01-12 20:43:09 +01:00
Thomas Arendsen Hein
347da85c36 Removed tabs and trailing whitespace in python files 2007-12-29 19:49:48 +01:00
Patrick Mezard
a802f4255a patch: be more tolerant to diffstat failures (issue 865)
Sometimes, revisions cannot be represented by a regular diff, only a git diff
would capture binary files or permission changes. diffstat cannot handle git
patches and will output "0 files changed" when fed with an empty diff. We
cannot consider the latter to be an error, unless we rewrite diffstat to handle
these correctly.
2007-12-25 22:21:51 +01:00
Matt Mackall
f21286882c patch: use util.set_flags 2007-12-27 22:29:21 -06:00
Patrick Mezard
cf0ec16a92 Merge with crew-stable 2007-12-25 22:23:58 +01:00
Patrick Mezard
0661d4b997 patch: simplify directory creation 2007-12-17 23:42:48 +01:00
Patrick Mezard
1fb759fad1 patch: write rej files for missing targets (issue 853) 2007-12-17 23:42:46 +01:00
Patrick Mezard
29045b226b patch: avoid file existence tests when possible in selectfile() 2007-12-17 23:06:04 +01:00
Patrick Mezard
c43b58242b patch: move diff parsing in iterhunks generator 2007-12-17 23:06:01 +01:00
Patrick Mezard
b4f670a426 patch: move NoHunk detection up with parsing code 2007-12-17 22:19:21 +01:00
Patrick Mezard
4bd17cf5de mq: missing target files do not make qpush to fail immediately (issue 835)
Reported and explained by Peter Arrenbrecht <peter.arrenbrecht@gmail.com>.
Following file additions were skipped but empty files were still created. This situation could lead to qrefresh losing patch information.
2007-12-02 13:53:29 +01:00
Jim Hague
5ef18ea71f patch: fix sort() comparator argument
'hg import' fails under Python 2.3. The name of the compare function parameter in the call to list.sort() is 'cmpfunc' in Python 2.3 and
'cmp' in Python 2.4+. Passing the compare function as a named parameter is therefore problematic.
2007-11-25 11:49:34 +01:00
Dustin Sallings
bebcdac954 Use both the from and to name in mdiff.unidiff.
This fixes a compatibility issue with git diffs.
* * *
2007-11-01 12:17:59 -07:00
Patrick Mezard
6aa1e21320 Fix Windows os.popen bug with interleaved stdout/stderr output
See python bug 1366 "popen spawned process may not write to stdout under windows" for more details.
2007-11-01 12:05:14 +01:00
Thomas Arendsen Hein
d3c1b2079e Only set mode of new patch if the target file was removed before.
If the file is writable by the user, but owned by a different user, the
chmod will otherwise fail with "Operation not permitted".

Additionally make very sure that the file is only written if either the number
of links is <= 1 or the file was successfully removed.

Maybe this minimal COW code should be replaced by something from util.
2007-10-25 19:40:56 +02:00
jorendorff@mozilla.com
c3848517a7 commands.py, patch.py: add -U option to hg diff command 2007-07-26 07:56:04 -04:00
Matt Mackall
cd72dc7f1b Merge with crew 2007-07-21 16:44:38 -05:00
Matt Mackall
3a3bd8ec5b Make repo locks recursive, eliminate all passing of lock/wlock 2007-07-21 16:02:10 -05:00
Patrick Mezard
dd336a8d1a patch: patches should be read and written in binary mode when possible. 2007-07-17 23:35:24 +02:00
Patrick Mezard
ccc14e4990 patch: fix normalized paths separators. 2007-07-17 23:34:52 +02:00
Bryan O'Sullivan
6c741e45c0 patch.py: re-add the ability to use an external patch program
This is now invoked by default only if ui.patch is set.  Otherwise, we
use our built-in patch.  If that fails because it can't find any valid
hunks, we'll fall back to trying the external patch command.
2007-07-17 09:39:30 -07:00