Fresh clone of pijul sources contains conflicts (or conflict markers)

Today I realised that my clone of pijul/pijul contains a conflict (or just a conflict marker). I nuked the folder and cloned again:

$ pijul --version
pijul 1.0.0-beta.2
$ pijul clone https://nest.pijul.com/pijul/pijul 
Downloading changes [==================================================] 807/807                                                       
           Applying [==================================================] 807/807                                                       
 Completing changes [                                                  ] 0/0                                                         
$ cd pijul 
$ grep -r "^>>>>>>>" 
libpijul/src/tests/mod.rs:>>>>>>> 0 [SHSJ3Y53]
libpijul/src/record.rs:>>>>>>> 0 [PDTUHOMV]

How do I tell if it’s a conflict marker that’s become part of a patch or an actual conflict (that I can squash)?

EDIT: I should’ve maybe mentioned (although it could also be obvious to some) that libpijul doesn’t build in this state.

Are you sure that’s not the part of the code that outputs the conflict marker?

Pretty sure, here are the lines I see in record.rs:

            contents.push(0);
            if end > start {
>>>>>>> 0 [PDTUHOMV]
<<<<<<< 0
                (

Also checked on the nest and it’s not showing there.

Just did another pull - it appeared to grab two new patches (although I don’t know which).

But @pmeunier pushed a change today that I suspect fixed it in record.rs.

@pmeunier If you’re reading this, thanks! I’m still seeing another conflict in libpijul/src/tests/mod.rs:

fn record_all<T: MutTxnT, R: WorkingCopy, P: ChangeStore>(
    repo: &R,
    store: &P,
    txn: &ArcTxn<T>,
    channel: &ChannelRef<T>,
    prefix: &str,
) -> Result<Hash, anyhow::Error>
where
>>>>>>> 0 [SHSJ3Y53]
    T: MutTxnT + Send + Sync + 'static,
    R: WorkingCopy + Clone + Send + Sync + 'static,
    P: ChangeStore + Clone + Send + 'static,
<<<<<<< 0
    R::Error: Send + Sync + 'static,
{
    let (hash, _) = record_all_change(repo, store, txn, channel, prefix)?;
    Ok(hash)
}

Yes, I should reactivate CI. As soon as I’m done with my current big “day job” projects (hopefully in 2022), I’ll start spending time on Pijul again.

1 Like

These conflicts come from a patch that was made right during a change in how conflicts were detected, so I won’t count it as a bug.

Thanks! I’m not counting bugs :slight_smile: just started digging around the codebase again and wanted to report my findings.

I think my underlying question is: if there’s a conflict, how do I tell? The textual representation of a conflict could conceivably be just part of a file, so I’m wondering if there’s a way to get a list of all “current” conflicts (for a given tag/channel “checkout”). Grepping for ^>>>>>> seems like a poor man’s conflict detection :slight_smile:

(Apologies if I use words like “commit”, “checkout”, etc - heavy git user here and am used to those words, but I do understand and appreciate that pijul is conceptually different with different terminology.)