darcs

Patch 1034 resolve issue2282: don't allow remote operations to co...

Title resolve issue2282: don't allow remote operations to co...
Superseder Nosy List ganesh
Related Issues
Status accepted Assigned To
Milestone

Created on 2013-02-16.13:43:54 by ganesh, last changed 2013-02-16.14:42:40 by gh.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt ganesh, 2013-02-16.13:43:54 text/x-darcs-patch
resolve-issue2282_-don_t-allow-remote-operations-to-copy-the-rebase-patch.dpatch ganesh, 2013-02-16.13:43:54 application/x-darcs-patch
unnamed ganesh, 2013-02-16.13:43:54
See mailing list archives for discussion on individual patches.
Messages
msg16625 (view) Author: ganesh Date: 2013-02-16.13:43:54
1 patch for repository darcs-unstable@darcs.net:screened:

Sat Feb 16 13:42:45 GMT 2013  Ganesh Sittampalam <ganesh@earth.li>
  * resolve issue2282: don't allow remote operations to copy the rebase patch
Attachments
msg16635 (view) Author: gh Date: 2013-02-16.14:42:40
hunk ./src/Darcs/Repository/Format.hs 181
+    | formatHas RebaseInProgress inrf =
+        -- we could support this, by applying an appropriate filter to the 
patches
+        -- as we pull them.
+        Just "Cannot transfer patches from a repository where a rebase is 
in progress" [_$_]

This change is in the function readfromAndWritetoProblem which is called by 
identifyRepositoryFor, which is called by the commands Send, Pull, Push, 
Obliterate (when using the "not in remote repo" flag). So it seems OK to 
prohibit interacting with rebase-in-progress repos in these cases.

The Get case is handled by the following hunk:

hunk ./src/Darcs/UI/Commands/Get.hs 139
+
+  -- there's no fundamental reason for banning gets of repositories with
+  -- rebase in progress, but it seems a bit dubious to actually copy the
+  -- rebase state, and removing it is a bit of work since the current
+  -- implementation just copies the inventory file
+  when (formatHas RebaseInProgress rfsource) $
+      fail "Can't get from a repository with a rebase in progress"
+

The test script makes sense, I'm accepting the bundle.
History
Date User Action Args
2013-02-16 13:43:54ganeshcreate
2013-02-16 14:42:40ghsetstatus: needs-screening -> accepted
messages: + msg16635