Commit Graph

31 Commits

Author SHA1 Message Date
Matt Mackall
b050378961 merge with stable 2015-07-01 16:33:31 -05:00
Pierre-Yves David
b05f468b44 changegroup: properly compute common base in changeggroupsubset (issue4736)
The computation of roots was buggy, any ancestor of a bundled merge which was
also a descendant of the parents of a bundled revision were included as part of
the bundle. We fix it and add a test for strip (which revealed the problem).

Check the test for a practical usecase.
2015-06-29 11:20:09 -07:00
Durham Goode
e0b3f09a3b revbranchcache: write cache even during read operations
Previously we would only actually write the revbranchcache to disk if we were in
the middle of a write operation (like commit). Now we will also write it during
any read operation. The cache knows how to invalidate itself, so it shouldn't
become corrupt if multiple writers try at once (and the write-on-read
behavior/risk is the same as all our other caches).
2015-02-24 18:43:31 -08:00
Wagner Bruna
41a26dac7c messages: quote "hg help" hints consistently 2015-01-17 22:01:14 -02:00
Mads Kiilerich
49a09d3e6c branchcache: add debug output whenever cache files use truncate
The cache files are usually append only but will automatically be truncated and
recover in exceptional situations. Add a debug notice when such exceptional
situations are encountered.
2015-01-14 01:15:26 +01:00
Durham Goode
2591767a70 bundles: do not overwrite existing backup bundles (BC)
Previously, a backup bundle could overwrite an existing bundle and cause user
data loss. For instance, if you have A<-B<-C and strip B, it produces backup
bundle B-backup.hg. If you then hg pull -r B B-backup.hg and strip it again, it
overwrites the existing B-backup.hg and C is lost.

The fix is to add a hash of all the nodes inside that bundle to the filename.
Fixed up existing tests and added a new test in test-strip.t
2015-01-09 10:52:14 -08:00
Mads Kiilerich
7167031347 localrepo: show headline notes in commitctx before showing filenames
commitctx already showed notes with filenames but didn't provide any context.
It is just as relevant to know when manifest or changelog is committed.

So, in addition to filenames, also show headlines 'committing files:',
'committing manifest' and 'committing changelog'.
2014-04-18 13:33:20 +02:00
Eric Sumner
94a9b4156e bundlerepo: retract phase boundary
This patch makes bundrepo retract the phase boundary for new commits to 'draft'
status, which is consistent with the behavior of 'hg unbundle'.  The old
behavior was for commits to appear with the same phase as their nearest
ancestor in the base repository.

This affects several classes of operation:

* Inspecting a bundle with the -B flag
* Treating a bundle file as a peer (old: everything public, new: everything draft)
* Incoming command (neither old or new behavior is sensible -- fixed in next patch)
2014-12-18 12:22:43 -08:00
Pierre-Yves David
281365197e progress: get the extremely verbose output out of default debug
When the progress extension is not enabled, each call to 'ui.progress' used to
issue a debug message. This results is a very verbose output and often redundant
in tests. Dropping it makes tests less volatile to factor they do not meant to
test.

We had to alter the sed trick in 'test-rename-merge2.t'. Sed is used to drop all
output from a certain point and hidding the progress output remove its anchor.
So we anchor on something else.
2015-05-09 23:40:40 -07:00
Mads Kiilerich
344f01d255 rebase: improve debug messages while processing the list of rebases 2014-12-10 06:20:35 +01:00
Mads Kiilerich
0419ad5c23 rebase: show more useful status information while rebasing
Show status messages while rebasing, similar to what graft do:
  rebasing 12:2647734878ef "fork" (tip)

This gives more context for the user when resolving conflicts.
2014-12-09 03:45:26 +01:00
Mads Kiilerich
b3802652b5 tests: make 'saved backup' globbing less narrow in rebase tests
Globbing the hash made it harder to maintain tests with run-tests -i when it
was so far by the generated test output.

