From patchwork Tue Mar 29 00:50:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Bug, 5162] New: Quitting `hg split -r ` does not clean working directory From: mercurial-bugs@selenic.com X-Patchwork-Id: 14119 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Tue, 29 Mar 2016 00:50:49 +0000 https://bz.mercurial-scm.org/show_bug.cgi?id=5162 Bug ID: 5162 Summary: Quitting `hg split -r ` does not clean working directory Product: Mercurial Version: unspecified Hardware: All OS: Linux Status: UNCONFIRMED Severity: bug Priority: wish Component: evolution Assignee: bugzilla@selenic.com Reporter: hg@pewpew.net CC: mercurial-devel@selenic.com, pierre-yves.david@ens-lyon.org Possible duplicate of: https://bz.mercurial-scm.org/show_bug.cgi?id=3591 ("record shouldn't touch the working directory")? If you use hg split -r , it looks like it applies to the working directory and starts split. If you quit out of split, it doesn't clean up the working directory (in the repro below, I'm on revision 1, where 'foo' should have the contents of 'one'. I run hg split, quit, and cat foo, and now it has contents 'two'). Note that it didn't actually check out so it is now reporting this as a diff (in the repro below `hg summary` says we are on revision 1, not revision 2) spectral@dragonair:~/src/hg/bug_reports/split_r_bug$ export HGRCPATH=~/src/hg/bug_reports/split_r_bug/hgrc spectral@dragonair:~/src/hg/bug_reports/split_r_bug$ cat $HGRCPATH [ui] username=kyle [extensions] evolve=~/src/hg/mutable-history/hgext/evolve.py spectral@dragonair:~/src/hg/bug_reports/split_r_bug$ hg init repro; cd repro spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ echo zero > foo; hg ci -Am zero adding foo spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ echo one > foo; hg ci -Am one spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ echo two > foo; hg ci -Am two spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ hg prev 1 files updated, 0 files merged, 0 files removed, 0 files unresolved [1] one spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ cat foo one -- bug starts here -- spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ hg split -r 2 0 files updated, 0 files merged, 0 files removed, 0 files unresolved reverting foo spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ hg summary parent: 1:46f160c23203 one branch: default commit: 1 modified (new branch head) update: 1 new changesets (update) phases: 3 draft -- version information -- spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ hg --version Mercurial Distributed SCM (version 3.7.1+310-c7f89ad87bae) (see https://mercurial-scm.org for more information) Copyright (C) 2005-2016 Matt Mackall and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ cd ~/src/hg/mutable-history spectral@dragonair:~/src/hg/mutable-history$ hg summary parent: 1634:9ae4e79a28f3 tip evolve--list: initial implementation branch: default commit: (clean) update: (current) spectral@dragonair:~/src/hg/mutable-history$ diff --git a/foo b/foo 1 hunks, 1 lines changed examine changes to 'foo'? [Ynesfdaq?] q abort: user quit -- things aren't the way I would expect them to be -- spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ cat foo two spectral@dragonair:~/src/hg/bug_reports/split_r_bug/repro$ hg diff diff -r 46f160c23203 foo --- a/foo Mon Mar 28 17:36:04 2016 -0700 +++ b/foo Mon Mar 28 17:36:29 2016 -0700 @@ -1,1 +1,1 @@ -one +two