D6735: update: added support for --abort flag(issue4404)

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Sun Sep 15 23:14:39 EDT 2019


mharbison72 added a comment.


  Here's a case I stumbled upon that is a problem.  It looks like it thinks it isn't in the middle of an update, but .hgsubstate isn't put back to the pre-update state.
  
    diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t
    --- a/tests/test-subrepo.t
    +++ b/tests/test-subrepo.t
    @@ -1027,10 +1027,38 @@ filesystem (see also issue4583))
       > [extensions]
       > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
       > EOF
    +  $ hg -R repo st -S
    +  ? s/b
    +  $ hg -R repo diff -S
    +  $ hg -R repo log -r .
    +  changeset:   0:c4018e9aea1b
    +  user:        test
    +  date:        Thu Jan 01 00:00:00 1970 +0000
    +  summary:     1
    +
    +  $ cat repo/.hgsubstate
    +  f7b1eb17ad24730a1651fccd46c43826d1bbc2ac s
       $ hg -R repo update
       b: untracked file differs
       abort: untracked files in working directory differ from files in requested revision (in subrepository "s")
       [255]
    +  $ hg -R repo update --abort
    +  abort: no update in progress
    +  [255]
    +  $ hg -R repo diff -S
    +  diff -r c4018e9aea1b .hgsubstate
    +  --- a/.hgsubstate Thu Jan 01 00:00:00 1970 +0000
    +  +++ b/.hgsubstate Thu Jan 01 00:00:00 1970 +0000
    +  @@ -1,1 +1,1 @@
    +  -f7b1eb17ad24730a1651fccd46c43826d1bbc2ac s
    +  +cc505f09a8b2644adffa368adb4abc6f70d07bc0 s
    +  $ hg -R repo log -r .
    +  changeset:   0:c4018e9aea1b
    +  user:        test
    +  date:        Thu Jan 01 00:00:00 1970 +0000
    +  summary:     1
    +
    +
       $ cat >> repo/.hg/hgrc <<EOF
       > [extensions]
       > fakedirstatewritetime = !
  
  Another good way to induce this .hgsubstate issue is to `hg pull -u` on a repo, where the remote subrepo isn't available.  You don't need http for this- you can just rename the remote subrepo.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6735/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6735

To: taapas1128, #hg-reviewers, durin42, mharbison72
Cc: durin42, mharbison72, pulkit, mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list