A problem about forget tracked file
Matt Mackall
mpm at selenic.com
Wed May 14 12:39:32 CDT 2014
On Wed, 2014-05-14 at 21:55 +0800, 小帽子 wrote:
> Hi,there.
> I recently encounter with a problem about using Mercurial about forget tracked files.
> here is the use case:
> 1. person A add a file named classpath.txt , committed it and push to the remote.
> 2. person B pull from the remote and he got the classpath.txt in his project.
> 3. person A and B found out that classpath.txt is always in conflicting state, so they decided not to
> track this classpath.txt any more. so :
> 4. person A execute forget classpth.txt. then get classpath.txt untracked successfully!
> 5. person A push this operation to the remote.
> 6. person B pull from remote and update the workspace automatically with classpath.txt deleted, which
> is not the result person B wanted. he just wants the classpath.txt untracked not deleted!
>
>
> I ran through many cases get the same result and found nothing help. can you help me out.
> thank you!
This is the way it's intended to work. Mercurial (and basically every
other version control system ever) has no notion of a transition from
tracked to untracked-but-kept. In fact, each of CVS, SVN, Git, and
Mercurial have an item in their FAQ about committing config files with
the same answer: don't do it, track an example config file instead.
Adding such a feature wouldn't help: we'd still have the conceptual
error of people committing config files, but now we'd have the
additional conceptual error of people forgetting-without-deleting files
that should actually be deleted.. which we'd need a new way to fix. And
so on.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list