darcs

Issue 883 put can't succeed because of conflicts, but get succeeds

Title put can't succeed because of conflicts, but get succeeds
Priority bug Status wont-fix
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, tommy, zooko
Assigned To
Topics

Created on 2008-05-28.13:12:40 by zooko, last changed 2009-08-27.14:00:14 by admin.

Messages
msg4871 (view) Author: zooko Date: 2008-05-28.13:12:37
wonwin-mcbrootles-computer:~/playground/allmydata/tahoe$ darcs -- 
version
2.0.0 (2.0.0 (+ 220 patches))
  wonwin-mcbrootles-computer:~/playground/allmydata/tahoe$ time darcs  
put --repodir=trunk-pristine ${PWD}/tmpput
There are conflicts in the following files:
./src/allmydata/test/test_system.py

darcs failed:  Refusing to apply patches leading to conflicts.
If you would rather apply the patch and mark the conflicts,
use the --mark-conflicts or --allow-conflicts options to apply
These can set as defaults by adding
  apply mark-conflicts
to _darcs/prefs/defaults in the target repo.
Apply failed!

real    0m38.408s
user    0m33.685s
sys     0m4.577s
  wonwin-mcbrootles-computer:~/playground/allmydata/tahoe$ time darcs  
get --repo-name=tmpget trunk-pristine
Copying patches, to get lazy repository hit ctrl-C...
Finished getting.

real    0m15.497s
user    0m4.103s
sys     0m1.259s
msg4874 (view) Author: zooko Date: 2008-05-28.14:44:37
I created an empty repository, set "apply mark-conflicts", and pushed into it,
and got this conflict:

 wonwin-mcbrootles-computer:~/playground/allmydata/tahoe/tmppush$ darcs whatsnew
hunk ./src/allmydata/test/test_system.py 623
+v v v v v v v
+*************
hunk ./src/allmydata/test/test_system.py 626
+^ ^ ^ ^ ^ ^ ^
msg4894 (view) Author: kowey Date: 2008-05-30.12:09:08
Can we make this one a wont-fix, on the same principle that pull should allow
for conflicts, but push should not?

I suppose put could use apply --mark-conflicts, on the other hand.
msg4895 (view) Author: zooko Date: 2008-05-30.12:31:56
I don't understand -- why does it make sense for "darcs put --repodir=r1
$PWD/r2" to fail but "darcs get --repo-name=r2 r1" to succeed while showing no
conflicts?

I would understand if the latter produced the conflicts.

I guess this implies that I have the same question about why "darcs get
--repo-name=r2 r1" succeeds with no conflicts, but "mkdir r2 && cd r2 && darcs
init && darcs pull -a ../r1" gives a conflict.
msg4896 (view) Author: kowey Date: 2008-05-30.12:44:27
If you darcs get the repository and mark-conflicts you should see the same set
of markers.

Maybe this is just a user interface issue with darcs get?  Maybe it is
succeeding in cases of unresolved conflicts when it should be failing (should it
be failing?).

It may be worthwhile to darcs send us a minimal test case in bugs/.  The idea
would be that you create a repository with conflicts, darcs get it and fail if
get succeeds.

Alternatively, get could succeed and politely remind you that there are
unresolved conflicts in the repository.
History
Date User Action Args
2008-05-28 13:12:40zookocreate
2008-05-28 14:03:41zookolinkissue884 superseder
2008-05-28 14:44:39zookosetpriority: bug
nosy: tommy, beschmi, zooko, dagit
status: unread -> unknown
messages: + msg4874
2008-05-30 12:09:10koweysetstatus: unknown -> wont-fix
nosy: + kowey
messages: + msg4894
2008-05-30 12:31:57zookosetnosy: tommy, beschmi, kowey, zooko, dagit
messages: + msg4895
2008-05-30 12:44:29koweysetnosy: tommy, beschmi, kowey, zooko, dagit
messages: + msg4896
2009-08-06 21:06:10adminsetnosy: + dmitry.kurochkin, simon, thorkilnaur, - beschmi
2009-08-11 00:15:31adminsetnosy: - dagit
2009-08-25 18:11:28adminsetnosy: + darcs-devel, - simon
2009-08-27 14:00:14adminsetnosy: tommy, kowey, darcs-devel, zooko, thorkilnaur, dmitry.kurochkin