Question

In my local repo, I have a file A and I made some changes. But I didn't want to submit this changes to remote repo. The question is if I didn't submit this changes in TortoiseHG, everytime I changed other files, A will be listed in the "changelist window".

I know, TortoiseHG has a shelve function. It can store temp files. But files in shelve will revert to origin status.

Was it helpful?

Solution 2

Consider using Mercurial patch queues to manage local changes. With MQ you can queue up local changes and stash them out of the way for future use.

For the extension's documentation, here's the standard workflow you'd use for putting away local changes for future use:

$ hg qnew choosename
$ hg qpop
$ # ...
$ # restore
$ hg qpush
$ hg strip -k choosename
$ hg qremove choosename

There's also shelve, but I've never used it.

OTHER TIPS

Commit the change and then modify the phase of the commit to "secret". Note that any child changesets of a secret changeset will also be secret.

hg help phases

You might want to maintain a private branch with these changes - just make the first commit to the branch secret and then periodically merge from the main branch to your private branch.

An alternative is to do the above but without making the changesets secret. This will allow pushing the branch to a central server which gets the benefits of backups, etc and also the possibility that these changes might be useful to other developers (but still not on the main branch).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top