[PATCH] update: do not remove cwd

Augie Fackler raf at durin42.com
Tue Aug 30 11:13:52 EDT 2016


On Mon, Aug 29, 2016 at 11:50:28AM -0700, Stanislau Hlebik wrote:
> # HG changeset patch
> # User Stanislau Hlebik <stash at fb.com>
> # Date 1472496038 25200
> #      Mon Aug 29 11:40:38 2016 -0700
> # Node ID e1962781ce84040746ef79c0084b8fd70cfcd4b4
> # Parent  318e2b600b80e4ed3c6f37df46ec7544f60d4c0b
> update: do not remove cwd

I like it! Good improvement. However, see below for a concern.

[...]

>
> diff --git a/tests/test-update-names.t b/tests/test-update-names.t
> --- a/tests/test-update-names.t
> +++ b/tests/test-update-names.t
> @@ -72,3 +72,13 @@
>    $ cd ..
>
>  #endif
> +
> +Test that cwd is not deleted during update
> +  $ hg init r4 && cd r4
> +  $ mkdir dir
> +  $ cd dir
> +  $ echo a > a
> +  $ hg add a
> +  $ hg ci -m "file and dir"
> +  $ hg up -q null
> +  $ cd .

This wants to be 'cd ..'


What happens in this case:

  $ hg init r5 && cd r5
  $ echo foo > foo
  $ hg addr && hg ci -m foo
  $ hg co null
  $ mkdir foo
  $ echo bar > foo/bar
  $ hg addr && hg ci -m foo/bar
  $ cd foo
Move from r1 to r0, which will want to replace cwd with a file
  $ hg co 0

I suspect this is broken somehow, but didn't test it myself.

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list