[issue494] update to a branch or revision without having to use update -C
Rafael Villar Burke
pachi at rvburke.com
Thu Feb 1 12:51:21 UTC 2007
Erik Gorset wrote:
> New submission from Erik Gorset <erik at medallia.com>:
>
> >From Issue245:
>
>> As far I understand, there is currently no easy way for the user to
>> say "check out revision REV, whether or not it is linearly related to
>> the current version, but DO warn me if I have modifications in my
>> working directory".
>>
>
> If I want to change the workdir to another branch or rev, I'm forced to use hg
> update -C rev and risk losing uncommitted changes, if there were any. The only
> other option that exists, as far as I can see, is to clone the repository.
>
> This is somewhat of a big issue if a project is using named branches heavily.
>
> As update is maybe meant to work on the current workdir, maybe a new command is
> needed that will "change" the current workdir to another branch or revision
> (and complain if there is uncommitted changes).
An extension like shelve/unshelve in bzr would be useful for this too,
as you could choose to shelve all uncommited hunks, but would allow for
diff hunk granularity when commiting. Maybe this extension could
internally use mq to do the job and just add an interface to choose
hunks and split uncommited changes into these.
When uncommited changes exist and the shelve extension is loaded, then
the update message could advertize it.
Take care,
Rafael Villar Burke
More information about the Mercurial
mailing list