Show More
@@ -204,26 +204,22 b' def archive(ui, repo, dest, **opts):' | |||||
204 | def backout(ui, repo, node=None, rev=None, **opts): |
|
204 | def backout(ui, repo, node=None, rev=None, **opts): | |
205 | '''reverse effect of earlier changeset |
|
205 | '''reverse effect of earlier changeset | |
206 |
|
206 | |||
207 | The backout command merges the reverse effect of the reverted |
|
207 | Prepare a new changeset with the effect of REV undone in the | |
208 |
c |
|
208 | current working directory. | |
209 |
|
209 | |||
210 | With the --merge option, it first commits the reverted changes |
|
210 | If REV is the parent of the working directory, then this changeset | |
211 | as a new changeset. This new changeset is a child of the reverted |
|
211 | is committed automatically. Otherwise, hg needs to merge the | |
212 | changeset. |
|
212 | changes and the merged result is left uncommitted. | |
213 | The --merge option remembers the parent of the working directory |
|
213 | ||
214 | before starting the backout, then merges the new head with that |
|
214 | By default, the pending changeset will have one parent, | |
215 | changeset afterwards. |
|
215 | maintaining a linear history. With --merge, the pending changeset | |
216 | This will result in an explicit merge in the history. |
|
216 | will instead have two parents: the old parent of the working | |
217 |
|
217 | directory and a child of REV that simply undoes REV. | ||
218 | If you backout a changeset other than the original parent of the |
|
218 | ||
219 | working directory, the result of this merge is not committed, |
|
219 | Before version 1.7, the default behavior was equivalent to | |
220 | as with a normal merge. Otherwise, no merge is needed and the |
|
220 | specifying --merge followed by :hg:`update --clean .` to cancel | |
221 | commit is automatic. |
|
221 | the merge and leave the child of REV as a head to be merged | |
222 |
|
222 | separately. | ||
223 | Note that the default behavior (without --merge) has changed in |
|
|||
224 | version 1.7. To restore the previous default behavior, use |
|
|||
225 | :hg:`backout --merge` and then :hg:`update --clean .` to get rid of |
|
|||
226 | the ongoing merge. |
|
|||
227 |
|
223 | |||
228 | See :hg:`help dates` for a list of formats valid for -d/--date. |
|
224 | See :hg:`help dates` for a list of formats valid for -d/--date. | |
229 |
|
225 |
@@ -508,7 +508,7 b' class dirstate(object):' | |||||
508 | if files[i] < subpath: |
|
508 | if files[i] < subpath: | |
509 | i += 1 |
|
509 | i += 1 | |
510 | continue |
|
510 | continue | |
511 | while files and files[i].startswith(subpath): |
|
511 | while i < len(files) and files[i].startswith(subpath): | |
512 | del files[i] |
|
512 | del files[i] | |
513 | j += 1 |
|
513 | j += 1 | |
514 |
|
514 |
@@ -413,3 +413,15 b' Test missing subrepo:' | |||||
413 | $ rm -r foo |
|
413 | $ rm -r foo | |
414 | $ hg status -S |
|
414 | $ hg status -S | |
415 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" |
|
415 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" | |
|
416 | ||||
|
417 | Issue2619: IndexError: list index out of range on hg add with subrepos | |||
|
418 | The subrepo must sorts after the explicit filename. | |||
|
419 | ||||
|
420 | $ cd .. | |||
|
421 | $ hg init test | |||
|
422 | $ cd test | |||
|
423 | $ hg init x | |||
|
424 | $ echo "x = x" >> .hgsub | |||
|
425 | $ hg add .hgsub | |||
|
426 | $ touch a x/a | |||
|
427 | $ hg add a x/a |
General Comments 0
You need to be logged in to leave comments.
Login now