Commit Graph

5 Commits

Author SHA1 Message Date
Idan Kamara
73a82e0b84 backout of a52e14fe37fb: allow to qpop/push with a dirty working copy
The new behavior was breaking existing tools that relied on a sequence such as
this:

1) start with a dirty working copy
2) qimport some patch
3) try to qpush it
4) old behavior would fail at this point due to outstanding changes.
   (new behavior would only fail if the outstanding changes and the patches
   changes intersect)
5) innocent user qrefreshes, gets his local changes in the imported patch

It's worth considering if we can move this behavior to -f in the future.
2011-06-24 23:25:42 +03:00
Idan Kamara
707c7fe40d mq: allow to qpop/push with a dirty working copy (issue2780)
It's safe to do so if the sets of changed files in the
working copy and patches are disjoint.
2011-05-06 19:55:46 +03:00
Idan Kamara
64876670a4 mq: don't suggest to refresh when qpushing with no applied patches 2011-05-04 23:12:23 +03:00
Kevin Bullock
a19d7654b7 mq: strip extra whitespace from node ids in header (issue2790)
This makes `hg qpush --exact` work with patches created by `hg export`.
2011-05-03 11:46:02 -05:00
Steve Losh
72ee3af1d8 mq: add an '-e/--exact' option to qpush
This patch adds an '--exact/-e' option to qpush that will try to push the
patches in the correct location in the DAG.  Specifying this option does the
following:

* If --move is specified, abort. It makes no sense to move a patch to the front
  of the queue and try to apply it to its parent, because its parent is one of
  the patches we just moved it in front of!
* If patches are already applied, abort. We don't want patch changesets
  scattered throughout the DAG.
* If local changes are present, abort unless --force is used, as usual.
* Find the first patch we're going to push (if we're pushing multiple patches
  with a target or --all).
* If that patch doesn't have a parent, abort, obviously.
* If the parent doesn't exist in the repo, abort.  Something is wrong.
* Update to the parent, then continue pushing the patches as normal.
2010-11-17 21:18:44 -05:00