bookmarks and branches again: files
Uwe Brauer
oub at mat.ucm.es
Wed Jul 13 12:29:58 UTC 2016
>>> "Simon" == Simon King <simon at simonking.org.uk> writes:
> On Wed, Jul 13, 2016 at 9:18 AM, Uwe Brauer <oub at mat.ucm.es> wrote:
>>
>>
>> > The `hg update` is unnecessary. `hg bookmark book2` creates
>> > book2 on the current revision and makes it the active bookmark.
>>
>> Ok, maybe I was confusing this with branches, after creating a
>> branch I have to update to that branch.
> Not true. "hg branch <branchname>" tells mercurial that the next
> commit should be created with the branch set to <branchname>.
> ie.
> hg branch my_new_banch
> hg commit
> is sufficent to create a commit on my_new_branch. No "hg update" is
> required.
Ok, thanks.
>>
>> The problem is, how do I know which commit I have to checkout, after
>> having deleted the bookmark? Is there any command which would allow me
>> to list all the files which have been added in any revision?
>>
> Finding revisions that added, edited or removed a file is easy using
> revsets (https://selenic.com/hg/help/revsets)
> For example, list the revisions that touched test2.txt:
> hg log -r "file('test2.txt')"
> As well as "file", there are "adds" and "removes" functions for
> finding revisions where a file was added or removed.
> Note that in your example, "removes('test2.txt')" would not return any
> results, because you've never actually issued an "hg rm" command to
> delete the file; you've simply checked out an older version of the
> repository, before the file existed.
Ok, thanks I tried out
hg log -r "adds('*.*')"
which gives me a list of revisions in which I added files, which is helpful.
But is there any command which would just list those files, by name and
rev?
regards
Uwe
More information about the Mercurial
mailing list