Commit Graph

4 Commits

Author SHA1 Message Date
Yuya Nishihara
85c5af29fa tests: run "cwd was removed" test only if cwd can actually be removed
On some platforms, cwd can't be removed. In which case, util.unlinkpath()
continues with no error since the failure of directory removal isn't critical.
So it doesn't make sense to run the test added by 6395630fdfdc on those
platforms. OTOH, we need to run the test in test-rebase-scenario-global.t
since the repository is referenced after that.
2016-10-26 22:50:06 +09:00
Stanislau Hlebik
b83f0c0687 update: warn if cwd was deleted
During update directories are deleted as soon as they have no entries.
But if current working directory is deleted then it cause problems
in complex commands like 'hg split'. This commit adds a warning
that will help users figure the problem faster.
2016-10-04 04:06:48 -07:00
Kostia Balytskyi
989ebc4f0d update: fix bug when update tries to modify folder symlink
In cbefa73a359814e6784a63f90b78c7afd39bc7d5, I introduced a new bug:
when a symlink points to a folder in commit A and to another folder
in commit B, while updating from A to B, Mercurial will try to use
removedir on this symlink, which will fail. This is a very bad bug,
since it basically renders symlinks to folders unusable in repos.

Added test case fails without a fix and passes with it.
2016-07-21 15:55:47 -07:00
Kostia Balytskyi
78766f7ff1 update: teach hg to override untracked dir with a tracked file on update
This is a fix to an old problem when Mercurial got confused by an
untracked folder with the same name as one of the files in a commit
hg was trying to update to. It is pretty safe to remove this folder if
it is empty. Backing up an empty folder seems to go against Mercurial's
"don't track dirs" philosophy.
2016-07-01 17:42:55 +02:00