monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] resolving name conflicts; file suturing vs drop


From: Markus Schiltknecht
Subject: Re: [Monotone-devel] resolving name conflicts; file suturing vs drop
Date: Mon, 05 May 2008 11:48:38 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080227)

Hi,

Ludovic Brenta wrote:
It seems to me that, if the node ids were content hashes, it would solve a lot
of problems. For one thing, creating two identical files would yield the same
node id. For another, creating two different files with the same name on
different branches would become a "simple" content conflict. In the specific
case you mention, it would be possible to distinguish between the two "foo"s
and select which one to resurrect. Of course I may be completely off-base.

The whole point of node-ids is to be able to track a file's history even if its name and contents change. So the node id certainly shouldn't be derived from any of the two.

Still, I'm very interested in this discussion because I'm having problems with
non-content conflicts in the following real-life scenario.

I have a database where I replicate, via tailor, a Subversion repository in a
"vendor" branch. In the same database I have my development branch where I do
all my work. Occasionally, I add a file in my development branch. In order to
propagate changes to the upstream Subversion repo, I apply patches and commit
manually in Subversion, e.g.

$ mtn diff -r h:vendor -r h:development > /tmp/f.diff
$ svn checkout svm+ssh://svn.upstream.org/trunk
$ cd trunk
$ patch -p0 < /tmp/f.diff
$ svn add foo
$ svn commit -m "merge from development branch"

The problem takes place when tailor next updates the vendor branch in the
monotone database. At that point, the file "foo" appears to have been created
independently in both branches, so I get non-content conflicts. The way I
resolve them is clunky:

$ cd ~src/tailor/vendor # this is the monotone checkout that tailor maintains
$ mtn rm foo
$ mtn propagate development vendor
$ mtn update

In essence I'm mucking around behind tailor's back. Do you guys think there is a
better way, or that using content hashes as node ids would help solve the
problem?

Well, WRT the problem at hand, this is an add-add non-content conflict. Stephen intends to make solving those easier, yes. So you'd only need to 'propagate' and monotone then asks you what to do on these non-content conflicts.

Markus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]