diff to tag includes .hgtags
Soh Tk-r28629
tksoh at freescale.com
Tue Jun 28 06:25:06 UTC 2005
> In the Mercurial philosophy, .hgtags _is_ a project file. It gets
> distributed, tracked with dirstate, checked in, checked out, merged,
> and edited. Yes, edited: consider what happens when there's a merge
> conflict on tags.
>
> Putting it in the .hg directory confuses it with a bunch of files that
> are not distributed, tracked with dirstate, checked in, checked out,
> merged, or (with one exception) edited. Instead, they're all carefully
> COWed and hardlinked,
>
> The way it works now is clearly right for the case of distributed
> tags. It's simple, does all the right things, and mostly stays out of
> the way.
IMHO, a project file should be something the user added consciously, that serves as a component of their projects.
Obviously I am not in the position to criticise on hg's design, nor do I intend to. But speaking as a user, I would want the VCS to stay as transparent as possible. It should be tool to assist the developping a project, not part of the project.
In my case, I am maintaining patches based on a main project (a CVS repo), and submit milestone patches in the form of diff files. It surprised me when I noticed .hgtags was added to the diff output. If I hadn't, it would have failed when others attempt to apply my patches to their CVS source tree. Not trying to compare, but so far I haven't seen this issue with bk and darcs. CVS is naturally okay.
One way I see may get around is to have a cmd that use specifically for generating the patches, which would implicitly filter out the hg files.
For now, I'll stay with filterdiff :)
> > For now, I guess adding -x to diff would be a good workaround.
>
> diff -x is useful in its own right.
Indeed it is.
> > Though in this case, I feel that it should filter out .hgtags and
> > other hg support files (.hgignore ?) by default. Think so?
>
> No, it's a project file. If you're sending someone a diff that ought
> to include a tag change, well.. it ought to include a tag change.
If both are using hg, then better to send the changesets (how?). A diff should be meant for non-compatible VCS.
> However, the plan is to eventually add the ability to specify defaults
> for various commands via hgrc. So you'll be able to eventually add -x
> .hgtags to your defaults.
That's be very nice.
More information about the Mercurial
mailing list