Commit Graph

11 Commits

Author SHA1 Message Date
Mads Kiilerich
747e73f27d export: export working directory parent by default
A common usecase for export is to preview the patch that will be patchbombed or
to see what changed in a revision found by bisect. Showing the working
directory parent is thus a useful and obvious default.
2013-02-11 00:43:12 +01:00
Mads Kiilerich
ef317883c7 export: show 'Date' header in a format that also is readable for humans
'export' is the official export format and used by patchbomb, but it would only
show date as a timestamp that most humans might find it hard to relate to. It
would be very convenient when reviewing a patch to be able to see what
timestamp the patch will end up with.

Mercurial has always used util.parsedate for parsing these headers. It can
handle 'all' date formats, so we could just as well use a readable one.

'export' will now use the format used by 'log' - which is the format described
as 'Unix date format' in the templating help. We assume that all parsers of '#
HG changeset patch'es can handle that.
2013-02-08 22:54:17 +01:00
Augie Fackler
8671b3e731 export: clobber files with -o (bc) (issue3652)
This violated user expectation. Updated the code to clobber files, but
preserve the behavior of appending multiple patches requested in a
single export. Includes tests.
2013-02-09 15:38:57 -06:00
Ankur Dahiya
8c0a7c1aaf color: enabled color support for export command (issue1507)
The export command didn't output the diffs in color, even when color support
was enabled. This patch fixes that by making the export command use the default
ui.write method, instead of directly manipulating the ui.fout file object.
Also added a test case to verify color output to test-export.t.
2012-08-27 09:37:49 -07:00
Mads Kiilerich
9cddfd19ab check-code: fix check for trailing whitespace on sh command lines
The $ has been without necessary escaping since introduced in c4ecbbd282fe.
2012-08-08 18:10:16 +02:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Thomas Arendsen Hein
7c3a892f08 export: catch exporting empty revsets (issue3353)
Additionally add tests for empty revsets and unknown revisions.
2012-04-04 12:31:31 +02:00
Andrzej Bieniek
c9cba11d78 export: add %m to file format string (first line of the commit message)
$ hg commit -m "Initial commit"
$ hg export -o %m.patch tip          #It creates Initial_commit.patch file.
2011-07-30 11:08:45 +01:00
Matt Mackall
430e769c2b tests: various fixes for new unified test pattern format 2010-09-22 18:20:47 -05:00
Matt Mackall
5d9fc42983 tests: drop a bunch of sed calls from unified tests 2010-09-21 16:44:13 -05:00
Adrian Buehlmann
a612b24fe8 tests: unify test-export 2010-08-24 15:13:11 +02:00