Блог пользователя unreal.eugene

Автор unreal.eugene, 3 года назад, По-английски

Hello Codeforces!

I and DK318, as students of ITMO University, joined the Codeforces team in June. Last month we mainly dealt with the development of the Polygon platform and were focused on one significant feature lots of people dreamed of.

Have you ever made some changes to the problem, and at the same time another person changed the same file? I believe most of you did and disliked this situation. If you wanted to resolve the conflict, you needed to download an archive containing all your changes and repeat them all in the newest revision of the problem. This was very confusing and time-consuming, wasn't it? And now we present probably the most anticipated feature of Polygon since its creation: a web interface for resolving conflicts.

When the conflict occurs, the link 'Resolve Conflicts' will appear on the sidebar accessing the page, where you can merge different versions. If it is impossible to load into the problem, the same button will appear in the problems list. We made sure that if any conflict occurs, you still will be able to access this page.

On the conflicts resolving page, there are three editors for each conflicted file, showing different versions of this file: local version, remote version, and the final version used for resolving (editable). Also, you can see the difference between the first two versions and the lowest common ancestor in the tree of versions (it can be disabled for comfortable copying).

You can save a draft version using the button 'Save' (it won't resolve the file). When you are sure that you have correctly merged different versions of the file, you can resolve this file using the button 'Save And Resolve'.

Changes in utility files (e.g. problem.xml and *.desc files) may potentially break your working copy, and you won't be able to enter the problem page unless you discard it. Make them at your own risk! If you are worried because of this possibility, you can download an archive containing your working copy files and different versions of conflicted files in advance. In the future, we will improve the process of editing such files so these problems won't be possible to produce.

Unfortunately, there are still some types of conflicts, called structure conflicts, which can't be resolved in the same way. For example, if you locally deleted a file but remotely someone modified it. This type of conflict may potentially affect the whole repository, so the only solution to this conflict is like earlier — using an archive. You can also learn the reason for the conflict if you hover over the file's status on the sidebar. On the other hand, it's way harder to achieve such type of conflict — most of the conflicts are text conflicts, which can be resolved using a web interface.

We hope that this new feature will be useful and will save a lot of time and nerves. Write in the comments your suggestions on what can be improved or corrected.

  • Проголосовать: нравится
  • +430
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится +49 Проголосовать: не нравится

Finally new updates for Polygon! Huge thanks to DK318 and unreal.eugene for that as well as to MikeMirzayanov for Polygon and CodeForces!

»
3 года назад, # |
  Проголосовать: нравится +39 Проголосовать: не нравится

Amazing! Have you thought about using existing tools such as Git which can solve conflicts, sometimes even guessing what you want (like rerere)? It'd be amazing if you could work with Polygon problems via Git.

  • »
    »
    3 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +9 Проголосовать: не нравится

    Have you thought about using existing tools such as Git which can solve conflicts, sometimes even guessing what you want (like rerere)?

    Polygon uses Subversion as a backend to store working copies since its birth. In particular, it is used to merge changes. That's why conflicts appear only if two files are concurrently changed in the same places (lines). In short, specialized tools to merge changes are used in Polygon since its launch in 2009.

    It'd be amazing if you could work with Polygon problems via Git.

    It wouldn't. Polygon working copy is not just a set of source files. It has a strict structure, maintains a set of invariants, auto-generated descriptors, and so on. It has an API for working with working copies. You can write your own CLI tool or use an existing one.

»
3 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

I like the direction polygon and codeforces is headed.