On Fri, Sep 16, 2016 at 2:51 PM, Uwe Brauer <o...@mat.ucm.es> wrote:
>
>    > On Fri, Sep 16, 2016 at 1:55 PM, Uwe Brauer <o...@mat.ucm.es> wrote:
>
>    > Sorry, you're right. "hg import" does indeed handle multiple patches
>    > in the same file.
>
>    > The auctex repo isn't loading for me at the moment so I can't check,
>    > but has anyone modified auctex.texi since you made your changes? That
>    > would be one reason for the patch not applying.
>
> Not that I know of.
>
>    > Also, I noticed that the attachments on your previous email had CRLF
>    > line endings. Have you somehow ended up in a situation where your
>    > patch has one style of line endings but the files you are trying to
>    > apply them to have a different style?
>
> I will try to check this. The current problem is not urgent, I exported
> my recent changes cloned and merged that in, so that solved the problem
> somehow, I just wanted to know for the future whether I made something
> fundamental wrong?
>
> For me the most important questions are these.
>
>     -  it is not necessary to use rebase.
>

It's not necessary to use rebase, but it can be easier. When your
changes don't apply cleanly (because someone else has modified the
same files), rebase will launch the 3-way merge mechanism because it
knows what the common ancestor of the changes were. export/import
loses that information, so resolving conflicts can be more difficult.

For what it's worth (and ignoring any extra complications that might
be introduced by hg-git), the rebase workflow is normally as simple as
using "hg pull --rebase" instead of "hg pull".

>     -  In my workflow I alwayscreate a bookmark for my changes. When I
>       send a patch, I always have to send the whole branch (bookmark)
>
>
> That is hg export -r 1::3 -o mypatch.patch
>
> In my previous example. Is that  correct?
>
> BTW even if I used named branches instead of bookmarks there is no
> simple way to export a whole branch? As in  in my example
>
>  hg export --branch uwe -o mypatch.patch
>
> Does not exist?

This is where it's really worth learning the revset language again
(https://selenic.com/hg/help/revsets). In this case, you want to
export revisions that are ancestors of your current working directory,
and aren't ancestors of "master".

ie. "ancestors(.) - ancestors(master)"

You can use the "::" operator as shorthand for the ancestors() function:

::. - ::master

You can also use the only() function:

only(::., ::master)

(You *might* be able to leave out the "::master" in that one, I'm not certain)

If you've used a named branch, the branch() function would return all
the revisions on that branch.

You should test all of these with "hg log" to see what they return.

Simon
_______________________________________________
Mercurial mailing list
Mercurial@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial

Reply via email to