The hashes are stable and we just need to add a (glob).
2014-12-07 20:04:45 +01:00
Pierre-Yves David
3efa776f85 resolve: add parenthesis around "no more unresolved files" message
This message may be confused with an error message. Adding parenthesis around it
will make it more recognisable as an informative message.
2014-07-26 03:32:49 +02:00
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
Matt Mackall
0cb0a7ba67 resolve: simplify "finished" message
The recently introduced message was:

  no unresolved files; you may continue your unfinished operation

This had three problems:

- looks a bit like an error message because it's not saying "we've
  just resolved the last file"
- refers to "unfinished operation", which won't be the case with
  "update" or "merge"
- introduces semicolons to error messages, which is stylistically
  questionable

I've simplified this to:

  no more unresolved files

In the future, if we want to prompt someone to continue a particular operation, we should use
a hint style:

  no more unresolved files
  (use 'hg graft --continue' to finish grafting)
2014-05-09 14:46:50 -05:00
Gregory Szorc
85e363fea8 resolve: print message when no unresolved files remain (issue4214)
When using resolve, users often have to consult with the output of |hg
resolve -l| to see if any unresolved files remain. This step is tedious
and adds overhead to resolving.

This patch will notify a user if there are no unresolved files remaining
after executing |hg resolve|::

    no unresolved files; you may continue your unfinished operation

The patch stops short of telling the user exactly what command should be
executed to continue the unfinished operation. That is because this
information is not currently captured anywhere. This would make a
compelling follow-up feature.
2014-04-18 22:19:25 -07:00
Mads Kiilerich
870bf81b74 rebase: fix 'rebase onto %d starting from %s' - show root instead of list repr
The debug statement is already in a 'for root in roots' so it was probably the
intention to show root instead of roots. Do that.
2014-02-15 01:23:12 +01:00
Martin Geisler
7316194bdf tests: don't load unnecessary graphlog extension
Since graphlog is in core, we can use 'hg log -G' instead.
2013-11-22 19:14:17 +01:00
Pierre-Yves David
6652b6ffb3 rebase: fix selection of base used when rebasing merge (issue4041)
Prior this changeset, rebasing a merge whose first parent was not in
the rebase lead to wrong and highly conflicting merge. See the in-line
comment for details.

Test have been updated with the data provided by the reported.
2013-10-30 19:45:14 +01:00
Augie Fackler
be59bb31f7 dispatch: exit with status 1 for an InterventionRequired exception (bc) 2013-02-08 16:17:46 -06:00
Augie Fackler
60b871ef75 rebase: switch from util.Abort to util.InterventionRequired where appropriate (bc) 2013-02-08 16:27:59 -06:00
Durham Goode
83c3af4210 rebase: restore active bookmark after rebase --continue
When a rebase has conflicts and the user uses rebase --continue, the previously
active bookmark was not being made active once again. With this change that
bookmark is made active again, just as if the rebase had never been interrupted.

This changes the rebasestate file format, but should handle old formats correctly.
Since the file is transient, this is even less of a problem.

Adds a test to verify the new behavior. I manually tested continuing rebases
with and without an active bookmark, and with and without being on the bookmark
being rebased.
2013-03-11 15:37:28 -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
Alain Leufroy
fd923bd6e3 rebase: fix phases movement
Rebase now try to keep the phases of source changesets.
2012-01-17 09:12:14 +01:00
Pierre-Yves David
7e4f710bf6 phases: prevent rebase to rebase immutable changeset. 2011-12-27 00:11:22 +01:00
Matt Mackall
66de5cde16 merge: give a special message for internal:merge failure (issue3105) 2011-11-16 18:04:19 -06:00
Patrick Mezard
ee7651120f Improve unresolved merge conflicts warning (issue2681)
Suggested by Antoine Pitrou <pitrou@free.fr>
2011-03-06 15:21:50 +01:00
Steve Borho
6fc11bd3c7 rebase: improve resolve failure message 2010-10-30 16:58:15 -05:00
Mads Kiilerich
3174ff376b tests: remove redundant globs
Many globs now just match $TESTTMP and is no longer needed.
2010-10-08 22:36:10 -05:00
Adrian Buehlmann
1f4e98cf76 tests: unify test-rebase* 2010-10-01 16:10:06 +02:00