Commit Graph

21 Commits

Author SHA1 Message Date
Mads Kiilerich
473137c772 merge: change debug logging - test output changes but no real changes
Preparing for action list split-up, making sure the final change don't have any
test changes.

The patch moves debug statements around without really changing anything.
Arguably, it temporarily makes the code worse. The only justification is that
it makes it easier to review the test changes ... and in the end the big change
will not change test output at all.

The changes to test output are due to changes in the ordering of debug output.
That is mainly because we now do the debug logging for files when we actually
process them. Files are also processed in a slightly different but still
correct order. It is now primarily ordered by action type, secondarily by
filename.

The patch introduces some redundancy. Some of it will be removed again, some of
it will in the end help code readability and efficiency. It is possible that we
later on could introduce a "process this action list and do some logging and
progress reporting and apply this function".

The "preserving X for resolve" debug statements will only have single space
indentation. It will no longer have a leading single space indented "f: msg ->
m" message. Having this message double indented would thus no longer make
sense.

The bid actions will temporarily be sorted using a custom sort key that happens
to match the sort order the simplified code will have in the end.
2014-04-22 02:10:25 +02:00
Mads Kiilerich
43db2a4aa5 merge: change priority / ordering of merge actions
The ordering of actions matters. Normal file system semantics is that files
have to be removed before a directory with the same name can be created.

Before the first ordering key was to have 'r' and 'f' actions come first,
secondary key was the filename.

Because of future refactorings we want to consistently have all action types
(with a sensible priority) as separate first keys. Grouped by action type, we
sort by filename.

Not processing in strict filename order could give worse performance,
especially on spinning disks. That is however primarily an issue in the cases
where "all" actions are of the same kind and will be grouped together anyway.
2014-05-02 01:09:14 +02:00
Mads Kiilerich
a0f70f6a56 merge: keep destination filename as key in filemerge actions
Gives more readable debug output and makes it possible to compare/merge actions
later.
2014-03-02 18:52:16 +01:00
Bryan O'Sullivan
948134e159 tests: update test output (will be folded into parent) 2013-02-09 15:22:04 -08:00
Siddharth Agarwal
ace5cac25b manifestmerge: pass in branchmerge and force separately
This will be used in an upcoming patch.
2013-02-08 15:23:23 +00:00
Mads Kiilerich
ee476759ff merge: delay debug messages for merge actions
Show messages at a point where the actions have been sorted, thus preparing for
backout of 14f4258e3526.

This makes manifestmerge more of a silent operation, just like 'copies' is.

Indent 'preserving' messages to make them subordinate to the action logging so
they fit in the new context. (The 'preserving' messages are quite redundant and
could also be removed completely.)
2013-01-24 23:57:44 +01:00
Mads Kiilerich
2e43383c70 copies: report found copies sorted 2012-12-12 02:38:14 +01:00
Siddharth Agarwal
76d4a91eed copies: make debug messages more sensible
The -> in debug messages is currently overloaded to mean both source to dest
and dest to source. To fix this, we add explicit labels and make the arrow
direction consistent.
2012-12-26 15:03:58 -08:00
Bryan O'Sullivan
158df87946 tests: reduce spurious failures when run with generaldelta
Quite a few tests fail in noisy but meaningless ways when the test suite
is run with generaldelta enabled:

  ./run-tests.py --extra-config-opt=format.generaldelta=1

This reduces the amount of noise introduced by the debugindex command,
the main source of differences.  In my environment, when testing with
generaldelta enabled, this change reduces the number of completely
failing tests from 21 to 8.
2012-07-11 15:03:10 -07:00
Thomas Arendsen Hein
6c60809dcc merge: show renamed on one and deleted on the other side in debug output 2012-05-23 21:34:29 +02:00
Thomas Arendsen Hein
91a8201c52 merge: warn about file deleted in one branch and renamed in other (issue3074)
For divergent renames the following message is printed during merge:
note: possible conflict - file was renamed multiple times to:
 newfile
 file2

When a file is renamed in one branch and deleted in the other, the file still
exists after a merge. With this change a similar message is printed for mv+rm:

note: possible conflict - file was deleted and renamed to:
 newfile
2012-05-23 20:50:16 +02:00
Thomas Arendsen Hein
d79df9bd09 tests: do not create repos inside repos in test-rename-merge1.t
This is no actual problem, but I when adding more tests to this file,
the directory structure would become t/repo2089/repoXXXX/repoYYYY/...
2012-05-23 17:33:19 +02:00
Thomas Arendsen Hein
4735ff24c9 merge: do not warn about copy and rename in the same transaction (issue2113) 2012-05-23 17:25:48 +02:00
Martin Geisler
ae8ca6aff5 merge: make debug output easier to read
I always found it hard to figure out what the debug code meant without
the separators.
2011-12-09 17:34:53 +01:00
Sune Foldager
c8ff620c56 tests: fix deprecated use of hg debugdata/debugindex
For filelogs, debugindex and debugdata can be called with the file name
directly instead of the path to the revlog. Since in the future filelogs
will no longer be valid revlogs, calling with a path to the revlog is
deprecated for debugdata. For debugindex it is expected to still work,
but I changed them as well for consistency.
2011-05-04 13:37:41 +02:00
Patrick Mezard
b5d4dfb6b1 test-rename-merge1: make it easier to review, windows friendly
- Reuse the coding style of the previous tests, both are very similar
- Do not play with case changes, it does not work on Windows
2011-03-06 10:06:09 +01:00
Wagner Bruna
cf857d2ef8 tests: test renaming a file added on two branches (issue2089)
The issue was fixed by 5455f79e4f3b .
2011-02-24 13:57:52 -03:00
Matt Mackall
7bcb1a26b9 context: generate file ancestors in reverse revision order (issue2642)
The related() function in copies assumes that revisions are generated
in reverse revision order, so it was getting confused in some situations.
2011-02-23 17:27:05 -06:00
Dan Villiom Podlaski Christiansen
17cfc8fdc9 merge: make 'diverging renames' diagnostic a more helpful note.
See the Hg Book on why we actually want to detect this case:
http://hgbook.red-bean.com/read/mercurial-in-daily-use.html#id364290

Before:

$ hg up deadbeef
warning: detected divergent renames of X to:
...

After:

$ hg up deadbeef
note: possible conflict - X was renamed multiple times to:
...

No functionality change.
2010-10-10 09:50:25 -05:00
Dan Villiom Podlaski Christiansen
cff327a7f7 copies: don't detect copies as "divergent renames"
(For the purposes of this patch copy is defined as a rename where the
source continues to exist.)
2010-10-10 09:48:37 -05:00
Adrian Buehlmann
e5136472fc tests: unify test-rename-merge1 2010-09-14 13:43:05 +02:00