[Bug 5162] New: Quitting `hg split -r <rev>` does not clean working directory
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Tue Mar 29 00:50:49 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5162
Bug ID: 5162
Summary: Quitting `hg split -r <rev>` does not clean working
directory
Product: Mercurial
Version: unspecified
Hardware: All
OS: Linux
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: evolution
Assignee: bugzilla at selenic.com
Reporter: hg at pewpew.net
CC: mercurial-devel at selenic.com,
pierre-yves.david at 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 <rev>, it looks like it applies <rev> 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 <rev> 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 at dragonair:~/src/hg/bug_reports/split_r_bug$ export
HGRCPATH=~/src/hg/bug_reports/split_r_bug/hgrc
spectral at dragonair:~/src/hg/bug_reports/split_r_bug$ cat $HGRCPATH
[ui]
username=kyle
[extensions]
evolve=~/src/hg/mutable-history/hgext/evolve.py
spectral at dragonair:~/src/hg/bug_reports/split_r_bug$ hg init repro; cd repro
spectral at dragonair:~/src/hg/bug_reports/split_r_bug/repro$ echo zero > foo; hg
ci -Am zero
adding foo
spectral at dragonair:~/src/hg/bug_reports/split_r_bug/repro$ echo one > foo; hg
ci -Am one
spectral at dragonair:~/src/hg/bug_reports/split_r_bug/repro$ echo two > foo; hg
ci -Am two
spectral at 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 at dragonair:~/src/hg/bug_reports/split_r_bug/repro$ cat foo
one
-- bug starts here --
spectral at 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
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 at dragonair:~/src/hg/bug_reports/split_r_bug/repro$ cat foo
two
spectral at 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
spectral at 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 at 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 at dragonair:~/src/hg/bug_reports/split_r_bug/repro$ cd
~/src/hg/mutable-history
spectral at dragonair:~/src/hg/mutable-history$ hg summary
parent: 1634:9ae4e79a28f3 tip
evolve--list: initial implementation
branch: default
commit: (clean)
update: (current)
spectral at dragonair:~/src/hg/mutable-history$
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list